[ActiveLock-Development] CVS: activelock/examples/example1 al.lic,1.2,1.3 frmMain.frm,1.7,1.8 modMai
Brought to you by:
ialkan
From: Thanh H. T. <th...@us...> - 2004-04-18 01:55:19
|
Update of /cvsroot/activelock/activelock/examples/example1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28865 Modified Files: al.lic frmMain.frm modMain.bas Log Message: Batch commit for 2.0.5--see individual module change logs for details Index: al.lic =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/al.lic,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- al.lic 22 Sep 2003 03:06:06 -0000 1.2 +++ al.lic 18 Apr 2004 01:55:10 -0000 1.3 @@ -1,11 +1,11 @@ [TestApp] -ProductKey=AAAAB3NzaC1yc2EAAAABJQAAAIBmyH+sZ9eXI33MbVFWR85fsHLXndX2WaNokSaqxYltluQx2sX4T81r7jazTFxcczllwuMEauhL1rTqXCma0uA6xAQGajRorXeLcrW5OHIut7+HprXy9MTUp0SwsVFJJjDaRmodPaCBTUPD006lG7LNN5/jO/Cj8dNf6lVHy+VnIQ== ProductVersion=1.0 -LicenseType=Single -LicenseClass=Class1 -Licensee=Thanh Tran -LicenseKey=AAAAB3NzaC1yc2EAAACAEQw711E3i6aMxicVhpH9EhBFVzGSGGzYrI8uCvLOh6SFmy1/WFI+uJX0iM/Qajxa5LwNWIZtcX+NHCBrg70mwS5NbiMIrg6KaUUumdj5We9tCTyRox5OflfhJWZrXQYv2Bl1LAsvGviZRKgMAjcXYt32Urq6ES3O42F3pgXdgQM -RegisteredDate=2003/09/21 -LastUsed=2003/09/21 21:37:14 -Hash1=391f3f633cd0b5c36bec98078414f49c -Expiration=2003/10/21 +LicenseType=3 +LicenseClass=Single +Licensee=Evaluation User +MaxCount=1 +LicenseKey=AAAAB3NzaC1yc2EAAACAAy9X7+NSjj5QgjzbOMhcJolNXtrKkjn8yv5thXoQQn0jDizyRR4Yz3QzVDQcq8SghOKmf6h0uROy7tCgDOrJxWNNymW660Teo/cy1IjXeIKYz5FiWYal2ubBPiNAnMWt9O3/Tz8sq0YTfVMmR4hg2qUm2QxMZJTYXAZcE53PXck +RegisteredDate=2004/04/17 +Expiration=2004/05/17 +LastUsed=2004/04/17 21:27:50 +Hash1=0989429ad46641b7aef764895d4723e1 Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/frmMain.frm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- frmMain.frm 9 Nov 2003 12:32:28 -0000 1.7 +++ frmMain.frm 18 Apr 2004 01:55:10 -0000 1.8 @@ -1,7 +1,7 @@ VERSION 5.00 Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX" Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX" -Begin VB.Form frmMain +Begin VB.Form frmMain BorderStyle = 3 'Fixed Dialog Caption = "ActiveLock2 Test App" ClientHeight = 6615 @@ -15,7 +15,7 @@ ScaleHeight = 6615 ScaleWidth = 8025 StartUpPosition = 3 'Windows Default - Begin ComctlLib.StatusBar sbStatus + Begin ComctlLib.StatusBar sbStatus Align = 2 'Align Bottom Height = 255 Left = 0 @@ -27,18 +27,18 @@ Style = 1 SimpleText = "Ready" _Version = 327682 - BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} + BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} NumPanels = 1 - BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} + BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} Key = "" Object.Tag = "" EndProperty EndProperty End - Begin TabDlg.SSTab SSTab1 + Begin TabDlg.SSTab SSTab1 Height = 6255 Left = 0 - TabIndex = 3 + TabIndex = 12 Top = 0 Width = 7935 _ExtentX = 13996 @@ -58,20 +58,20 @@ TabCaption(1) = "Sample App" TabPicture(1) = "frmMain.frx":0CE6 Tab(1).ControlEnabled= 0 'False - Tab(1).Control(0)= "fraViewport" - Tab(1).Control(1)= "fraTicker" + Tab(1).Control(0)= "lblLockStatus" + Tab(1).Control(1)= "lblLockStatus2" Tab(1).Control(2)= "Frame1" - Tab(1).Control(3)= "lblLockStatus2" - Tab(1).Control(4)= "lblLockStatus" + Tab(1).Control(3)= "fraTicker" + Tab(1).Control(4)= "fraViewport" Tab(1).ControlCount= 5 - Begin VB.Frame fraViewport + Begin VB.Frame fraViewport BorderStyle = 0 'None Height = 400 Left = -74950 - TabIndex = 35 + TabIndex = 36 Top = 5510 Width = 7850 - Begin ALTestApp.atViewPort atViewPort1 + Begin ALTestApp.atViewPort atViewPort1 Height = 375 Left = 0 Top = 0 @@ -89,177 +89,177 @@ BalloonTipText = "No Messages" End End - Begin VB.Frame fraTicker + Begin VB.Frame fraTicker Caption = "Message" Height = 1890 Left = -74880 - TabIndex = 32 + TabIndex = 33 Top = 780 Width = 7575 - Begin VB.TextBox txtTicker + Begin VB.TextBox txtTicker Height = 1200 Left = 30 MultiLine = -1 'True ScrollBars = 2 'Vertical - TabIndex = 34 + TabIndex = 35 Text = "frmMain.frx":0D02 Top = 240 Width = 7425 End - Begin VB.CommandButton cmdTest + Begin VB.CommandButton cmdTest Caption = "&Update Ticker" Height = 315 Left = 5730 - TabIndex = 33 + TabIndex = 34 Top = 1475 Width = 1710 End End - Begin VB.Frame Frame1 + Begin VB.Frame Frame1 BorderStyle = 0 'None Height = 2535 Left = -74865 - TabIndex = 20 + TabIndex = 21 Top = 2820 Width = 6615 - Begin VB.OptionButton optForm + Begin VB.OptionButton optForm Caption = "System Tray" Height = 225 Index = 1 Left = 2040 - TabIndex = 29 + TabIndex = 30 Top = 1245 Width = 1395 End - Begin VB.OptionButton optForm + Begin VB.OptionButton optForm Caption = "Form" Height = 225 Index = 0 Left = 2040 - TabIndex = 28 + TabIndex = 29 Top = 960 Value = -1 'True Width = 1395 End - Begin VB.ComboBox cboSpeed + Begin VB.ComboBox cboSpeed Height = 315 ItemData = "frmMain.frx":0D74 Left = 2070 List = "frmMain.frx":0D87 Style = 2 'Dropdown List - TabIndex = 27 + TabIndex = 28 Top = 270 Width = 1635 End - Begin VB.CheckBox chkBlackout + Begin VB.CheckBox chkBlackout Caption = "Black Out Ticker" Height = 420 Left = 0 - TabIndex = 26 + TabIndex = 27 Top = 645 Width = 1590 End - Begin VB.CheckBox chkSound + Begin VB.CheckBox chkSound Caption = "Play Sound On New Message" Height = 495 Left = 0 - TabIndex = 25 + TabIndex = 26 Top = 1590 Width = 1470 End - Begin VB.CheckBox chkPause + Begin VB.CheckBox chkPause Caption = "Pause Ticker" Height = 315 Left = 0 - TabIndex = 24 + TabIndex = 25 Top = 300 Width = 1365 End - Begin VB.CheckBox chkFlash + Begin VB.CheckBox chkFlash Caption = "Flash Ticker On New Message" Height = 495 Left = 0 - TabIndex = 23 + TabIndex = 24 Top = 1080 Width = 1470 End - Begin VB.CheckBox chkScroll + Begin VB.CheckBox chkScroll Caption = "Scroll Ticker" Height = 225 Left = 15 - TabIndex = 22 + TabIndex = 23 Top = 0 Value = 1 'Checked Width = 1275 End - Begin VB.CheckBox chkEnable + Begin VB.CheckBox chkEnable Caption = "Enable Balloon Tooltip" Height = 495 Left = 15 - TabIndex = 21 + TabIndex = 22 Top = 2115 Width = 1755 End - Begin VB.Label lblHost + Begin VB.Label lblHost Caption = "Ticker Host:" Height = 255 Left = 2055 - TabIndex = 31 + TabIndex = 32 Top = 705 Width = 990 End - Begin VB.Label lblSpeed + Begin VB.Label lblSpeed Caption = "Scroll Speed:" Height = 255 Left = 2070 - TabIndex = 30 + TabIndex = 31 Top = 15 Width = 1245 End End - Begin VB.Frame fraReg + Begin VB.Frame fraReg Caption = "Register" Height = 3255 Left = 120 - TabIndex = 11 + TabIndex = 17 Top = 2580 Width = 7695 - Begin VB.TextBox txtUser + Begin VB.TextBox txtUser Height = 285 Left = 1440 - TabIndex = 16 - Text = "Thanh Tran" + TabIndex = 7 + Text = "Evaluation User" Top = 240 Width = 4935 End - Begin VB.CommandButton cmdReqGen + Begin VB.CommandButton cmdReqGen Caption = "&Generate" Height = 255 Left = 6480 - TabIndex = 15 + TabIndex = 9 Top = 600 Width = 1095 End - Begin VB.TextBox txtReqCodeGen + Begin VB.TextBox txtReqCodeGen BackColor = &H80000013& Height = 285 Left = 1440 Locked = -1 'True - TabIndex = 14 + TabIndex = 8 Top = 600 Width = 4935 End - Begin VB.CommandButton cmdRegister + Begin VB.CommandButton cmdRegister Caption = "&Register" Enabled = 0 'False Height = 255 Left = 6480 - TabIndex = 13 + TabIndex = 11 Top = 960 Width = 1095 End - Begin VB.TextBox txtLibKeyIn - BeginProperty Font + Begin VB.TextBox txtLibKeyIn + BeginProperty Font Name = "Courier New" Size = 8.25 Charset = 0 @@ -272,52 +272,52 @@ Left = 1440 MultiLine = -1 'True ScrollBars = 3 'Both - TabIndex = 12 + TabIndex = 10 Top = 960 Width = 4935 End - Begin VB.Label Label13 + Begin VB.Label Label13 Caption = "User Name:" Height = 255 Left = 120 - TabIndex = 19 + TabIndex = 20 Top = 240 Width = 1335 End - Begin VB.Label Label11 + Begin VB.Label Label11 Caption = "Installation Code:" Height = 255 Left = 120 - TabIndex = 18 + TabIndex = 19 Top = 600 Width = 1335 End - Begin VB.Label Label4 + Begin VB.Label Label4 Caption = "Liberation Key:" Height = 255 Left = 120 - TabIndex = 17 + TabIndex = 18 Top = 960 Width = 1335 End End - Begin VB.Frame fraRegStatus + Begin VB.Frame fraRegStatus Caption = "Status" Height = 2055 Left = 120 - TabIndex = 4 + TabIndex = 13 Top = 420 Width = 7695 - Begin VB.TextBox txtChecksum + Begin VB.TextBox txtChecksum BackColor = &H80000013& Height = 285 Left = 1560 Locked = -1 'True - TabIndex = 40 + TabIndex = 6 Top = 1680 Width = 4335 End - Begin VB.TextBox txtVersion + Begin VB.TextBox txtVersion BackColor = &H80000013& Height = 285 Left = 1560 @@ -327,7 +327,7 @@ Top = 480 Width = 4335 End - Begin VB.TextBox txtName + Begin VB.TextBox txtName BackColor = &H80000013& Height = 285 Left = 1560 @@ -337,34 +337,34 @@ Top = 240 Width = 4335 End - Begin VB.TextBox txtExpiration + Begin VB.TextBox txtExpiration BackColor = &H80000013& Height = 285 Left = 1560 Locked = -1 'True - TabIndex = 7 + TabIndex = 5 Top = 1320 Width = 4335 End - Begin VB.TextBox txtUsedDays + Begin VB.TextBox txtUsedDays BackColor = &H80000013& Height = 285 Left = 1560 Locked = -1 'True - TabIndex = 6 + TabIndex = 4 Top = 1080 Width = 4335 End - Begin VB.TextBox txtRegStatus + Begin VB.TextBox txtRegStatus BackColor = &H80000013& Height = 285 Left = 1560 Locked = -1 'True - TabIndex = 5 + TabIndex = 3 Top = 840 Width = 4335 End - Begin VB.Label Label3 + Begin VB.Label Label3 Caption = "DLL Checksum:" Height = 255 Left = 120 @@ -372,50 +372,50 @@ Top = 1680 Width = 1335 End - Begin VB.Label Label2 + Begin VB.Label Label2 Caption = "App Version:" Height = 255 Left = 120 - TabIndex = 37 + TabIndex = 38 Top = 480 Width = 975 End - Begin VB.Label Label1 + Begin VB.Label Label1 Caption = "App Name:" Height = 255 Left = 120 - TabIndex = 36 + TabIndex = 37 Top = 240 Width = 975 End - Begin VB.Label Label8 + Begin VB.Label Label8 Caption = "Expiry Date:" Height = 255 Left = 120 - TabIndex = 10 + TabIndex = 16 Top = 1320 Width = 975 End - Begin VB.Label Label7 + Begin VB.Label Label7 Caption = "Days Used:" Height = 255 Left = 120 - TabIndex = 9 + TabIndex = 15 Top = 1080 Width = 975 End - Begin VB.Label Label6 + Begin VB.Label Label6 Caption = "Registered:" Height = 255 Left = 120 - TabIndex = 8 + TabIndex = 14 Top = 840 Width = 975 End End - Begin VB.Label lblLockStatus2 + Begin VB.Label lblLockStatus2 Caption = "Disabled" - BeginProperty Font + BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 @@ -426,15 +426,15 @@ EndProperty Height = 375 Left = -71880 - TabIndex = 39 + TabIndex = 40 Top = 480 Width = 975 End - Begin VB.Label lblLockStatus + Begin VB.Label lblLockStatus Caption = "Application Functionalities Are Currently: " Height = 375 Left = -74880 - TabIndex = 38 + TabIndex = 39 Top = 480 Width = 2895 End @@ -510,6 +510,9 @@ ' 11.02.03 - th2tran - Store message box messages in encrypted format to elude hex editors. ' - txtLibKeyIn is now MultiLine-enabled ' - Terminology change: RequestCode is now known as InstallationCode +' 04.17.04 - th2tran - Added IActiveLock.Init() call--this is now required. +' - Set AutoRegisterKeyPath property (new in 2.0.5) to automatically +' register liberation file upon startup (if it exists). ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// @@ -526,13 +529,14 @@ ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Private Sub Form_Load() FunctionalitiesEnabled = False ' Disable functionalities by default - ' Initialize AL + ' Obtain AL instance and initialize its properties Set MyActiveLock = ActiveLock2.NewInstance() With MyActiveLock .SoftwareName = "TestApp" .SoftwareVersion = "1.0" .SoftwareCode = PUB_KEY - .LockType = lockHD + .LockType = lockNone + .AutoRegisterKeyPath = App.Path & "\testapp.alb" End With ' Verify AL's authenticity @@ -543,9 +547,15 @@ ' Initialize the keystore. We use a File keystore in this case. MyActiveLock.KeyStoreType = alsFile + + Debug.Print "License path is " & App.Path & "\al.lic" MyActiveLock.KeyStorePath = App.Path & "\al.lic" ' Obtain the EventNotifier so that we can receive notifications from AL. Set ActiveLockEventSink = MyActiveLock.EventNotifier + + ' Initialize AL + MyActiveLock.Init + ' Initialize other application settings With atViewPort1 @@ -596,12 +606,12 @@ Value = Encrypt(Value) End Sub -Private Function Encrypt(strData As String) As String +Private Function Encrypt(strdata As String) As String Dim i&, n& Dim sResult$ - n = Len(strData) + n = Len(strdata) For i = 1 To n - sResult = sResult & Asc(Mid$(strData, i, 1)) * 7 + sResult = sResult & Asc(Mid$(strdata, i, 1)) * 7 Next i Encrypt = sResult End Function Index: modMain.bas =================================================================== RCS file: /cvsroot/activelock/activelock/examples/example1/modMain.bas,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- modMain.bas 9 Nov 2003 12:32:28 -0000 1.9 +++ modMain.bas 18 Apr 2004 01:55:10 -0000 1.10 @@ -332,7 +332,7 @@ ' Returns the expected CRC value of ActiveLock2.dll ' Private Property Get Value() As Long - Value = 130111 + 8516 ' compute it so that it can't be easily spotted via a Hex Editor + Value = 171989 + 1285 ' 173274: compute it so that it can't be easily spotted via a Hex Editor End Property '' |