[ActiveLock-Development] CVS: activelock2/test ALTestApp.vbp,1.4,1.5 al.lic,1.2,1.3 frmMain.frm,1.5,
Brought to you by:
ialkan
From: Dan <wiz...@us...> - 2003-08-01 23:43:35
|
Update of /cvsroot/activelock/activelock2/test In directory sc8-pr-cvs1:/tmp/cvs-serv8838/test Modified Files: ALTestApp.vbp al.lic frmMain.frm frmMain.frx Log Message: Lock Types other than MAC are now implemented. Index: ALTestApp.vbp =================================================================== RCS file: /cvsroot/activelock/activelock2/test/ALTestApp.vbp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ALTestApp.vbp 31 Jul 2003 07:25:04 -0000 1.4 +++ ALTestApp.vbp 1 Aug 2003 23:43:31 -0000 1.5 @@ -1,6 +1,6 @@ Type=Exe -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation -Reference=*\G{AAED8AB4-AC83-4C51-93EE-64664DB96265}#1.0#0#..\src\ActiveLock2.dll#ActiveLock2 +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\WINNT\system32\STDOLE2.TLB#OLE Automation +Reference=*\G{AAED8AB4-AC83-4C51-93EE-64664DB96265}#7.0#0#..\src\ActiveLock2.dll#ActiveLock2 Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX Form=frmMain.frm UserControl=atViewPort.ctl Index: al.lic =================================================================== RCS file: /cvsroot/activelock/activelock2/test/al.lic,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- al.lic 28 Jul 2003 06:39:58 -0000 1.2 +++ al.lic 1 Aug 2003 23:43:31 -0000 1.3 @@ -1,21 +0,0 @@ -[MyApp] -; RSA public key -ProductKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuPTKuuMSyB02+Ejr7Ym8y9CIGvcYfXtMMlCBEZiIkzsUvqOh9xxyQn+nb1ogCeZjXxZG767audpwTXcnrGR9m6N79fYXKO0aIVmfxlwDdbyTpL89frO8HpPZ1cyZ8CoxIqVKJxxW+f3+KFSj/wn/DZiMXQnRNZ2CmrBbYncQsKwIDAQAB -ProductVersion=1.0 -Licensee=Thanh Tran -LicenseType=Single -LicenseClass=Class2 -LicensedFeatures=Feature1,Feature2,Feature9 -Expiration=2003-12-31 -LicenseKey=a4849ca280aeb8679b15f6ecac09bbfa -[ALTestApp] -ProductVersion=1.0.0 -LicenseType=Single -LicenseClass=Class1 -Licensee=Thanh Tran -LicenseKey=AAAAB3NzaC1yc2EAAACAChOALOd+VXMhMAw3OmTjGuV8TMCwtO3ZPnKFqp2WliR8EvmqAJc9XO2DdJFpBglL/1RK9O8G9QQAGaairH8Lh4tG7Wy9L0FVT8Rzi/IlQl+ZNs4bOXLwcYY99AMeoanYdrmdUCS8OGV6EaO2oEHiaIW23FV/m5pT21MEkXbvPns -RegisteredDate=2003/07/28 -Expiration=2003/08/27 -ProductKey=AAAAB3NzaC1yc2EAAAABJQAAAIBZnXD4IKfrBH25ekwLWQMs5mJuNH7D7U99EKFIsVhKQv17GHxKWvxHv/FwWhI1Rmd8TCiqk4Wmk7H1rh6xdbIVBwDj+RSeiXs8mmQX4/XvaWZx9BIQr5wODWnQCH/tj6Y6In2Xjc2J3B7LSjD60cWDBY/u+z9cSheTHLyhb16zFw== -Hash1=b0ffd9956fc8bba60b94dab0c4cc2758 -LastUsed=2003/07/28 02:15:20 Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/activelock2/test/frmMain.frm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- frmMain.frm 31 Jul 2003 07:25:05 -0000 1.5 +++ frmMain.frm 1 Aug 2003 23:43:31 -0000 1.6 @@ -22,37 +22,52 @@ _ExtentX = 13996 _ExtentY = 11033 _Version = 393216 - Tab = 1 TabHeight = 520 TabCaption(0) = "Admin" TabPicture(0) = "frmMain.frx":0000 - Tab(0).ControlEnabled= 0 'False - Tab(0).Control(0)= "txtChecksum" - Tab(0).Control(1)= "fraKeyGen" - Tab(0).Control(2)= "txtDays" - Tab(0).Control(3)= "cmbLicType" - Tab(0).Control(4)= "txtSoftwareCodePub" - Tab(0).Control(5)= "txtSoftwareCodePriv" - Tab(0).Control(6)= "txtVersion" - Tab(0).Control(7)= "txtName" - Tab(0).Control(8)= "cmbLicClass" - Tab(0).Control(9)= "cmdSoftwareCodeGen" - Tab(0).Control(10)= "Label14" - Tab(0).Control(11)= "lblDays" - Tab(0).Control(12)= "lblExpiry" - Tab(0).Control(13)= "Label10" - Tab(0).Control(14)= "Label9" - Tab(0).Control(15)= "Label3" - Tab(0).Control(16)= "Label2" - Tab(0).Control(17)= "Label1" + Tab(0).ControlEnabled= -1 'True + Tab(0).Control(0)= "Label1" + Tab(0).Control(0).Enabled= 0 'False + Tab(0).Control(1)= "Label2" + Tab(0).Control(1).Enabled= 0 'False + Tab(0).Control(2)= "Label3" + Tab(0).Control(2).Enabled= 0 'False + Tab(0).Control(3)= "Label9" + Tab(0).Control(3).Enabled= 0 'False + Tab(0).Control(4)= "Label10" + Tab(0).Control(4).Enabled= 0 'False + Tab(0).Control(5)= "lblExpiry" + Tab(0).Control(5).Enabled= 0 'False + Tab(0).Control(6)= "lblDays" + Tab(0).Control(6).Enabled= 0 'False + Tab(0).Control(7)= "Label14" + Tab(0).Control(7).Enabled= 0 'False + Tab(0).Control(8)= "cmdSoftwareCodeGen" + Tab(0).Control(8).Enabled= 0 'False + Tab(0).Control(9)= "cmbLicClass" + Tab(0).Control(9).Enabled= 0 'False + Tab(0).Control(10)= "txtName" + Tab(0).Control(10).Enabled= 0 'False + Tab(0).Control(11)= "txtVersion" + Tab(0).Control(11).Enabled= 0 'False + Tab(0).Control(12)= "txtSoftwareCodePriv" + Tab(0).Control(12).Enabled= 0 'False + Tab(0).Control(13)= "txtSoftwareCodePub" + Tab(0).Control(13).Enabled= 0 'False + Tab(0).Control(14)= "cmbLicType" + Tab(0).Control(14).Enabled= 0 'False + Tab(0).Control(15)= "txtDays" + Tab(0).Control(15).Enabled= 0 'False + Tab(0).Control(16)= "fraKeyGen" + Tab(0).Control(16).Enabled= 0 'False + Tab(0).Control(17)= "txtChecksum" + Tab(0).Control(17).Enabled= 0 'False Tab(0).ControlCount= 18 TabCaption(1) = "Registration" TabPicture(1) = "frmMain.frx":001C - Tab(1).ControlEnabled= -1 'True - Tab(1).Control(0)= "fraReg" - Tab(1).Control(0).Enabled= 0 'False - Tab(1).Control(1)= "fraRegStatus" - Tab(1).Control(1).Enabled= 0 'False + Tab(1).ControlEnabled= 0 'False + Tab(1).Control(0)= "fraRegStatus" + Tab(1).Control(1)= "fraReg" Tab(1).ControlCount= 2 TabCaption(2) = "Sample App" TabPicture(2) = "frmMain.frx":0038 @@ -64,7 +79,7 @@ Begin VB.TextBox txtChecksum BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 55 Top = 600 @@ -73,7 +88,7 @@ Begin VB.Frame fraKeyGen Caption = "Key Generator" Height = 2415 - Left = -74880 + Left = 120 TabIndex = 43 Top = 3360 Width = 7455 @@ -120,7 +135,7 @@ Begin VB.TextBox txtDays BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 40 Text = "30" @@ -130,7 +145,7 @@ Begin VB.ComboBox cmbLicType Height = 315 ItemData = "frmMain.frx":0054 - Left = -73680 + Left = 1320 List = "frmMain.frx":0061 Style = 2 'Dropdown List TabIndex = 3 @@ -140,7 +155,7 @@ Begin VB.TextBox txtSoftwareCodePub BackColor = &H80000011& Height = 285 - Left = -71160 + Left = 3840 Locked = -1 'True TabIndex = 34 Top = 1560 @@ -149,7 +164,7 @@ Begin VB.TextBox txtSoftwareCodePriv BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 35 Top = 1560 @@ -158,7 +173,7 @@ Begin VB.TextBox txtVersion BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 38 Top = 1320 @@ -167,7 +182,7 @@ Begin VB.TextBox txtName BackColor = &H80000011& Height = 285 - Left = -73680 + Left = 1320 Locked = -1 'True TabIndex = 36 Top = 1080 @@ -294,7 +309,7 @@ TickerFontSize = 11.25 TickerFlash = 0 'False TickerPlaySound = 0 'False - TickerScrollX = 55 + TickerScrollX = 282 BalloonTipIcon = 0 BalloonTipText = "No Messages" End @@ -328,7 +343,7 @@ Begin VB.Frame fraRegStatus Caption = "Status" Height = 2655 - Left = 120 + Left = -74880 TabIndex = 11 Top = 480 Width = 7695 @@ -387,7 +402,7 @@ Begin VB.Frame fraReg Caption = "Register" Height = 2895 - Left = 120 + Left = -74880 TabIndex = 7 Top = 3240 Width = 7695 @@ -459,8 +474,8 @@ Begin VB.ComboBox cmbLicClass Height = 315 ItemData = "frmMain.frx":0136 - Left = -73680 - List = "frmMain.frx":0140 + Left = 1320 + List = "frmMain.frx":0146 Style = 2 'Dropdown List TabIndex = 4 Top = 2730 @@ -470,7 +485,7 @@ Caption = "&Generate" Enabled = 0 'False Height = 255 - Left = -68520 + Left = 6480 TabIndex = 2 Top = 1560 Width = 1215 @@ -478,7 +493,7 @@ Begin VB.Label Label14 Caption = "ActiveLock's MD5 Checksum:" Height = 375 - Left = -74880 + Left = 120 TabIndex = 54 Top = 480 Width = 1215 @@ -486,7 +501,7 @@ Begin VB.Label lblDays Caption = "days" Height = 255 - Left = -72360 + Left = 2640 TabIndex = 42 Top = 2490 Width = 1335 @@ -494,7 +509,7 @@ Begin VB.Label lblExpiry Caption = "Expires after:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 41 Top = 2445 Width = 1335 @@ -502,7 +517,7 @@ Begin VB.Label Label10 Caption = " Version:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 39 Top = 1320 Width = 1335 @@ -510,7 +525,7 @@ Begin VB.Label Label9 Caption = "Software Name:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 37 Top = 1080 Width = 1335 @@ -518,7 +533,7 @@ Begin VB.Label Label3 Caption = "License Class:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 6 Top = 2730 Width = 1335 @@ -526,7 +541,7 @@ Begin VB.Label Label2 Caption = "License Type:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 5 Top = 2160 Width = 1335 @@ -534,7 +549,7 @@ Begin VB.Label Label1 Caption = " Code:" Height = 255 - Left = -74880 + Left = 120 TabIndex = 1 Top = 1560 Width = 1335 @@ -598,6 +613,7 @@ ' /////////////////////////////////////////////////////////////////////// ' ' 07.31.03 - th2tran - Now performing checksum on ActiveLock2.dll. +' 08.01.03 - wizzardme2000 - LockTypes other than MAC are now supported ' ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / @@ -642,6 +658,10 @@ MyActiveLock.LockType = lockMAC ElseIf cmbLicClass = "Class 2 - Lock To Windows Serial" Then MyActiveLock.LockType = lockWindows + ElseIf cmbLicClass = "Class 3 - Lock To Computer Name" Then + MyActiveLock.LockType = lockComp + ElseIf cmbLicClass = "Class 4 - Lock To Hard Drive Serial" Then + MyActiveLock.LockType = lockHD End If End Sub @@ -683,8 +703,8 @@ Dim strReq As String strReq = ActiveLock2.Base64Decode(txtReqCodeIn) ' strReq now contains the {MAC + vbLf + User} string - Dim strMAC$, strUser$ - GetMACAndUserFromRequestCode strReq, strMAC, strUser + Dim strLock$, strUser$ + GetLockAndUserFromRequestCode strReq, strLock, strUser Dim strExpire$ strExpire = GetExpirationDate() @@ -724,17 +744,18 @@ End If End Function -Private Sub GetMACAndUserFromRequestCode(ByVal strReq As String, strMAC As String, strUser As String) +Private Sub GetLockAndUserFromRequestCode(ByVal strReq As String, strLock As String, strUser As String) Dim Index% Index = InStr(1, strReq, vbLf) If Index <= 0 Then Exit Sub - strMAC = Left(strReq, Index - 1) + strLock = Left(strReq, Index - 1) strUser = Mid$(strReq, Index + 1) strUser = TrimNulls(strUser) End Sub Private Function IndexOf(Str As String, char As Byte) As Integer + 'Dan asks: What is this for????? It's not used anywhere in the program... IndexOf = -1 On Error GoTo errHandler Dim arrBytes() As Byte @@ -755,8 +776,7 @@ ' Key Request and Registration Functionalities ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Private Sub cmdReqGen_Click() - ' Generate Request code to MAC Address - ' TODO: Handle other possibilities (Windows serial, etc...) + ' Generate Request code to Lock Dim strReq As String, strLock As String strLock = MyActiveLock.LockCode() ' combine with user name @@ -857,8 +877,18 @@ cboSpeed = cboSpeed.List(2) txtSoftwareCodePriv = modMain.PRIV_KEY txtSoftwareCodePub = modMain.PUB_KEY - cmbLicType = "Periodic" - cmbLicClass = "Class 1 - Lock To MAC" + + 'These MUST to be set BEFORE you generate the reg code + 'or the app will fail to register properly on the next run + 'I am going to add lots of comments here so that people + ' will find it because it messed me up for hours. + ' + '****************************************************************** + '* Don't Forget This!!!!!!!! * + '****************************************************************** + + cmbLicType = "Permanent" + cmbLicClass = "Class 4 - Lock To Hard Drive Serial" ' Check registration status On Error GoTo NotRegistered Index: frmMain.frx =================================================================== RCS file: /cvsroot/activelock/activelock2/test/frmMain.frx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 Binary files /tmp/cvsugCOHQ and /tmp/cvsuiHJex differ |