activelock-development Mailing List for ActiveLock (Page 7)
Brought to you by:
ialkan
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(52) |
Aug
(170) |
Sep
(34) |
Oct
(62) |
Nov
(46) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
(2) |
Mar
|
Apr
(17) |
May
(14) |
Jun
(31) |
Jul
(59) |
Aug
(18) |
Sep
(3) |
Oct
|
Nov
|
Dec
(5) |
2005 |
Jan
|
Feb
(10) |
Mar
(3) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2004-04-18 02:09:47
|
Bugs item #841243, was opened at 2003-11-13 06:48 Message generated for change (Comment added) made by th2tran You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526385&aid=841243&group_id=70007 Category: ALUGEN Group: None Status: Open >Resolution: Fixed Priority: 8 Submitted By: Thanh Hai Tran (th2tran) >Assigned to: Thanh Hai Tran (th2tran) Summary: ALUGEN sometimes generates bad product keysets Initial Comment: Issue found in 2.0.4. It had been found that sometimes ALUGEN generates a bad product keyset (GCode-VCode). The license key generated by the GCode would fail verification using the VCode. Consequently the user is never able to perform registration. For details, refer to Forum discussion thread http://www.activelock.org/boards/index.php? showtopic=65&st=0&#entry188 ---------------------------------------------------------------------- >Comment By: Thanh Hai Tran (th2tran) Date: 2004-04-18 02:09 Message: Logged In: YES user_id=797792 Fixed - will be available in 2.0.5 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526385&aid=841243&group_id=70007 |
From: Thanh H. T. <th...@us...> - 2004-04-18 02:05:48
|
Update of /cvsroot/activelock/installer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30582 Modified Files: ActiveLock.nsi Log Message: Batch commit for 2.0.5--see individual module change logs for details Index: ActiveLock.nsi =================================================================== RCS file: /cvsroot/activelock/installer/ActiveLock.nsi,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ActiveLock.nsi 13 Oct 2003 09:03:27 -0000 1.5 +++ ActiveLock.nsi 18 Apr 2004 02:05:39 -0000 1.6 @@ -21,21 +21,32 @@ ; ALTestApp.exe, which doesn't sound too bad since they all reside in the ; bin directory, but will cause you pains when you start debugging. ; 10.11.03 - th2tran - Included alutil in the source code section. +; 04.03.04 - th2tran - Changes to work against NSIS 2.0 +; 04.10.04 - th2tran - alcrypto.dll now goes in Windows System directory. +; - included stdafx.cpp in alcrypto source distribution. +; 04.17.04 - th2tran - included MFC sample app ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;-------------------------------- +;General + !define VER_MAJOR 2 -!define VER_MINOR 0.3 +!define VER_MINOR 0.5 +!define VER ${VER_MAJOR}.${VER_MINOR} !define ALUTIL_SRC_ROOT "..\alutil" !define AL_SRC_ROOT "..\activelock" !define ALCRYPTO_ROOT "..\alcrypto" !define ALUGEN_ROOT "..\alugen" !define ASC "ActiveLock Software Group" + ;-------------------------------- ;Configuration - -OutFile ..\ActiveLock-${VER_MAJOR}.${VER_MINOR}.exe SetCompressor bzip2 +Name "ActiveLock ${VER_MAJOR}.${VER_MINOR}" +Icon "${AL_SRC_ROOT}\src\res\activelock.ico" +OutFile ..\ActiveLock-${VER_MAJOR}.${VER_MINOR}.exe InstType "Full (w/ Source and Doc)" InstType "Normal (w/ Doc, w/o Source)" @@ -49,57 +60,52 @@ InstallDirRegKey HKLM "SOFTWARE\${ASC}" "" ;-------------------------------- -!ifndef CLASSIC_UI +;Include Modern UI Macro's +!include "MUI.nsh" - ;Include Modern UI Macro's - !include "${NSISDIR}\Contrib\Modern UI\System.nsh" +;-------------------------------- +;Modern UI Configuration - ;-------------------------------- - ;Modern UI Configuration +!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\ReleaseNotes.htm" +!define MUI_FINISHPAGE_NOREBOOTSUPPORT - !define MUI_PRODUCT "ActiveLock" - !define MUI_VERSION "2.0.3" +!define MUI_HEADERIMAGE "${NSISDIR}\Contrib\Graphics\Header\win.bmp" +!define MUI_SPECIALBITMAP "${NSISDIR}\Contrib\Graphics\Icons\llama-blue.ico" - !define MUI_NAME "ActiveLock ${MUI_VERSION}" ;Installer name - !define MUI_WELCOMEPAGE - !define MUI_LICENSEPAGE - !define MUI_COMPONENTSPAGE - !define MUI_COMPONENTSPAGE_SMALLDESC - !define MUI_DIRECTORYPAGE - !define MUI_FINISHPAGE - !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\ReleaseNotes.htm" - !define MUI_FINISHPAGE_NOREBOOTSUPPORT +;-------------------------------- +;Interface Settings !define MUI_ABORTWARNING - !define MUI_UNINSTALLER - !define MUI_UNCONFIRMPAGE - - !define MUI_HEADERBITMAP "${NSISDIR}\Contrib\Icons\modern-header.bmp" - !define MUI_SPECIALBITMAP "${NSISDIR}\Contrib\Icons\modern-wizard nsis llama.bmp" - - ;-------------------------------- - ;Languages - - !define MUI_TEXT_WELCOME_INFO_TEXT "This wizard will guide you through the installation of ActiveLock, a free and open-source software licensing tool.\r\n\r\n\r\n" +;-------------------------------- +;Pages - !insertmacro MUI_LANGUAGE "English" + !insertmacro MUI_PAGE_WELCOME + !insertmacro MUI_PAGE_LICENSE "${AL_SRC_ROOT}\License.txt" + !insertmacro MUI_PAGE_COMPONENTS + !insertmacro MUI_PAGE_DIRECTORY + !insertmacro MUI_PAGE_INSTFILES + !insertmacro MUI_PAGE_FINISH - ;-------------------------------- - ;Reserve Files +; !insertmacro MUI_HEADERBITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp" +; !insertmacro MUI_SPECIALBITMAP "${NSISDIR}\Contrib\Graphics\Icons\llama-blue.ico" + + !insertmacro MUI_UNPAGE_WELCOME + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_INSTFILES + !insertmacro MUI_UNPAGE_FINISH - !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS - !insertmacro MUI_RESERVEFILE_SPECIALINI - !insertmacro MUI_RESERVEFILE_SPECIALBITMAP +;-------------------------------- +;Languages +!insertmacro MUI_LANGUAGE "English" +!define MUI_TEXT_WELCOME_INFO_TEXT "This wizard will guide you through the installation of ActiveLock, a free and open-source software licensing tool.\r\n\r\n\r\n" -!endif ;-------------------------------- ;Data ;LicenseData ${AL_SRC_ROOT}\License.txt -LicenseData ${AL_SRC_ROOT}\License.txt ;-------------------------------- ;Installer Sections @@ -122,8 +128,8 @@ File ${AL_SRC_ROOT}\bin\activelock2.chm ;File ${AL_SRC_ROOT}\Examples\Example1\ALTestApp.exe - ; ALCrypto.dll goes to Windows directory - SetOutPath $WINDIR + ; ALCrypto.dll goes to Windows System directory + SetOutPath $SYSDIR SetOverwrite on File ${AL_SRC_ROOT}\bin\alcrypto.dll @@ -148,7 +154,7 @@ ; Required files by the examples ;File ${AL_SRC_ROOT}\src\modActiveLock.bas -- don't need this anymore - SetOutPath $INSTDIR\Examples\Example1 + SetOutPath $INSTDIR\Examples\VB File ${AL_SRC_ROOT}\Examples\Example1\ALTestApp.vbp File ${AL_SRC_ROOT}\Examples\Example1\frmMain.frm File ${AL_SRC_ROOT}\Examples\Example1\frmMain.frx @@ -158,6 +164,16 @@ File ${AL_SRC_ROOT}\Examples\Example1\atDisplay.RES File ${AL_SRC_ROOT}\Examples\Example1\al.lic File ${AL_SRC_ROOT}\Examples\Example1\ALTestApp.exe + + SetOutPath $INSTDIR\Examples\MFC + File ${AL_SRC_ROOT}\Examples\MFC\*.h + File ${AL_SRC_ROOT}\Examples\MFC\*.cpp + File ${AL_SRC_ROOT}\Examples\MFC\*.txt + File ${AL_SRC_ROOT}\Examples\MFC\*.rc + File ${AL_SRC_ROOT}\Examples\MFC\*.dsp + File ${AL_SRC_ROOT}\Examples\MFC\*.dsw + File ${AL_SRC_ROOT}\Examples\MFC\*.reg + File ${AL_SRC_ROOT}\Examples\MFC\*.odl SectionEnd !ifndef NO_STARTMENUSHORTCUTS @@ -212,6 +228,7 @@ File ${ALCRYPTO_ROOT}\ALCrypto.dsw File ${ALCRYPTO_ROOT}\Version.rc File ${ALCRYPTO_ROOT}\*.c + File ${ALCRYPTO_ROOT}\*.cpp File ${ALCRYPTO_ROOT}\*.h SectionEnd Section "ActiveLock Universal GENerator" SecSrcALUGEN @@ -242,7 +259,7 @@ WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ActiveLock2" "InstallLocation" "$INSTDIR" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ActiveLock" "DisplayName" "ActiveLock Licensing System" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ActiveLock" "DisplayIcon" "$INSTDIR\bin\activelock2.dll,0" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ActiveLock" "DisplayVersion" "${MUI_VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ActiveLock" "DisplayVersion" "${VER}" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ActiveLock" "VersionMajor" "${VER_MAJOR}" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ActiveLock" "VersionMinor" "${VER_MINOR}" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ActiveLock" "NoModify" "1" @@ -271,7 +288,7 @@ !ifndef CLASSIC_UI -!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "The core files required to use ActiveLock" !insertmacro MUI_DESCRIPTION_TEXT ${SecExample} "Example applications that show you how to use ActiveLock" !insertmacro MUI_DESCRIPTION_TEXT ${SecSrc} "Source code for ActiveLock and all related files" @@ -281,7 +298,7 @@ !insertmacro MUI_DESCRIPTION_TEXT ${SecSrcALUGEN} "Source code for ALUGEN" !insertmacro MUI_DESCRIPTION_TEXT ${SecDoc} "ActiveLock Documentation (API docs, Usage Guide, etc..)" !insertmacro MUI_DESCRIPTION_TEXT ${SecIcons} "Creates Start Menu shortcuts." -!insertmacro MUI_FUNCTIONS_DESCRIPTION_END +!insertmacro MUI_FUNCTION_DESCRIPTION_END !endif @@ -322,8 +339,4 @@ RMDir /r $INSTDIR\Src RMDir /r $INSTDIR RMDir "$PROGRAMFILES\${ASC}" - !ifndef CLASSIC_UI - ;Modern UI Finish Header - !insertmacro MUI_UNFINISHHEADER - !endif SectionEnd \ No newline at end of file |
From: Thanh H. T. <th...@us...> - 2004-04-18 02:04:44
|
Update of /cvsroot/activelock/alugen/app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30404 Modified Files: ALUGEN.vbp frmMain.frm Log Message: Batch commit for 2.0.5--see individual module change logs for details Index: ALUGEN.vbp =================================================================== RCS file: /cvsroot/activelock/alugen/app/ALUGEN.vbp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ALUGEN.vbp 3 Nov 2003 06:48:40 -0000 1.4 +++ ALUGEN.vbp 18 Apr 2004 02:04:35 -0000 1.5 @@ -1,11 +1,13 @@ Type=Exe -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#stdole2.tlb#OLE Automation -Reference=*\G{C3B56087-6690-42ED-8914-633AA166AB41}#1.0#0#..\..\activelock\src\activelock2.dll#ActiveLock2 +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\system32\stdole2.tlb#OLE Automation +Reference=*\G{C3B56087-6690-42ED-8914-633AA166AB41}#1.0#0#C:\Program Files\ActiveLock Software Group\ActiveLock2\bin\activelock2.dll#ActiveLock2 Reference=*\G{F638FCF2-8DFD-47F0-B77A-2799D2310A82}#1.0#0#..\lib\alugen.dll#ActiveLock Universal GENerator Library 2.0 Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; MSFLXGRD.OCX Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX +Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; COMCTL32.OCX Form=frmMain.frm Module=modALUGEN; ..\lib\modALUGEN.bas +Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX IconForm="frmMain" Startup="frmMain" HelpFile="" @@ -18,7 +20,7 @@ CompatibleMode="1" MajorVer=2 MinorVer=0 -RevisionVer=4 +RevisionVer=5 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/alugen/app/frmMain.frm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- frmMain.frm 3 Nov 2003 06:48:40 -0000 1.4 +++ frmMain.frm 18 Apr 2004 02:04:35 -0000 1.5 @@ -1,11 +1,13 @@ VERSION 5.00 Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX" Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX" -Begin VB.Form frmMain +Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX" +Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" +Begin VB.Form frmMain Appearance = 0 'Flat BorderStyle = 3 'Fixed Dialog Caption = "ActiveLock Universal GENerator" - ClientHeight = 5685 + ClientHeight = 5850 ClientLeft = 45 ClientTop = 330 ClientWidth = 9735 @@ -13,17 +15,39 @@ LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False - ScaleHeight = 5685 + ScaleHeight = 5850 ScaleWidth = 9735 StartUpPosition = 3 'Windows Default - Begin TabDlg.SSTab SSTab1 - Height = 5655 + Begin ComctlLib.StatusBar sbStatus + Align = 2 'Align Bottom + Height = 255 + Left = 0 + TabIndex = 34 + Top = 5595 + Width = 9735 + _ExtentX = 17171 + _ExtentY = 450 + SimpleText = "" + _Version = 327682 + BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} + NumPanels = 1 + BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} + AutoSize = 1 + Object.Width = 17119 + Text = "Ready" + TextSave = "Ready" + Object.Tag = "" + EndProperty + EndProperty + End + Begin TabDlg.SSTab SSTab1 + Height = 5610 Left = 0 TabIndex = 0 Top = 0 Width = 9735 _ExtentX = 17171 - _ExtentY = 9975 + _ExtentY = 9895 _Version = 393216 Tabs = 2 TabHeight = 520 @@ -46,61 +70,96 @@ Tab(1).Control(1)= "frmKeyGen" Tab(1).Control(2)= "Label8" Tab(1).ControlCount= 3 - Begin VB.CommandButton cmdRemove + Begin VB.CommandButton cmdRemove Caption = "&Remove" Enabled = 0 'False Height = 315 Left = 8520 - TabIndex = 11 + TabIndex = 12 Top = 3000 Width = 1000 End - Begin VB.ComboBox cmbProds + Begin VB.ComboBox cmbProds Height = 315 Left = -73560 Style = 2 'Dropdown List - TabIndex = 15 + TabIndex = 16 Top = 480 Width = 3615 End - Begin VB.Frame frmKeyGen + Begin VB.Frame frmKeyGen BorderStyle = 0 'None - Height = 4215 + Height = 4575 Left = -74880 - TabIndex = 13 - Top = 960 + TabIndex = 14 + Top = 840 Width = 9495 - Begin VB.ComboBox cmbLicType + Begin VB.CommandButton cmdBrowse + Caption = "..." + BeginProperty Font + Name = "MS Sans Serif" + Size = 13.5 + Charset = 0 + Weight = 400 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + Height = 315 + Left = 8040 + TabIndex = 28 + ToolTipText = "Generate liberation key for the above request code (which should not be blank)." + Top = 4200 + Width = 375 + End + Begin VB.TextBox txtLibFile + Height = 315 + Left = 1320 + TabIndex = 27 + Top = 4200 + Width = 6735 + End + Begin VB.CommandButton cmdSave + Caption = "&Save" + Enabled = 0 'False + Height = 315 + Left = 8520 + TabIndex = 29 + ToolTipText = "Generate liberation key for the above request code (which should not be blank)." + Top = 4200 + Width = 975 + End + Begin VB.ComboBox cmbLicType Height = 315 ItemData = "frmMain.frx":0D02 Left = 1320 List = "frmMain.frx":0D0F Style = 2 'Dropdown List - TabIndex = 17 + TabIndex = 18 Top = 0 Width = 3615 End - Begin VB.TextBox txtDays + Begin VB.TextBox txtDays Alignment = 1 'Right Justify BackColor = &H8000000F& Height = 315 Left = 1320 Locked = -1 'True - TabIndex = 19 + TabIndex = 20 Text = "30" - Top = 285 + Top = 405 Width = 1215 End - Begin VB.TextBox txtReqCodeIn + Begin VB.TextBox txtReqCodeIn Height = 315 Left = 1320 - TabIndex = 21 - Top = 600 + TabIndex = 22 + Top = 720 Width = 7095 End - Begin VB.TextBox txtLibKey + Begin VB.TextBox txtLibKey BackColor = &H80000011& - BeginProperty Font + BeginProperty Font Name = "Courier New" Size = 8.25 Charset = 0 @@ -109,74 +168,97 @@ Italic = 0 'False Strikethrough = 0 'False EndProperty - Height = 3195 + Height = 3075 Left = 1320 Locked = -1 'True MultiLine = -1 'True ScrollBars = 2 'Vertical - TabIndex = 23 + TabIndex = 24 Text = "frmMain.frx":0D35 - Top = 960 + Top = 1080 Width = 7095 End - Begin VB.CommandButton cmdKeyGen - Caption = "Genera&te" + Begin VB.CommandButton cmdKeyGen + Caption = "&Generate" Enabled = 0 'False Height = 315 Left = 8520 - TabIndex = 24 + TabIndex = 25 ToolTipText = "Generate liberation key for the above request code (which should not be blank)." - Top = 960 + Top = 1080 Width = 975 End - Begin VB.Label lblExpiry + Begin MSComDlg.CommonDialog CommonDlg + Left = 8640 + Top = 3000 + _ExtentX = 847 + _ExtentY = 847 + _Version = 393216 + End + Begin VB.Label Label5 + Caption = "Liberation &File:" + Height = 255 + Left = 0 + TabIndex = 26 + Top = 4200 + Width = 1335 + End + Begin VB.Label lblExpiry Caption = "&Expires After:" Height = 255 Left = 0 - TabIndex = 18 - Top = 285 + TabIndex = 19 + Top = 405 Width = 1335 End - Begin VB.Label Label6 + Begin VB.Label Label6 Caption = "License &Type:" Height = 255 Left = 0 - TabIndex = 16 + TabIndex = 17 Top = 0 Width = 1335 End - Begin VB.Label Label7 + Begin VB.Label Label7 Caption = "Installation C&ode:" Height = 255 Left = 0 - TabIndex = 20 - Top = 600 + TabIndex = 21 + Top = 720 Width = 1335 End - Begin VB.Label Label12 + Begin VB.Label Label12 Caption = "Liberation &Key:" Height = 255 Left = 0 - TabIndex = 22 - Top = 960 + TabIndex = 23 + Top = 1080 Width = 1335 End - Begin VB.Label lblDays + Begin VB.Label lblDays Caption = "days" Height = 255 Left = 2640 - TabIndex = 25 - Top = 315 + TabIndex = 30 + Top = 435 Width = 1335 End End - Begin VB.Frame fraProdNew + Begin VB.Frame fraProdNew Height = 2055 Left = 120 - TabIndex = 12 + TabIndex = 13 Top = 360 Width = 9495 - Begin VB.CommandButton cmdCodeGen + Begin VB.CommandButton cmdValidate + Caption = "&Validate" + Height = 315 + Left = 8400 + TabIndex = 10 + Top = 1680 + Width = 1005 + End + Begin VB.CommandButton cmdCodeGen Caption = "&Generate" Enabled = 0 'False Height = 315 @@ -185,7 +267,7 @@ Top = 1320 Width = 1000 End - Begin VB.TextBox txtCode2 + Begin VB.TextBox txtCode2 BackColor = &H8000000F& Height = 315 Left = 5040 @@ -194,7 +276,7 @@ Top = 1320 Width = 3345 End - Begin VB.TextBox txtCode1 + Begin VB.TextBox txtCode1 BackColor = &H8000000F& Height = 315 Left = 1320 @@ -204,21 +286,21 @@ Top = 1320 Width = 3705 End - Begin VB.TextBox txtName + Begin VB.TextBox txtName Height = 315 Left = 1320 TabIndex = 2 Top = 360 Width = 3705 End - Begin VB.TextBox txtVer + Begin VB.TextBox txtVer Height = 315 Left = 1320 TabIndex = 4 Top = 720 Width = 1545 End - Begin VB.CommandButton cmdAdd + Begin VB.CommandButton cmdAdd Caption = "&Add To Product List" Enabled = 0 'False Height = 315 @@ -227,23 +309,23 @@ Top = 1680 Width = 1845 End - Begin VB.Label Label10 + Begin VB.Label Label10 Caption = "GCode" Height = 255 Left = 5040 - TabIndex = 28 + TabIndex = 33 Top = 1080 Width = 1695 End - Begin VB.Label Label9 + Begin VB.Label Label9 Caption = "VCode" Height = 255 Left = 1320 - TabIndex = 27 + TabIndex = 32 Top = 1080 Width = 1695 End - Begin VB.Label Label4 + Begin VB.Label Label4 Caption = "&Code:" Height = 375 Left = 120 @@ -251,7 +333,7 @@ Top = 1320 Width = 1095 End - Begin VB.Label Label2 + Begin VB.Label Label2 Caption = "&Name:" Height = 375 Left = 120 @@ -259,7 +341,7 @@ Top = 360 Width = 975 End - Begin VB.Label Label3 + Begin VB.Label Label3 Caption = "&Version:" Height = 375 Left = 120 @@ -268,10 +350,10 @@ Width = 1095 End End - Begin MSFlexGridLib.MSFlexGrid gridProds + Begin MSFlexGridLib.MSFlexGrid gridProds Height = 2775 Left = 120 - TabIndex = 10 + TabIndex = 11 Top = 2760 Width = 8265 _ExtentX = 14579 @@ -292,19 +374,19 @@ Appearance = 0 FormatString = $"frmMain.frx":0D78 End - Begin VB.Label Label1 + Begin VB.Label Label1 Caption = "&Product List:" Height = 255 Left = 120 - TabIndex = 26 + TabIndex = 31 Top = 2520 Width = 1215 End - Begin VB.Label Label8 + Begin VB.Label Label8 Caption = "&Product:" Height = 255 Left = -74880 - TabIndex = 14 + TabIndex = 15 Top = 480 Width = 975 End @@ -379,6 +461,16 @@ ' just ignore the event. ' 11.02.03 - th2tran - Removed License Class from ALUGEN. This setting was totally unnecessary. ' - Reworked KeyGen logic a bit, due to IALUGenerator_GenKey() change. +' 12.xx.03 - th2tran - Users uncovered another bug in alcrypto.dll that I've yet to figure out the +' cause so, for now, I've put a product code validation function to let users test +' for valid keys before accepting. +' 25.02.04 - th2tran - Save license key directly to a license file. We can then give the license file +' to the user, who will simply place it in their application directory. +' The application will automatically recognize the license file the next time it starts up. +' 17.04.04 - th2tran - Saving to license file will not be safe because we can't update the LastUsed property +' (only the user app can do that). So instead, we save the liberation key to a file +' and provide the ability automatically register upon initialization, which is being handled +' in the current IActiveLock implementation. ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -435,6 +527,21 @@ txtName.SetFocus End Sub +Private Sub cmdBrowse_Click() + On Error GoTo ErrHandler + With CommonDlg + .InitDir = Dir(txtLibFile) + .Filter = "All Files (*.*)|*.*" + .Flags = cdlOFNExplorer Or cdlOFNShareAware Or cdlOFNNoChangeDir + .CancelError = True + .ShowOpen + txtLibFile = .FileName + End With + Exit Sub +ErrHandler: + ' no change +End Sub + Private Sub cmdCodeGen_Click() If SSTab1.Tab <> 0 Then Exit Sub ' our tab not active - do nothing @@ -494,6 +601,7 @@ If SSTab1.Tab <> 1 Then Exit Sub ' our tab not active - do nothing ' get product and version Screen.MousePointer = vbHourglass + UpdateStatus "Generating license key..." On Error GoTo ErrHandler Dim arrProdVer() As String arrProdVer = Split(cmbProds, "-") @@ -530,9 +638,10 @@ strLibKey = GeneratorInstance.GenKey(Lic, txtReqCodeIn) txtLibKey = Make64ByteChunks(strLibKey) Screen.MousePointer = vbNormal + UpdateStatus "Ready" Exit Sub ErrHandler: - MsgBox "Error: " + Err.Description + UpdateStatus "Error: " + Err.Description Screen.MousePointer = vbNormal End Sub @@ -599,6 +708,52 @@ gridProds_EnterCell End Sub +Private Sub cmdSave_Click() + UpdateStatus "Saving liberation key to file..." + ' save the liberation key + SaveLiberationKey txtLibKey, txtLibFile + UpdateStatus "Liberation key saved." +End Sub + +Private Sub SaveLiberationKey(ByVal sLibKey As String, ByVal sFileName As String) + Dim hFile As Long + hFile = FreeFile + Open sFileName For Output As #hFile + Print #hFile, sLibKey + Close #hFile +End Sub + +Private Sub cmdValidate_Click() + Screen.MousePointer = vbHourglass + If txtCode1 = "" And txtCode2 = "" Then + UpdateStatus "GCode and VCode fields are blank. Nothing to validate." + Exit Sub ' nothing to validate + End If + ' Validate to keyset to make sure it's valid. + UpdateStatus "Validating keyset..." + Dim Key As RSAKey + Dim strData$: strData = "This is a test string to be signed." + Dim strSig$ + modALUGEN.rsa_createkey txtCode1, Len(txtCode1), _ + txtCode2, Len(txtCode2), Key + ' sign it + strSig = ActiveLock2.RSASign(txtCode1, txtCode2, strData) + Dim rc& + rc = ActiveLock2.RSAVerify(txtCode1, strData, strSig) + If rc = 0 Then + UpdateStatus txtName & " (" + txtVer + ") validated successfully." + Else + UpdateStatus txtName & " (" + txtVer + ") GCode-VCode mismatch!" + End If + ' It worked! We're all set to go. + modALUGEN.rsa_freekey Key + Screen.MousePointer = vbNormal +End Sub + +Private Sub UpdateStatus(Msg As String) + sbStatus.Panels(1) = Msg +End Sub + Private Sub Form_Activate() txtName.SetFocus End Sub @@ -606,6 +761,9 @@ Private Sub Form_Load() ' Initialize AL Set ActiveLock = ActiveLock2.NewInstance() + ActiveLock.KeyStoreType = alsFile + txtLibFile = App.Path & "\activelock.alb" + ' Initialize Generator Set GeneratorInstance = ALUGENLib.GeneratorInstance() GeneratorInstance.StoragePath = App.Path & "\products.ini" @@ -695,6 +853,10 @@ Debug.Print "RowColChange!!" End Sub +Private Sub txtLibKey_Change() + cmdSave.Enabled = CBool(Len(txtLibKey) > 0) +End Sub + Private Sub txtName_Change() UpdateAddButtonStatus End Sub |
From: Thanh H. T. <th...@us...> - 2004-04-18 02:02:10
|
Update of /cvsroot/activelock/alcrypto In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29992 Modified Files: RSA.C Version.rc Log Message: Batch commit for 2.0.5--see individual module change logs for details Index: RSA.C =================================================================== RCS file: /cvsroot/activelock/alcrypto/RSA.C,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- RSA.C 18 Sep 2003 03:46:59 -0000 1.2 +++ RSA.C 18 Apr 2004 02:02:00 -0000 1.3 @@ -76,6 +76,8 @@ * 07/27/03 th2tran Adapted from PuTTY project for used by the ActiveLock project. * 09/14/03 th2tran Fixed bug in byte count calculation for key blob generation that * resulted in crashing when the blobs are used to recreate the key. + * 04/10/04 th2tran Fixed bug in byte count calculation that resulted in signature + * verification mismatch. * ***********************************************************************************************/ @@ -800,7 +802,7 @@ ret = 1; - bytes = (bignum_bitcount(rsa->modulus) + 8)/ 8; + bytes = (bignum_bitcount(rsa->modulus) + 7)/ 8; /* Top (partial) byte should be zero. */ if (bignum_byte(out, bytes - 1) != 0) goto exit_label; /* First whole byte should be 1. */ Index: Version.rc =================================================================== RCS file: /cvsroot/activelock/alcrypto/Version.rc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Version.rc 18 Sep 2003 03:47:42 -0000 1.2 +++ Version.rc 18 Apr 2004 02:02:00 -0000 1.3 @@ -28,8 +28,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,2,0 - PRODUCTVERSION 2,0,2,0 + FILEVERSION 2,0,5,0 + PRODUCTVERSION 2,0,5,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x21L @@ -47,15 +47,15 @@ VALUE "Comments", "\0" VALUE "CompanyName", "ActiveLock Software Group\0" VALUE "FileDescription", "ActiveLock Cryptography Provider DLL\0" - VALUE "FileVersion", "1, 1, 0, 0\0" + VALUE "FileVersion", "2, 0, 5, 0\0" VALUE "InternalName", "ALCrypto\0" VALUE "LegalCopyright", "Copyright © 2003 ActiveLock Software Group\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "ALCrypto.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "ActiveLock\0" - VALUE "ProductVersion", "2.0.2\0" - VALUE "SpecialBuild", "alpha2\0" + VALUE "ProductVersion", "2.0.5\0" + VALUE "SpecialBuild", "alpha4\0" END END BLOCK "VarFileInfo" |
From: Thanh H. T. <th...@us...> - 2004-04-18 02:01:28
|
Update of /cvsroot/activelock/activelock/examples/mfc/res In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29915 Added Files: MFCSample.ico MFCSample.rc2 MFCSampleDoc.ico Toolbar.bmp Log Message: Batch commit for 2.0.5--see individual module change logs for details --- NEW FILE: MFCSample.ico --- --- NEW FILE: MFCSample.rc2 --- // // MFCSAMPLE.RC2 - resources Microsoft Visual C++ does not edit directly // #ifdef APSTUDIO_INVOKED #error this file is not editable by Microsoft Visual C++ #endif //APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // Add manually edited resources here... ///////////////////////////////////////////////////////////////////////////// --- NEW FILE: MFCSampleDoc.ico --- --- NEW FILE: Toolbar.bmp --- BM |
From: Thanh H. T. <th...@us...> - 2004-04-18 02:00:24
|
Update of /cvsroot/activelock/activelock/examples/mfc/res In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29698/res Log Message: Directory /cvsroot/activelock/activelock/examples/mfc/res added to the repository |
Update of /cvsroot/activelock/activelock/examples/mfc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29555 Added Files: activelock2.cpp activelock2.h LeftView.cpp LeftView.h MainFrm.cpp MainFrm.h MFCSample.cpp MFCSample.dsp MFCSample.dsw MFCSample.h MFCSample.odl MFCSample.rc MFCSample.reg MFCSampleDoc.cpp MFCSampleDoc.h MFCSampleView.cpp MFCSampleView.h ReadMe.txt Resource.h StdAfx.cpp StdAfx.h Log Message: Batch commit for 2.0.5--see individual module change logs for details --- NEW FILE: activelock2.cpp --- // Machine generated IDispatch wrapper class(es) created with ClassWizard #include "stdafx.h" #include "activelock2.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // _IActiveLock properties ///////////////////////////////////////////////////////////////////////////// // _IActiveLock operations void _IActiveLock::SetLockType(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x6803000a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long _IActiveLock::GetLockType() { long result; InvokeHelper(0x6803000a, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void _IActiveLock::SetSoftwareName(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x68030009, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } CString _IActiveLock::GetSoftwareName() { CString result; InvokeHelper(0x68030009, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void _IActiveLock::SetSoftwareCode(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x68030008, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } void _IActiveLock::SetSoftwareVersion(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x68030007, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } CString _IActiveLock::GetSoftwareVersion() { CString result; InvokeHelper(0x68030007, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void _IActiveLock::SetKeyStoreType(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x68030006, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } void _IActiveLock::SetKeyStorePath(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x68030005, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } CString _IActiveLock::GetInstallationCode(LPCTSTR User) { CString result; static BYTE parms[] = VTS_BSTR; InvokeHelper(0x68030004, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, parms, User); return result; } void _IActiveLock::SetAutoRegisterKeyPath(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x68030012, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } CString _IActiveLock::LockCode(LPDISPATCH* Lic) { CString result; static BYTE parms[] = VTS_PDISPATCH; InvokeHelper(0x6003000b, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, Lic); return result; } void _IActiveLock::Register(LPCTSTR LibKey) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x6003000c, DISPATCH_METHOD, VT_EMPTY, NULL, parms, LibKey); } CString _IActiveLock::Transfer(LPCTSTR InstallCode) { CString result; static BYTE parms[] = VTS_BSTR; InvokeHelper(0x6003000d, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, InstallCode); return result; } void _IActiveLock::Init() { InvokeHelper(0x6003000e, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void _IActiveLock::Acquire() { InvokeHelper(0x6003000f, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void _IActiveLock::Release() { InvokeHelper(0x60030010, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } LPDISPATCH _IActiveLock::GetEventNotifier() { LPDISPATCH result; InvokeHelper(0x68030003, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); return result; } long _IActiveLock::GetUsedDays() { long result; InvokeHelper(0x68030002, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } CString _IActiveLock::GetRegisteredDate() { CString result; InvokeHelper(0x68030001, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } CString _IActiveLock::GetRegisteredUser() { CString result; InvokeHelper(0x68030011, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } CString _IActiveLock::GetExpirationDate() { CString result; InvokeHelper(0x68030000, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } ///////////////////////////////////////////////////////////////////////////// // _Globals properties ///////////////////////////////////////////////////////////////////////////// // _Globals operations LPDISPATCH _Globals::NewInstance() { LPDISPATCH result; InvokeHelper(0x60030000, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL); return result; } LPDISPATCH _Globals::CreateProductLicense(LPCTSTR name, LPCTSTR Ver, LPCTSTR Code, long Flags, long LicType, LPCTSTR Licensee, LPCTSTR Expiration, LPCTSTR LicKey, LPCTSTR RegisteredDate, LPCTSTR Hash1, short MaxUsers) { LPDISPATCH result; static BYTE parms[] = VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_I2; InvokeHelper(0x60030001, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, name, Ver, Code, Flags, LicType, Licensee, Expiration, LicKey, RegisteredDate, Hash1, MaxUsers); return result; } CString _Globals::TrimNulls(LPCTSTR str) { CString result; static BYTE parms[] = VTS_BSTR; InvokeHelper(0x60030004, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, str); return result; } CString _Globals::MD5Hash(LPCTSTR str) { CString result; static BYTE parms[] = VTS_BSTR; InvokeHelper(0x60030005, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, str); return result; } CString _Globals::Base64Encode(LPCTSTR str) { CString result; static BYTE parms[] = VTS_BSTR; InvokeHelper(0x60030006, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, str); return result; } CString _Globals::Base64Decode(LPCTSTR strEncoded) { CString result; static BYTE parms[] = VTS_BSTR; InvokeHelper(0x60030007, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, strEncoded); return result; } CString _Globals::RSASign(LPCTSTR strPub, LPCTSTR strPriv, LPCTSTR strdata) { CString result; static BYTE parms[] = VTS_BSTR VTS_BSTR VTS_BSTR; InvokeHelper(0x60030008, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, strPub, strPriv, strdata); return result; } long _Globals::RSAVerify(LPCTSTR strPub, LPCTSTR strdata, LPCTSTR strSig) { long result; static BYTE parms[] = VTS_BSTR VTS_BSTR VTS_BSTR; InvokeHelper(0x60030009, DISPATCH_METHOD, VT_I4, (void*)&result, parms, strPub, strdata, strSig); return result; } ///////////////////////////////////////////////////////////////////////////// // _ProductLicense properties ///////////////////////////////////////////////////////////////////////////// // _ProductLicense operations void _ProductLicense::SetLicenseType(long* newValue) { static BYTE parms[] = VTS_PI4; InvokeHelper(0x68030013, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue); } long _ProductLicense::GetLicenseType() { long result; InvokeHelper(0x68030013, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } CString _ProductLicense::GetProductName() { CString result; InvokeHelper(0x68030012, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } CString _ProductLicense::GetProductVer() { CString result; InvokeHelper(0x68030011, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void _ProductLicense::SetProductKey(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x68030010, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } CString _ProductLicense::GetProductKey() { CString result; InvokeHelper(0x68030010, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } CString _ProductLicense::GetLicenseClass() { CString result; InvokeHelper(0x6803000f, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void _ProductLicense::SetLicensee(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x6803000e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } CString _ProductLicense::GetLicensee() { CString result; InvokeHelper(0x6803000e, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void _ProductLicense::SetLicenseKey(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x6803000d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } CString _ProductLicense::GetLicenseKey() { CString result; InvokeHelper(0x6803000d, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } CString _ProductLicense::GetExpiration() { CString result; InvokeHelper(0x6803000c, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } CString _ProductLicense::GetRegisteredDate() { CString result; InvokeHelper(0x6803000b, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } long _ProductLicense::GetMaxCount() { long result; InvokeHelper(0x6803000a, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } CString _ProductLicense::GetLastUsed() { CString result; InvokeHelper(0x68030009, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } CString _ProductLicense::GetHash1() { CString result; InvokeHelper(0x68030008, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } CString _ProductLicense::ToString() { CString result; InvokeHelper(0x60030014, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL); return result; } void _ProductLicense::Load(LPCTSTR strLic) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x60030015, DISPATCH_METHOD, VT_EMPTY, NULL, parms, strLic); } void _ProductLicense::Save(BSTR* strOut) { static BYTE parms[] = VTS_PBSTR; InvokeHelper(0x60030016, DISPATCH_METHOD, VT_EMPTY, NULL, parms, strOut); } ///////////////////////////////////////////////////////////////////////////// // _ActiveLockEventNotifier properties ///////////////////////////////////////////////////////////////////////////// // _ActiveLockEventNotifier operations ///////////////////////////////////////////////////////////////////////////// // __ActiveLockEventNotifier properties ///////////////////////////////////////////////////////////////////////////// // __ActiveLockEventNotifier operations void __ActiveLockEventNotifier::ValidateValue(BSTR* Value) { static BYTE parms[] = VTS_PBSTR; InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Value); } --- NEW FILE: activelock2.h --- /** * ActiveLock 2 * Copyright 2004 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /********************************************************************************************** * Change Log * ========== * * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- * 04/11/04 th2tran Created * ***********************************************************************************************/ // Machine generated IDispatch wrapper class(es) created with ClassWizard ///////////////////////////////////////////////////////////////////////////// // _IActiveLock wrapper class class _IActiveLock : public COleDispatchDriver { public: _IActiveLock() {} // Calls COleDispatchDriver default constructor _IActiveLock(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} _IActiveLock(const _IActiveLock& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} // Attributes public: // Operations public: void SetLockType(long nNewValue); long GetLockType(); void SetSoftwareName(LPCTSTR lpszNewValue); CString GetSoftwareName(); void SetSoftwareCode(LPCTSTR lpszNewValue); void SetSoftwareVersion(LPCTSTR lpszNewValue); CString GetSoftwareVersion(); void SetKeyStoreType(long nNewValue); void SetKeyStorePath(LPCTSTR lpszNewValue); CString GetInstallationCode(LPCTSTR User); void SetAutoRegisterKeyPath(LPCTSTR lpszNewValue); CString LockCode(LPDISPATCH* Lic); void Register(LPCTSTR LibKey); CString Transfer(LPCTSTR InstallCode); void Init(); void Acquire(); void Release(); LPDISPATCH GetEventNotifier(); long GetUsedDays(); CString GetRegisteredDate(); CString GetRegisteredUser(); CString GetExpirationDate(); }; ///////////////////////////////////////////////////////////////////////////// // _Globals wrapper class class _Globals : public COleDispatchDriver { public: _Globals() {} // Calls COleDispatchDriver default constructor _Globals(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} _Globals(const _Globals& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} // Attributes public: // Operations public: LPDISPATCH NewInstance(); LPDISPATCH CreateProductLicense(LPCTSTR name, LPCTSTR Ver, LPCTSTR Code, long Flags, long LicType, LPCTSTR Licensee, LPCTSTR Expiration, LPCTSTR LicKey, LPCTSTR RegisteredDate, LPCTSTR Hash1, short MaxUsers); CString TrimNulls(LPCTSTR str); CString MD5Hash(LPCTSTR str); CString Base64Encode(LPCTSTR str); CString Base64Decode(LPCTSTR strEncoded); CString RSASign(LPCTSTR strPub, LPCTSTR strPriv, LPCTSTR strdata); long RSAVerify(LPCTSTR strPub, LPCTSTR strdata, LPCTSTR strSig); }; ///////////////////////////////////////////////////////////////////////////// // _ProductLicense wrapper class class _ProductLicense : public COleDispatchDriver { public: _ProductLicense() {} // Calls COleDispatchDriver default constructor _ProductLicense(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} _ProductLicense(const _ProductLicense& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} // Attributes public: // Operations public: void SetLicenseType(long* newValue); long GetLicenseType(); CString GetProductName(); CString GetProductVer(); void SetProductKey(LPCTSTR lpszNewValue); CString GetProductKey(); CString GetLicenseClass(); void SetLicensee(LPCTSTR lpszNewValue); CString GetLicensee(); void SetLicenseKey(LPCTSTR lpszNewValue); CString GetLicenseKey(); CString GetExpiration(); CString GetRegisteredDate(); long GetMaxCount(); CString GetLastUsed(); CString GetHash1(); CString ToString(); void Load(LPCTSTR strLic); void Save(BSTR* strOut); }; ///////////////////////////////////////////////////////////////////////////// // _ActiveLockEventNotifier wrapper class class _ActiveLockEventNotifier : public COleDispatchDriver { public: _ActiveLockEventNotifier() {} // Calls COleDispatchDriver default constructor _ActiveLockEventNotifier(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} _ActiveLockEventNotifier(const _ActiveLockEventNotifier& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} // Attributes public: // Operations public: }; ///////////////////////////////////////////////////////////////////////////// // __ActiveLockEventNotifier wrapper class class __ActiveLockEventNotifier : public COleDispatchDriver { public: __ActiveLockEventNotifier() {} // Calls COleDispatchDriver default constructor __ActiveLockEventNotifier(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {} __ActiveLockEventNotifier(const __ActiveLockEventNotifier& dispatchSrc) : COleDispatchDriver(dispatchSrc) {} // Attributes public: // Operations public: void ValidateValue(BSTR* Value); }; --- NEW FILE: LeftView.cpp --- /** * ActiveLock 2 * Copyright 2004 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* * LeftView.cpp : implementation of the CLeftView class */ /********************************************************************************************** * Change Log * ========== * * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- * 04/11/04 th2tran Created * ***********************************************************************************************/ #include "stdafx.h" #include "MFCSample.h" #include "MFCSampleDoc.h" #include "LeftView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CLeftView IMPLEMENT_DYNCREATE(CLeftView, CTreeView) BEGIN_MESSAGE_MAP(CLeftView, CTreeView) //{{AFX_MSG_MAP(CLeftView) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAP // Standard printing commands ON_COMMAND(ID_FILE_PRINT, CTreeView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_DIRECT, CTreeView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_PREVIEW, CTreeView::OnFilePrintPreview) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CLeftView construction/destruction CLeftView::CLeftView() { // TODO: add construction code here } CLeftView::~CLeftView() { } BOOL CLeftView::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return CTreeView::PreCreateWindow(cs); } ///////////////////////////////////////////////////////////////////////////// // CLeftView drawing void CLeftView::OnDraw(CDC* pDC) { CMFCSampleDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here } ///////////////////////////////////////////////////////////////////////////// // CLeftView printing BOOL CLeftView::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo); } void CLeftView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing } void CLeftView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing } void CLeftView::OnInitialUpdate() { CTreeView::OnInitialUpdate(); // TODO: You may populate your TreeView with items by directly accessing // its tree control through a call to GetTreeCtrl(). } ///////////////////////////////////////////////////////////////////////////// // CLeftView diagnostics #ifdef _DEBUG void CLeftView::AssertValid() const { CTreeView::AssertValid(); } void CLeftView::Dump(CDumpContext& dc) const { CTreeView::Dump(dc); } CMFCSampleDoc* CLeftView::GetDocument() // non-debug version is inline { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMFCSampleDoc))); return (CMFCSampleDoc*)m_pDocument; } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CLeftView message handlers --- NEW FILE: LeftView.h --- /** * ActiveLock 2 * Copyright 2004 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /********************************************************************************************** * Change Log * ========== * * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- * 04/11/04 th2tran Created * ***********************************************************************************************/ // LeftView.h : interface of the CLeftView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_LEFTVIEW_H__DDEDD8C6_C35B_4816_9720_A2E5C8F511BB__INCLUDED_) #define AFX_LEFTVIEW_H__DDEDD8C6_C35B_4816_9720_A2E5C8F511BB__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CMFCSampleDoc; class CLeftView : public CTreeView { protected: // create from serialization only CLeftView(); DECLARE_DYNCREATE(CLeftView) // Attributes public: CMFCSampleDoc* GetDocument(); // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CLeftView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnInitialUpdate(); // called first time after construct //}}AFX_VIRTUAL // Implementation public: virtual ~CLeftView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CLeftView) // NOTE - the ClassWizard will add and remove member functions here. // DO NOT EDIT what you see in these blocks of generated code ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in LeftView.cpp inline CMFCSampleDoc* CLeftView::GetDocument() { return (CMFCSampleDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_LEFTVIEW_H__DDEDD8C6_C35B_4816_9720_A2E5C8F511BB__INCLUDED_) --- NEW FILE: MainFrm.cpp --- /** * ActiveLock 2 * Copyright 2004 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* * MainFrm.cpp : implementation of the CMainFrame class */ /********************************************************************************************** * Change Log * ========== * * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- * 04/11/04 th2tran Created * ***********************************************************************************************/ #include "stdafx.h" #include "MFCSample.h" #include "MainFrm.h" #include "LeftView.h" #include "MFCSampleView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMainFrame IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) //{{AFX_MSG_MAP(CMainFrame) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code ! ON_WM_CREATE() //}}AFX_MSG_MAP ON_UPDATE_COMMAND_UI_RANGE(AFX_ID_VIEW_MINIMUM, AFX_ID_VIEW_MAXIMUM, OnUpdateViewStyles) ON_COMMAND_RANGE(AFX_ID_VIEW_MINIMUM, AFX_ID_VIEW_MAXIMUM, OnViewStyle) END_MESSAGE_MAP() static UINT indicators[] = { ID_SEPARATOR, // status line indicator ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL, }; ///////////////////////////////////////////////////////////////////////////// // CMainFrame construction/destruction CMainFrame::CMainFrame() { // TODO: add member initialization code here } CMainFrame::~CMainFrame() { } int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) { TRACE0("Failed to create toolbar\n"); return -1; // fail to create } if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } // TODO: Delete these three lines if you don't want the toolbar to // be dockable m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_wndToolBar); return 0; } BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) { // create splitter window if (!m_wndSplitter.CreateStatic(this, 1, 2)) return FALSE; if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(100, 100), pContext) || !m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CMFCSampleView), CSize(100, 100), pContext)) { m_wndSplitter.DestroyWindow(); return FALSE; } return TRUE; } BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CMainFrame diagnostics #ifdef _DEBUG void CMainFrame::AssertValid() const { CFrameWnd::AssertValid(); } void CMainFrame::Dump(CDumpContext& dc) const { CFrameWnd::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CMainFrame message handlers CMFCSampleView* CMainFrame::GetRightPane() { CWnd* pWnd = m_wndSplitter.GetPane(0, 1); CMFCSampleView* pView = DYNAMIC_DOWNCAST(CMFCSampleView, pWnd); return pView; } void CMainFrame::OnUpdateViewStyles(CCmdUI* pCmdUI) { // TODO: customize or extend this code to handle choices on the // View menu. CMFCSampleView* pView = GetRightPane(); // if the right-hand pane hasn't been created or isn't a view, // disable commands in our range if (pView == NULL) pCmdUI->Enable(FALSE); else { DWORD dwStyle = pView->GetStyle() & LVS_TYPEMASK; // if the command is ID_VIEW_LINEUP, only enable command // when we're in LVS_ICON or LVS_SMALLICON mode if (pCmdUI->m_nID == ID_VIEW_LINEUP) { if (dwStyle == LVS_ICON || dwStyle == LVS_SMALLICON) pCmdUI->Enable(); else pCmdUI->Enable(FALSE); } else { // otherwise, use dots to reflect the style of the view pCmdUI->Enable(); BOOL bChecked = FALSE; switch (pCmdUI->m_nID) { case ID_VIEW_DETAILS: bChecked = (dwStyle == LVS_REPORT); break; case ID_VIEW_SMALLICON: bChecked = (dwStyle == LVS_SMALLICON); break; case ID_VIEW_LARGEICON: bChecked = (dwStyle == LVS_ICON); break; case ID_VIEW_LIST: bChecked = (dwStyle == LVS_LIST); break; default: bChecked = FALSE; break; } pCmdUI->SetRadio(bChecked ? 1 : 0); } } } void CMainFrame::OnViewStyle(UINT nCommandID) { // TODO: customize or extend this code to handle choices on the // View menu. CMFCSampleView* pView = GetRightPane(); // if the right-hand pane has been created and is a CMFCSampleView, // process the menu commands... if (pView != NULL) { DWORD dwStyle = -1; switch (nCommandID) { case ID_VIEW_LINEUP: { // ask the list control to snap to grid CListCtrl& refListCtrl = pView->GetListCtrl(); refListCtrl.Arrange(LVA_SNAPTOGRID); } break; // other commands change the style on the list control case ID_VIEW_DETAILS: dwStyle = LVS_REPORT; break; case ID_VIEW_SMALLICON: dwStyle = LVS_SMALLICON; break; case ID_VIEW_LARGEICON: dwStyle = LVS_ICON; break; case ID_VIEW_LIST: dwStyle = LVS_LIST; break; } // change the style; window will repaint automatically if (dwStyle != -1) pView->ModifyStyle(LVS_TYPEMASK, dwStyle); } } --- NEW FILE: MainFrm.h --- /** * ActiveLock 2 * Copyright 2004 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /********************************************************************************************** * Change Log * ========== * * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- * 04/11/04 th2tran Created * ***********************************************************************************************/ // MainFrm.h : interface of the CMainFrame class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_MAINFRM_H__9EE8E3EE_C575_43F2_A1D0_7383E048BF02__INCLUDED_) #define AFX_MAINFRM_H__9EE8E3EE_C575_43F2_A1D0_7383E048BF02__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CMFCSampleView; class CMainFrame : public CFrameWnd { protected: // create from serialization only CMainFrame(); DECLARE_DYNCREATE(CMainFrame) // Attributes protected: CSplitterWnd m_wndSplitter; public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMainFrame) public: virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); virtual BOOL PreCreateWindow(CREATESTRUCT& cs); //}}AFX_VIRTUAL // Implementation public: virtual ~CMainFrame(); CMFCSampleView* GetRightPane(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // control bar embedded members CStatusBar m_wndStatusBar; CToolBar m_wndToolBar; // Generated message map functions protected: //{{AFX_MSG(CMainFrame) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); // NOTE - the ClassWizard will add and remove member functions here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG afx_msg void OnUpdateViewStyles(CCmdUI* pCmdUI); afx_msg void OnViewStyle(UINT nCommandID); DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_MAINFRM_H__9EE8E3EE_C575_43F2_A1D0_7383E048BF02__INCLUDED_) --- NEW FILE: MFCSample.cpp --- /** * ActiveLock 2 * Copyright 2004 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* * Sample MFC Application. */ /********************************************************************************************** * Change Log * ========== * * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- * 04/11/04 th2tran Created * ***********************************************************************************************/ #include "stdafx.h" #include "MFCSample.h" #include "MainFrm.h" #include "MFCSampleDoc.h" #include "LeftView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMFCSampleApp BEGIN_MESSAGE_MAP(CMFCSampleApp, CWinApp) //{{AFX_MSG_MAP(CMFCSampleApp) ON_COMMAND(ID_APP_ABOUT, OnAppAbout) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAP // Standard file based document commands ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) // Standard print setup command ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CMFCSampleApp construction CMFCSampleApp::CMFCSampleApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } ///////////////////////////////////////////////////////////////////////////// // The one and only CMFCSampleApp object CMFCSampleApp theApp; // This identifier was generated to be statistically unique for your app. // You may change it if you prefer to choose a specific identifier. // {7800A88E-6BCD-4BF7-B830-C8B3002AADC7} static const CLSID clsid = { 0x7800a88e, 0x6bcd, 0x4bf7, { 0xb8, 0x30, 0xc8, 0xb3, 0x0, 0x2a, 0xad, 0xc7 } }; ///////////////////////////////////////////////////////////////////////////// // CMFCSampleApp initialization BOOL CMFCSampleApp::InitInstance() { // Initialize OLE libraries if (!AfxOleInit()) { AfxMessageBox(IDP_OLE_INIT_FAILED); return FALSE; } AfxEnableControlContainer(); // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif // Change the registry key under which our settings are stored. // TODO: You should modify this string to be something appropriate // such as the name of your company or organization. SetRegistryKey(_T("Local AppWizard-Generated Applications")); LoadStdProfileSettings(); // Load standard INI file options (including MRU) // Register the application's document templates. Document templates // serve as the connection between documents, frame windows and views. CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CMFCSampleDoc), RUNTIME_CLASS(CMainFrame), // main SDI frame window RUNTIME_CLASS(CLeftView)); AddDocTemplate(pDocTemplate); // Connect the COleTemplateServer to the document template. // The COleTemplateServer creates new documents on behalf // of requesting OLE containers by using information // specified in the document template. m_server.ConnectTemplate(clsid, pDocTemplate, TRUE); // Note: SDI applications register server objects only if /Embedding // or /Automation is present on the command line. // Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); // Check to see if launched as OLE server if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated) { // Register all OLE server (factories) as running. This enables the // OLE libraries to create objects from other applications. COleTemplateServer::RegisterAll(); // Application was run with /Embedding or /Automation. Don't show the // main window in this case. return TRUE; } // When a server application is launched stand-alone, it is a good idea // to update the system registry in case it has been damaged. m_server.UpdateRegistry(OAT_DISPATCH_OBJECT); COleObjectFactory::UpdateRegistryAll(); // Dispatch commands specified on the command line if (!ProcessShellCommand(cmdInfo)) return FALSE; // The one and only window has been initialized, so show and update it. m_pMainWnd->ShowWindow(SW_SHOW); m_pMainWnd->UpdateWindow(); // ActiveLock initialization _Globals* alGlobals; // Obtain IActiveLock Instance alGlobals = new _Globals(); alGlobals->CreateDispatch(_T("ActiveLock2.Globals")); m_ActiveLock = alGlobals->NewInstance(); // Initialize ActiveLock properties m_ActiveLock.SetSoftwareName(_T("TestApp")); m_ActiveLock.SetSoftwareVersion(_T("1.0")); m_ActiveLock.SetSoftwareCode(_T("AAAAB3NzaC1yc2EAAAABJQAAAIB8/B2KWoai2WSGTRPcgmMoczeXpd8nv0Y4r1sJ1wV3vH21q4rTpEYuBiD4HFOpkbNBSRdpBHJGWec7jUi8ISV0pM6i2KznjhCms5CEtYHRybbiYvRXleGzFsAAP817PLN3JYo3WkErT2ofR5RCkfhmx060BT8waPoqnn3AB7sZ0Q==")); m_ActiveLock.SetLockType(0); // lockToNone try { m_ActiveLock.SetKeyStoreType(1); // alsFile m_ActiveLock.SetKeyStorePath(_T("c:\\al.lic")); // This could raise an error if al.lic doesn't exist m_ActiveLock.SetAutoRegisterKeyPath(_T("c:\\testapp.alb")); m_ActiveLock.Init(); // Initialize the instance m_ActiveLock.Acquire(); // Check to see if we have a valid license } catch (CException* ce) { ce->ReportError(); m_ActiveLock = NULL; alGlobals = NULL; return FALSE; } catch (...) { AfxMessageBox("I don't know what happened, but it crashed. Have a nice day!"); return FALSE; } return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CAboutDlg dialog used for App About class CAboutDlg : public CDialog { public: CAboutDlg(); // Dialog Data //{{AFX_DATA(CAboutDlg) enum { IDD = IDD_ABOUTBOX }; //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAboutDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: //{{AFX_MSG(CAboutDlg) // No message handlers //}}AFX_MSG DECLARE_MESSAGE_MAP() }; CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) { //{{AFX_DATA_INIT(CAboutDlg) //}}AFX_DATA_INIT } void CAboutDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAboutDlg) //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) //{{AFX_MSG_MAP(CAboutDlg) // No message handlers //}}AFX_MSG_MAP END_MESSAGE_MAP() // App command to run the dialog void CMFCSampleApp::OnAppAbout() { CAboutDlg aboutDlg; aboutDlg.DoModal(); } ///////////////////////////////////////////////////////////////////////////// // CMFCSampleApp message handlers --- NEW FILE: MFCSample.dsp --- # Microsoft Developer Studio Project File - Name="MFCSample" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 CFG=MFCSample - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "MFCSample.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "MFCSample.mak" CFG="MFCSample - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "MFCSample - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "MFCSample - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "MFCSample - Win32 Release" # PROP BASE Use_MFC 6 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 6 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" # ADD RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 # ADD LINK32 /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "MFCSample - Win32 Debug" # PROP BASE Use_MFC 6 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 6 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" # ADD RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "MFCSample - Win32 Release" # Name "MFCSample - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\activelock2.cpp # End Source File # Begin Source File SOURCE=.\LeftView.cpp # End Source File # Begin Source File SOURCE=.\MainFrm.cpp # End Source File # Begin Source File SOURCE=.\MFCSample.cpp # End Source File # Begin Source File SOURCE=.\MFCSample.odl # End Source File # Begin Source File SOURCE=.\MFCSample.rc # End Source File # Begin Source File SOURCE=.\MFCSampleDoc.cpp # End Source File # Begin Source File SOURCE=.\MFCSampleView.cpp # End Source File # Begin Source File SOURCE=.\StdAfx.cpp # ADD CPP /Yc"stdafx.h" # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\activelock2.h # End Source File # Begin Source File SOURCE=.\LeftView.h # End Source File # Begin Source File SOURCE=.\MainFrm.h # End Source File # Begin Source File SOURCE=.\MFCSample.h # End Source File # Begin Source File SOURCE=.\MFCSampleDoc.h # End Source File # Begin Source File SOURCE=.\MFCSampleView.h # End Source File # Begin Source File SOURCE=.\Resource.h # End Source File # Begin Source File SOURCE=.\StdAfx.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # Begin Source File SOURCE=.\res\MFCSample.ico # End Source File # Begin Source File SOURCE=.\res\MFCSample.rc2 # End Source File # Begin Source File SOURCE=.\res\MFCSampleDoc.ico # End Source File # Begin Source File SOURCE=.\res\Toolbar.bmp # End Source File # End Group # Begin Source File SOURCE=.\MFCSample.reg # End Source File # Begin Source File SOURCE=.\ReadMe.txt # End Source File # End Target # End Project --- NEW FILE: MFCSample.dsw --- Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "MFCSample"=.\MFCSample.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### --- NEW FILE: MFCSample.h --- /** * ActiveLock 2 * Copyright 2004 The ActiveLock Software Group (ASG) * Portions Copyright by Simon Tatham and the PuTTY project. * * All material is the property of the contributing authors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * [o] Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * [o] Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /********************************************************************************************** * Change Log * ========== * * Date (MM/DD/YY) Author Description * --------------- ----------- -------------------------------------------------------------- * 04/11/04 th2tran Created * ***********************************************************************************************/ // MFCSample.h : main header file for the MFCSAMPLE application // #if !defined(AFX_MFCSAMPLE_H__96D514BA_5632_4EAB_B077_BF8616FB909A__INCLUDED_) #define AFX_MFCSAMPLE_H__96D514BA_5632_4EAB_B077_BF8616FB909A__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif #include "resource.h" // main symbols #include "activelock2.h" // ActiveLock object model ///////////////////////////////////////////////////////////////////////////// // CMFCSampleApp: // See MFCSample.cpp for the implementation of this class // class CMFCSampleApp : public CWinApp { public: CMFCSampleApp(); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMFCSampleApp) public: virtual BOOL InitInstance(); //}}AFX_VIRTUAL // Implementation COleTemplateServer m_server; _IActiveLock m_ActiveLock; // Server object for document creation //{{AFX_MSG(CMFCSampleApp) afx_msg void OnAppAbout(); // NOTE - the ClassWizard will add and remove member functions here. // DO NOT EDIT what you see in these blocks of generated code ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_MFCSAMPLE_H__96D514BA_5632_4EAB_B077_BF8616FB909A__INCLUDED_) --- NEW FILE: MFCSample.odl --- // MFCSample.odl : type library source for MFCSample.exe // This file will be processed by the MIDL compiler to produce the // type library (MFCSample.tlb). [ uuid(772F8E2A-126C-438A-B757-AD4D0372BA4B), version(1.0) ] library MFCSample { importlib("stdole32.tlb"); importlib("stdole2.tlb"); // Primary dispatch interface for CMFCSampleDoc [ uuid(DA41DF8A-D079-4E0F-B89D-952995E7118F) ] dispinterface IMFCSample { properties: // NOTE - ClassWizard will maintain property information here. // Use extreme caution when editing this section. //{{AFX_ODL_PROP(CMFCSampleDoc) //}}AFX_ODL_PROP methods: // NOTE - ClassWizard will maintain method information here. // Use extreme caution when editing this section. //{{AFX_ODL_METHOD(CMFCSampleDoc) //}}AFX_ODL_METHOD }; // Class information for CMFCSampleDoc [ uuid(7800A88E-6BCD-4BF7-B830-C8B3002AADC7) ] coclass Document { [default] dispinterface IMFCSample; }; //{{AFX_APPEND_ODL}} //}}AFX_APPEND_ODL}} }; --- NEW FILE: MFCSample.rc --- //Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON DISCARDABLE "res\\MFCSample.ico" IDR_MFCSAMTYPE ICON DISCARDABLE "res\\MFCSampleDoc.ico" ///////////////////////////////////////////////////////////////////////////// // // Bitmap // IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" ///////////////////////////////////////////////////////////////////////////// // // Toolbar // IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 15 BEGIN BUTTON ID_FILE_NEW BUTTON ID_FILE_OPEN BUTTON ID_FILE_SAVE SEPARATOR BUTTON ID_EDIT_CUT BUTTON ID_EDIT_COPY BUTTON ID_EDIT_PASTE SEPARATOR BUTTON ID_FILE_PRINT SEPARATOR BUTTON ID_VIEW_LARGEICON BUTTON ID_VIEW_SMALLICON BUTTON ID_VIEW_LIST BUTTON ID_VIEW_DETAILS SEPARATOR BUTTON ID_APP_ABOUT END ///////////////////////////////////////////////////////////////////////////// // // Menu // IDR_MAINFRAME MENU PRELOAD DISCARDABLE BEGIN POPUP "&File" BEGIN MENUITEM "&New\tCtrl+N", ID_FILE_NEW MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN MENUITEM "&Save\tCtrl+S", ID_FILE_SAVE MENUITEM "Save &As...", ID_FILE_SAVE_AS MENUITEM SEPARATOR MENUITEM "&Print...\tCtrl+P", ID_FILE_PRINT MENUITEM "Print Pre&view", ID_FILE_PRINT_PREVIEW MENUITEM "P&rint Setup...", ID_FILE_PRINT_SETUP MENUITEM SEPARATOR MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED MENUITEM SEPARATOR MENUITEM "E&xit", ID_APP_EXIT END POPUP "&Edit" BEGIN MENUITEM "&Undo\tCtrl+Z", ID_EDIT_UNDO MENUITEM SEPARATOR MENUITEM "Cu&t\tCtrl+X", ID_EDIT_CUT MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY MENUITEM "&Paste\tCtrl+V", ID_EDIT_PASTE END POPUP "&View" BEGIN MENUITEM "&Toolbar", ID_VIEW_TOOLBAR MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR END POPUP "&Help" BEGIN MENUITEM "&About MFCSample...", ID_APP_ABOUT END END ///////////////////////////////////////////////////////////////////////////// // // Accelerator // IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE BEGIN "N", ID_FILE_NEW, VIRTKEY, CONTROL "O", ID_FILE_OPEN, VIRTKEY, CONTROL "S", ID_FILE_SAVE, VIRTKEY, CONTROL "P", ID_FILE_PRINT, VIRTKEY, CONTROL "Z", ID_EDIT_UNDO, VIRTKEY, CONTROL "X", ID_EDIT_CUT, VIRTKEY, CONTROL "C", ID_EDIT_COPY, VIRTKEY, CONTROL "V", ID_EDIT_PASTE, VIRTKEY, CONTROL VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT VK_F6, ID_NEXT_PANE, VIRTKEY VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT END ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About MFCSample" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 LTEXT "MFCSample Version 1.0",IDC_STATIC,40,10,119,8, SS_NOPREFIX LTEXT "Copyright (C) 2004",IDC_STATIC,40,25,119,8 DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP END #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904B0" BEGIN VALUE "CompanyName", "\0" ... [truncated message content] |
From: Thanh H. T. <th...@us...> - 2004-04-18 01:56:51
|
Update of /cvsroot/activelock/activelock/examples/mfc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29050/mfc Log Message: Directory /cvsroot/activelock/activelock/examples/mfc added to the repository |
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 '' |
From: Thanh H. T. <th...@us...> - 2004-04-18 01:52:40
|
Update of /cvsroot/activelock/activelock/src/vbdox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28510 Modified Files: ActiveLock2.vbp Log Message: Batch commit for 2.0.5--see individual module change logs for details Index: ActiveLock2.vbp =================================================================== RCS file: /cvsroot/activelock/activelock/src/vbdox/ActiveLock2.vbp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ActiveLock2.vbp 13 Oct 2003 05:01:08 -0000 1.2 +++ ActiveLock2.vbp 18 Apr 2004 01:52:32 -0000 1.3 @@ -15,9 +15,9 @@ CompatibleEXE32="ActiveLock2.dll" MajorVer=2 MinorVer=0 -RevisionVer=3 +RevisionVer=5 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" -VersionLegalCopyright="Copyright © 2003" +VersionLegalCopyright="Copyright © 2003-2004" VersionProductName="ActiveLock" \ No newline at end of file |
From: Thanh H. T. <th...@us...> - 2004-04-18 01:52:06
|
Update of /cvsroot/activelock/activelock/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28398 Modified Files: activelock2.dll alcrypto.dll alutil.dll Log Message: Batch commit for 2.0.5--see individual module change logs for details Index: activelock2.dll =================================================================== RCS file: /cvsroot/activelock/activelock/bin/activelock2.dll,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 Binary files /tmp/cvsWlgMdZ and /tmp/cvsaI3Wif differ Index: alcrypto.dll =================================================================== RCS file: /cvsroot/activelock/activelock/bin/alcrypto.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsN61nP2 and /tmp/cvsh315Xi differ Index: alutil.dll =================================================================== RCS file: /cvsroot/activelock/activelock/bin/alutil.dll,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 Binary files /tmp/cvsMiCjKc and /tmp/cvsTtXtXs differ |
From: Thanh H. T. <th...@us...> - 2004-04-18 01:50:56
|
Update of /cvsroot/activelock/activelock/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28263 Modified Files: ActiveLock.cls ActiveLock2.vbp ActiveLockEventNotifier.cls FileKeyStore.cls Globals.cls IActiveLock.cls modActiveLock.bas ProductLicense.cls Log Message: Batch commit for 2.0.5--see individual module change logs for details Index: ActiveLock.cls =================================================================== RCS file: /cvsroot/activelock/activelock/src/ActiveLock.cls,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ActiveLock.cls 4 Nov 2003 07:41:19 -0000 1.8 +++ ActiveLock.cls 18 Apr 2004 01:50:46 -0000 1.9 @@ -13,7 +13,7 @@ Attribute VB_Exposed = False '* ActiveLock '* Copyright 1998-2002 Nelson Ferraz -'* Copyright 2003 The ActiveLock Software Group (ASG) +'* Copyright 2003-2004 The ActiveLock Software Group (ASG) '* All material is the property of the contributing authors. '* '* Redistribution and use in source and binary forms, with or without @@ -84,6 +84,17 @@ ' hashing an empty string. ' 11.02.03 - th2tran - alcrypto.dll now resides in the Windows System directory ' - IActiveLock_Transfer raise alerrNotImplemented error until we get this implemented +' 02.24.04 - th2tran - Fixed bug: mismatched logic between IActiveLock.LockCode() and ALUGENLib.Generator#GenKey() +' implementations caused the key validation process to fail for keys generated +' from blank LockCode. +' 02.25.04 - th2tran - Changed IActiveLock_Register() not to validate the license (leave this task to IActiveLock_Acquire()). +' This allows ALUGEN to use this method to save the generated license key to the license file. +' Potentially, with this approach we can do away with handing liberation keys to the users. +' Instead, we would be handing them a license file to plop into their application directory...a much simplier +' process than manually registering the liberation key. +' 04.17.04 - th2tran - Rolled back changes from 02.25.04. The above implementation smalll breached in security: +' User can blank out the LastUsed property, set their clock back and continue to use an otherwise-expired +' license. ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -105,6 +116,8 @@ Private MyNotifier As New ActiveLockEventNotifier Private MyGlobals As New Globals +Private mLibKeyPath As String + ' Registry hive used to store Active Lock settings. Private Const AL_REGISTRY_HIVE$ = "Software\ActiveLock Software Group\ActiveLock2" @@ -116,18 +129,25 @@ ''' ' IActiveLock Interface implementations '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +Private Property Let IActiveLock_AutoRegisterKeyPath(ByVal RHS As String) + mLibKeyPath = RHS +End Property +Private Property Get AutoRegisterKeyPath() As String + AutoRegisterKeyPath = mLibKeyPath +End Property + Private Property Get IActiveLock_EventNotifier() As ActiveLockEventNotifier Set IActiveLock_EventNotifier = MyNotifier End Property -Private Sub IActiveLock_Init(Arg1 As Variant, ParamArray OtherArgs() As Variant) +Private Sub IActiveLock_Init() ' If running in Debug mode, don't bother with dll authentication #If AL_DEBUG = 1 Then GoTo Done #End If ' Checksum ALCrypto.dll - Const ALCRYPTO_MD5$ = "1941fefd79fed9403e24f3d7fd76ae13" + Const ALCRYPTO_MD5$ = "be299ad0f52858fdd9ea3626468dc05c" Dim strdata As String, strMD5 As String Call modActiveLock.ReadFile(WinSysDir() & "\alcrypto.dll", strdata) strMD5 = modMD5.Hash(strdata) ' use our own MD5 hashing routine instead of ALCrypto's md5_hash() function. @@ -135,10 +155,34 @@ If strMD5 <> ALCRYPTO_MD5 Then Err.Raise ActiveLockErrCodeConstants.alerrFileTampered, "IActiveLock_Acquire", "alcrypto.dll has been tampered." End If + ' Perform automatic license registration + If AutoRegisterKeyPath <> "" Then DoAutoRegistration Done: mfInit = True End Sub +'' +' Check the specified path to see if +Private Sub DoAutoRegistration() + ' Don't bother to proceed unless the file is there. + If Not FileExists(AutoRegisterKeyPath) Then Exit Sub + + Dim strLibKey As String + ReadLibKey AutoRegisterKeyPath, strLibKey + IActiveLock_Register strLibKey + ' If registration is successful, delete the liberation file so we won't register the same file on next startup + Kill AutoRegisterKeyPath +End Sub +Private Sub ReadLibKey(ByVal sFileName As String, ByRef strLibKey As String) + Dim hFile As Long + hFile = FreeFile + Open sFileName For Input As #hFile + On Error GoTo Finally + strLibKey = Input$(LOF(hFile), hFile) +Finally: + Close #hFile +End Sub + Private Sub IActiveLock_Acquire() If mKeyStore Is Nothing Then Err.Raise ActiveLockErrCodeConstants.alerrKeyStoreInvalid, "IActiveLock_Acquire", "Key Store Provider hasn't been initialized yet." @@ -188,13 +232,15 @@ Dim Key As RSAKey Dim strPubKey As String strPubKey = mSoftwareCode + Dim strSig As String Dim strLic As String Dim strLicKey As String strLic = IActiveLock_LockCode(Lic) strLicKey = Lic.LicenseKey - + + ' decode the license key strSig = MyGlobals.Base64Decode(strLicKey) ' Print out some info for debugging purposes @@ -278,14 +324,14 @@ ' TODO: Implement Me! End Sub -Private Property Let IActiveLock_KeyStorePath(RHS As String) +Private Property Let IActiveLock_KeyStorePath(ByVal RHS As String) If Not mKeyStore Is Nothing Then mKeyStore.KeyStorePath = RHS End If mKeyStorePath = RHS End Property -Private Property Let IActiveLock_KeyStoreType(RHS As LicStoreType) +Private Property Let IActiveLock_KeyStoreType(ByVal RHS As LicStoreType) ' Instantiate Key Store Provider If RHS = alsFile Then Set mKeyStore = New FileKeyStoreProvider @@ -298,7 +344,7 @@ End If End Property -Private Property Let IActiveLock_LockType(RHS As ALLockTypes) +Private Property Let IActiveLock_LockType(ByVal RHS As ALLockTypes) mLockTypes = RHS End Property Private Property Get IActiveLock_LockType() As ALLockTypes @@ -332,7 +378,7 @@ RandomNumber = CStr(CLng(Rnd(1) * 2147483647)) End Function -Private Property Let IActiveLock_SoftwareName(RHS As String) +Private Property Let IActiveLock_SoftwareName(ByVal RHS As String) mSoftwareName = RHS End Property Private Property Get IActiveLock_SoftwareName() As String @@ -373,12 +419,13 @@ If Left(strLock, 1) = vbLf Then strLock = Mid(strLock, 2) + ' Append lockcode. + ' Note: The logic here must match the corresponding logic + ' in ALUGENLib.Generator#GenKey() If Lic Is Nothing Then IActiveLock_LockCode = strLock - ElseIf strLock <> "" Then - IActiveLock_LockCode = Lic.ToString() & vbLf & strLock Else - IActiveLock_LockCode = Lic.ToString() + IActiveLock_LockCode = Lic.ToString() & vbLf & strLock End If End Function @@ -390,20 +437,20 @@ End If End Sub -Private Property Let IActiveLock_SoftwareVersion(RHS As String) +Private Property Let IActiveLock_SoftwareVersion(ByVal RHS As String) mSoftwareVer = RHS End Property Private Property Get IActiveLock_SoftwareVersion() As String IActiveLock_SoftwareVersion = mSoftwareVer End Property -Private Property Let IActiveLock_SoftwareCode(RHS As String) +Private Property Let IActiveLock_SoftwareCode(ByVal RHS As String) ' SoftwareCode is an RSA public key. This code will be used to verify license keys later on. mSoftwareCode = RHS End Property -Private Function IActiveLock_Transfer(OtherSoftwareCode As String) As String +Private Function IActiveLock_Transfer(ByVal OtherSoftwareCode As String) As String ' TODO: Implement me! Err.Raise ActiveLockErrCodeConstants.alerrNotImplemented, "IActiveLock_Transfer", "Operation not implemented" End Function Index: ActiveLock2.vbp =================================================================== RCS file: /cvsroot/activelock/activelock/src/ActiveLock2.vbp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ActiveLock2.vbp 3 Nov 2003 06:31:47 -0000 1.5 +++ ActiveLock2.vbp 18 Apr 2004 01:50:46 -0000 1.6 @@ -32,11 +32,11 @@ VersionCompatible32="1" MajorVer=2 MinorVer=0 -RevisionVer=4 +RevisionVer=5 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" -VersionLegalCopyright="Copyright © 2003" +VersionLegalCopyright="Copyright © 2003-2004" VersionProductName="ActiveLock" CompilationType=0 OptimizationType=0 Index: ActiveLockEventNotifier.cls =================================================================== RCS file: /cvsroot/activelock/activelock/src/ActiveLockEventNotifier.cls,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ActiveLockEventNotifier.cls 13 Oct 2003 04:49:03 -0000 1.2 +++ ActiveLockEventNotifier.cls 18 Apr 2004 01:50:46 -0000 1.3 @@ -92,7 +92,7 @@ ' @param Value Property value. Public Event ValidateValue(ByRef Value As String) -Friend Sub Notify(EventName As String, ParamArray Args()) +Friend Sub Notify(ByVal EventName As String, ParamArray Args()) If EventName = "ValidateValue" Then Dim Result As String Result = Args(0) Index: FileKeyStore.cls =================================================================== RCS file: /cvsroot/activelock/activelock/src/FileKeyStore.cls,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FileKeyStore.cls 3 Nov 2003 06:30:42 -0000 1.2 +++ FileKeyStore.cls 18 Apr 2004 01:50:46 -0000 1.3 @@ -62,8 +62,11 @@ ' ' 07.07.03 - mcrute - Updated the header comments for this file. ' 11.02.03 - th2tran - Handle loading and saving of new MaxCount property +' 04.17.04 - th2tran - Don't save the product key to the license file. +' - Now creates an empty license file if it doesn't exist, +' instead of raising alerrKeyStoreInvalid error. ' -' + ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// @@ -93,18 +96,26 @@ Private Property Let IKeyStoreProvider_KeyStorePath(RHS As String) If Not FileExists(RHS) Then - Err.Raise alerrKeyStoreInvalid, , "License file '" & RHS & "' not found." + ' Create an empty file if it doesn't exists + CreateEmptyFile RHS + 'Err.Raise alerrKeyStoreInvalid, , "License file '" & RHS & "' not found." End If mstrPath = RHS mIniFile.File = mstrPath End Property +Private Sub CreateEmptyFile(ByVal sFilePath As String) + Dim hFile As Long + hFile = FreeFile + Open sFilePath For Output As #hFile + Close #hFile +End Sub + Private Sub IKeyStoreProvider_Store(Lic As ProductLicense) ' Write license properties to INI file section ' TODO: Perhaps we need to lock the file first.? mIniFile.Section = Lic.ProductName With Lic - mIniFile.Values(KEY_PRODKEY) = .ProductKey mIniFile.Values(KEY_PRODVER) = .ProductVer mIniFile.Values(KEY_LICTYPE) = .LicenseType mIniFile.Values(KEY_LICCLASS) = .LicenseClass @@ -115,8 +126,6 @@ mIniFile.Values(KEY_LASTRUN_DATE) = .LastUsed mIniFile.Values(KEY_LASTRUN_DATE_HASH) = .Hash1 mIniFile.Values(KEY_EXP) = .Expiration - - End With End Sub @@ -139,7 +148,6 @@ With Lic .ProductName = ProductName .ProductVer = mIniFile.GetValue(KEY_PRODVER) - .ProductKey = mIniFile.GetValue(KEY_PRODKEY) .Licensee = mIniFile.GetValue(KEY_LICENSEE) .MaxCount = CLng(mIniFile.Values(KEY_MAXCOUNT)) .LicenseType = mIniFile.GetValue(KEY_LICTYPE) @@ -155,14 +163,3 @@ InvalidValue: Err.Raise alerrKeyStoreInvalid, "ActiveLock2.FileKeyStoreProvider", "A license property contains an invalid value." End Function - - -'' -' Determines if a file exists. -' -Private Function FileExists(FilePath As String) As Boolean - If Len(FilePath) > 0 Then - FileExists = (Len(Dir$(FilePath)) > 0) - End If -End Function - Index: Globals.cls =================================================================== RCS file: /cvsroot/activelock/activelock/src/Globals.cls,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Globals.cls 4 Nov 2003 07:41:19 -0000 1.4 +++ Globals.cls 18 Apr 2004 01:50:46 -0000 1.5 @@ -75,6 +75,8 @@ ' 10.13.03 - th2tran - Corrections to ActiveLockErrCodeConstants vbdox errors. ' - Added VB descriptions for VB Object Browser's sake. ' 11.02.03 - th2tran - Added ActiveLockErrCodeConstants.alerrNotImplemented +' 04.17.04 - th2tran - NewInstance() no longer calls Init(). Callers will have to +' init the instance themselves. ' </pre> ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / @@ -110,17 +112,14 @@ '' ' Obtains a new instance of an object that implements IActiveLock interface. -' @param Args Optional list of parameters. +' As of 2.0.5, this method will no longer initialize the instance automatically. +' Callers will have to call Init() by themselves subsequent to obtaining the instance. ' @return ActiveLock interface. ' -Public Function NewInstance(Optional Args As Variant) As IActiveLock 'TODO: Add parameters as appropriate +Public Function NewInstance() As IActiveLock Attribute NewInstance.VB_Description = "Returns a new instance of an object that implements IActiveLock interface." Dim NewInst As IActiveLock Set NewInst = New ActiveLock - With NewInst - ' Initialize properties ..... - .Init Args - End With Set NewInstance = NewInst End Function @@ -141,7 +140,7 @@ ' @param MaxUsers Maximum number of users allowed to use this license ' ' @return License object. -Public Function CreateProductLicense(ByVal Name As String, _ +Public Function CreateProductLicense(ByVal name As String, _ ByVal Ver As String, _ ByVal Code As String, _ ByVal Flags As ActiveLock2.LicFlags, _ @@ -275,7 +274,7 @@ ' @param strSig Private key blob ' @return Zero if verification is successful; Non-zero otherwise. ' -Public Function RSAVerify(strPub As String, strdata As String, strSig As String) As Long +Public Function RSAVerify(ByVal strPub As String, ByVal strdata As String, ByVal strSig As String) As Long Attribute RSAVerify.VB_Description = "Verifies an RSA signature." Dim Key As RSAKey Dim rc& Index: IActiveLock.cls =================================================================== RCS file: /cvsroot/activelock/activelock/src/IActiveLock.cls,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- IActiveLock.cls 4 Nov 2003 07:43:15 -0000 1.5 +++ IActiveLock.cls 18 Apr 2004 01:50:46 -0000 1.6 @@ -118,6 +118,12 @@ ' ' Specify Lock Type ' MyActiveLock.LockType = lockHD ' +' ' Sets path to liberation key file for automatic registration +' MyActiveLock.AutoRegisterKeyPath = App.path & "\myapp.alb" +' +' ' Initialize the instance +' MyActiveLock.Init +' ' ' Check registration status by calling Acquire() ' ' Note: Calling Acquire() may trigger ActiveLockEventNotifier_ValidateValue() event. ' ' So we should be prepared to handle that. @@ -220,6 +226,12 @@ ' 11.02.03 - th2tran - LicFlags Enum and its corresponding property don't belong here. Moved its definition to ProductLicense. ' - Added InstallationCode and RegisteredUser properties ' - Updated VBDox with new/simpler registration instructions. +' 04.10.04 - th2tran - Added ByVal modifier to parameter declarations for better compatibility with other COM languages (like VC++) +' 04.17.04 - th2tran - Removed the ParamArray thingy in Init() since it doesn't seem very forward-compatible. +' It's inconceivable to account for all possible future requirements, and if we try, we'll end up +' complicating ourselves in terms of compatibility. +' Better to do it via property accessors (such as the AutoRegisterKeyPath property), and +' leave Init() with no parameters. ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -265,7 +277,7 @@ ' Specifies the lock type for this instance of ActiveLock. ' @param LockTypes Lock Types. ' -Public Property Let LockType(LockTypes As ALLockTypes) +Public Property Let LockType(ByVal LockTypes As ALLockTypes) Attribute LockType.VB_Description = "Lock type for this instance of ActiveLock." End Property @@ -281,7 +293,7 @@ ' Specifies the name of the product being locked. ' @param sName Software Name ' -Public Property Let SoftwareName(sName As String) +Public Property Let SoftwareName(ByVal sName As String) Attribute SoftwareName.VB_Description = "Name of the product being locked." End Property @@ -296,7 +308,7 @@ '' ' Specifies the software code (product code) ' @param sCode Software Code. -Public Property Let SoftwareCode(sCode As String) +Public Property Let SoftwareCode(ByVal sCode As String) Attribute SoftwareCode.VB_Description = "software code (product code). This is Code1 generated by ALUGEN." End Property @@ -305,7 +317,7 @@ ' Specifies the version of the product being locked. ' @param sVer Version string e.g. "1.0" ' -Public Property Let SoftwareVersion(sVer As String) +Public Property Let SoftwareVersion(ByVal sVer As String) Attribute SoftwareVersion.VB_Description = "Version of the product being locked." End Property @@ -322,7 +334,7 @@ ' Specifies the key store type. ' @param KeyStore Key Store Type. ' -Public Property Let KeyStoreType(KeyStore As LicStoreType) +Public Property Let KeyStoreType(ByVal KeyStore As LicStoreType) Attribute KeyStoreType.VB_Description = "Specifies the key store (e.g. registry or file)." End Property @@ -334,7 +346,7 @@ ' then <code>Path</code> specifies the path to the license file. ' If <a href="IActiveLock.LicStoreType.html">alsRegistry</a> is used for <a href="IActiveLock.Let.KeyStoreType.htm">KeyStoreType</a>, ' the Path specifies the Registry hive where license information is stored. -Public Property Let KeyStorePath(sPath As String) +Public Property Let KeyStorePath(ByVal sPath As String) Attribute KeyStorePath.VB_Description = "Specifies the path where the license store resides." End Property @@ -348,6 +360,17 @@ End Property +'' +' Specifies the file path that contains the liberation key. +' If this file exists, ActiveLock will attempt to register the key automatically during its initialization. +' Upon successful registration, the liberation file WILL be deleted. +' <p>Note: This property is only effective if it is set prior to calling <code>Init</code>. +' @param sPath Full path to where the liberation file may reside. +Public Property Let AutoRegisterKeyPath(ByVal sPath As String) +Attribute AutoRegisterKeyPath.VB_Description = "Specifies the file path that contains the liberation key for automatic registration upon startup. Upon successful registration, the liberation file WILL be deleted." + +End Property + '* '*''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '* Interface Methods @@ -375,7 +398,7 @@ ' Transfers the current license to another computer. ' @param InstallCode Installation Code generated from the other computer. ' @return The liberation key tailored for the request code generated from the other machine. -Public Function Transfer(InstallCode As String) As String +Public Function Transfer(ByVal InstallCode As String) As String Attribute Transfer.VB_Description = "Transfers the current license to another computer." End Function @@ -383,14 +406,9 @@ '' ' Initializes ActiveLock before use. Some of the routines, including <a href="IActiveLock.Acquire.html">Acquire()</a> ' and <a href="IActiveLock.Register.html">Register()</a> requires <code>Init()</code> to be called first. -' This routine accepts varying number of parameters. -' Note: If you're accessing IActiveLock via <a href="Globals.NewInstance.html">ActiveLock2.NewInstance()</a>, -' then Init() would already have been called for you, so you don't need to call it again. ' -' @param Arg1 First parameter to be passed to this routine. -' @param OtherArgs The remaining array of arguments to be passed into this routine. -Public Sub Init(Arg1 As Variant, ParamArray OtherArgs() As Variant) -Attribute Init.VB_Description = "Initializes ActiveLock. This routine must be called before anything else." +Public Sub Init() +Attribute Init.VB_Description = "Initializes ActiveLock. This routine must be called before any other routine such as Acquire() or Register()." End Sub Index: modActiveLock.bas =================================================================== RCS file: /cvsroot/activelock/activelock/src/modActiveLock.bas,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- modActiveLock.bas 5 Oct 2003 08:40:18 -0000 1.2 +++ modActiveLock.bas 18 Apr 2004 01:50:46 -0000 1.3 @@ -65,6 +65,7 @@ ' instead. This approach was suggested by Peter Young (vbclassicforever) ' in the forum and mailing list a while back. ' 08.02.03 - th2tran - VBdox'd this module. +' 04.17.04 - th2tran - Added FileExists() routine. ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -314,3 +315,15 @@ 30 strFileName = Left(strFileName, lngCount) 40 IsRunningInIde = UCase(Right(strFileName, 7)) = "VB6.EXE" End Function + +'' +' Checks if a file exists in the system. +' +Public Function FileExists(ByVal strFile As String) As Boolean + FileExists = False + If Not Dir(strFile) = "" Then + FileExists = True + End If +End Function + + Index: ProductLicense.cls =================================================================== RCS file: /cvsroot/activelock/activelock/src/ProductLicense.cls,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ProductLicense.cls 4 Nov 2003 07:43:15 -0000 1.5 +++ ProductLicense.cls 18 Apr 2004 01:50:46 -0000 1.6 @@ -70,6 +70,9 @@ ' 11.02.03 - th2tran - New license properties: License Type, MaxCount ' - Removed CLASS_n constants ' - Moved LicFlags definition from IActiveLock into here +' 04.17.04 - th2tran - Don't save product key property--it is now considered a +' transient (non-serializable) property. Saving the product key is unnecessary +' and will make our liberation key look (unnecessarily) horrendous. ' </pre> @@ -82,7 +85,7 @@ Private mstrLicensee As String Private mstrLicenseClass As String Private mLicType As ALLicType -Private mstrProductKey As String +Private mstrProductKey As String ' This is a transient property -- TODO: Remove this property Private mstrProductName As String Private mstrProductVer As String Private mstrLicenseKey As String @@ -92,6 +95,7 @@ Private mstrHash1 As String ' hash of mstrRegisteredDate Private mnMaxCount As Long ' max number of concurrent users + '' ' License Flags. Values can be combined (OR'ed) together. ' @@ -210,7 +214,7 @@ ' the risk of invalidating your existing license. ' @param Name Name of the licensed user ' -Public Property Let Licensee(ByVal Name As String) +Public Property Let Licensee(ByVal name As String) mstrLicensee = name End Property @@ -330,7 +334,6 @@ Attribute ToString.VB_Description = "Returns a line-feed delimited string encoding of this object's properties." ToString = ProductName & vbCrLf & _ ProductVer & vbCrLf & _ - ProductKey & vbCrLf & _ LicenseClass & vbCrLf & _ LicenseType & vbCrLf & _ Licensee & vbCrLf & _ @@ -354,14 +357,13 @@ ' Initialize appropriate properties ProductName = arrParts(0) ProductVer = arrParts(1) - ProductKey = arrParts(2) - LicenseClass = arrParts(3) - LicenseType = CLng(arrParts(4)) - Licensee = arrParts(5) - RegisteredDate = arrParts(6) - Expiration = arrParts(7) - MaxCount = CLng(arrParts(8)) - LicenseKey = arrParts(9) + LicenseClass = arrParts(2) + LicenseType = CLng(arrParts(3)) + Licensee = arrParts(4) + RegisteredDate = arrParts(5) + Expiration = arrParts(6) + MaxCount = CLng(arrParts(7)) + LicenseKey = arrParts(8) End Sub '' |
From: SourceForge.net <no...@so...> - 2004-02-07 07:49:43
|
Feature Requests item #892313, was opened at 2004-02-06 23:49 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=892313&group_id=70007 Category: activelock2.dll Group: Future Development Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Thanh Hai Tran (th2tran) Summary: CD lock Initial Comment: add CD lock for some damaged sectors of CD. (CDrom- key) "optional featured" ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=892313&group_id=70007 |
From: SourceForge.net <no...@so...> - 2004-02-04 06:33:03
|
Feature Requests item #776088, was opened at 2003-07-23 00:14 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=776088&group_id=70007 Category: General Group: Next Major Version Status: Open Resolution: Accepted Priority: 5 Submitted By: Thanh Hai Tran (th2tran) Assigned to: Thanh Hai Tran (th2tran) Summary: Support Concurrent/Site Licenses Initial Comment: Ability to restrict to no more than X number of users to use the product at the same time within the same organization. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-02-03 22:33 Message: Logged In: NO cool !!! ---------------------------------------------------------------------- Comment By: Thanh Hai Tran (th2tran) Date: 2003-10-30 18:43 Message: Logged In: YES user_id=797792 This feature will be on the dev plan for 2.1. - Thanh ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-10-29 12:38 Message: Logged In: NO This is feature more important of the new version of the ActiveLock! ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-09-03 06:37 Message: Logged In: NO Very important! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=776088&group_id=70007 |
From: SourceForge.net <no...@so...> - 2004-01-28 01:32:02
|
Feature Requests item #776088, was opened at 2003-07-23 02:14 Message generated for change (Settings changed) made by mcrute You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=776088&group_id=70007 >Category: General Group: Next Major Version Status: Open >Resolution: Accepted Priority: 5 Submitted By: Thanh Hai Tran (th2tran) Assigned to: Thanh Hai Tran (th2tran) Summary: Support Concurrent/Site Licenses Initial Comment: Ability to restrict to no more than X number of users to use the product at the same time within the same organization. ---------------------------------------------------------------------- Comment By: Thanh Hai Tran (th2tran) Date: 2003-10-30 21:43 Message: Logged In: YES user_id=797792 This feature will be on the dev plan for 2.1. - Thanh ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-10-29 15:38 Message: Logged In: NO This is feature more important of the new version of the ActiveLock! ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-09-03 08:37 Message: Logged In: NO Very important! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=776088&group_id=70007 |
From: SourceForge.net <no...@so...> - 2004-01-28 01:31:14
|
Feature Requests item #823893, was opened at 2003-10-14 23:39 Message generated for change (Settings changed) made by mcrute You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=823893&group_id=70007 Category: General Group: Next Release (Any) >Status: Open Resolution: Accepted Priority: 5 Submitted By: Thanh Hai Tran (th2tran) Assigned to: Thanh Hai Tran (th2tran) Summary: Can you allow for reduction of the key length Initial Comment: Logged on behalf of Hypercubed.... Currently, the generated key is very long (probably because of using 1024-bit encryption). Would like to be able to generate keys with shorter length. ---------------------------------------------------------------------- Comment By: Michael E. Crute (mcrute) Date: 2004-01-27 20:30 Message: Logged In: YES user_id=564093 Your request has been assigned to a developer and will be completed whenever that developer gets a chance to work on it (based on the criticality of the issue). -Mike (Project Manager) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=823893&group_id=70007 |
From: SourceForge.net <no...@so...> - 2004-01-28 01:30:44
|
Feature Requests item #823893, was opened at 2003-10-14 23:39 Message generated for change (Comment added) made by mcrute You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=823893&group_id=70007 Category: General Group: Next Release (Any) >Status: Pending >Resolution: Accepted Priority: 5 Submitted By: Thanh Hai Tran (th2tran) >Assigned to: Thanh Hai Tran (th2tran) Summary: Can you allow for reduction of the key length Initial Comment: Logged on behalf of Hypercubed.... Currently, the generated key is very long (probably because of using 1024-bit encryption). Would like to be able to generate keys with shorter length. ---------------------------------------------------------------------- >Comment By: Michael E. Crute (mcrute) Date: 2004-01-27 20:30 Message: Logged In: YES user_id=564093 Your request has been assigned to a developer and will be completed whenever that developer gets a chance to work on it (based on the criticality of the issue). -Mike (Project Manager) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=823893&group_id=70007 |
From: SourceForge.net <no...@so...> - 2004-01-28 01:28:44
|
Feature Requests item #885890, was opened at 2004-01-27 19:09 Message generated for change (Comment added) made by mcrute You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=885890&group_id=70007 Category: activelock2.dll Group: Next Release (Any) >Status: Deleted >Resolution: Duplicate Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Nobody/Anonymous (nobody) Summary: Date Format Initial Comment: Please put date format in dd/mm/yyyy in file .lic Luiz C. Pinheiro ---------------------------------------------------------------------- >Comment By: Michael E. Crute (mcrute) Date: 2004-01-27 20:28 Message: Logged In: YES user_id=564093 This request was closed because it is a duplicate. -Mike (Project Manager) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=885890&group_id=70007 |
From: SourceForge.net <no...@so...> - 2004-01-28 01:27:33
|
Feature Requests item #885892, was opened at 2004-01-27 19:14 Message generated for change (Comment added) made by mcrute You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=885892&group_id=70007 Category: activelock2.dll >Group: Whenever We Can Status: Open >Resolution: Accepted >Priority: 1 Submitted By: Nobody/Anonymous (nobody) Assigned to: Thanh Hai Tran (th2tran) >Summary: Date Format Initial Comment: Sorry, discard previous. Put date format as mm/dd/yyyy in file .lic Thank's Luiz C. Pinheiro ---------------------------------------------------------------------- >Comment By: Michael E. Crute (mcrute) Date: 2004-01-27 20:27 Message: Logged In: YES user_id=564093 We will eventually add support for European style dates but this is not a critical issue so it will be dealt with whenever our developers get a chance to make a European port of ActiveLock. Thanks. -Mike (Project Manager) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=885892&group_id=70007 |
From: SourceForge.net <no...@so...> - 2004-01-28 00:14:14
|
Feature Requests item #885892, was opened at 2004-01-27 16:14 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=885892&group_id=70007 Category: activelock2.dll Group: Next Release (Any) Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Thanh Hai Tran (th2tran) Summary: Date Format2 Initial Comment: Sorry, discard previous. Put date format as mm/dd/yyyy in file .lic Thank's Luiz C. Pinheiro ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=885892&group_id=70007 |
From: SourceForge.net <no...@so...> - 2004-01-28 00:09:20
|
Feature Requests item #885890, was opened at 2004-01-27 16:09 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=885890&group_id=70007 Category: activelock2.dll Group: Next Release (Any) Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Thanh Hai Tran (th2tran) Summary: Date Format Initial Comment: Please put date format in dd/mm/yyyy in file .lic Luiz C. Pinheiro ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=526388&aid=885890&group_id=70007 |
From: Thanh H. T. <th...@sy...> - 2003-12-23 07:52:53
|
Apparently, this is a popular problem when migrating from vb6 to vb.net. I suggest you google it...should be able to find lots of hints and tips there. If I find any good one, I'll let you know. - Thanh Dan Keeley wrote: > Hi Everyone, > > Quick question I hope! > Has anyone upgraded alugen to compile in vb.net? > > There doesnt seem to be too many problems, i could be wrong though, > but here's one: > > > modALUGEN.rsa_generate(Key, 1024, AddressOf CryptoProgressUpdate, > VarPtr(progress)) > > It says VarPtr is not declared. Any ideas? Has anyone else upgraded > it yet? ( To save me the work :) ) > > Now i dont have any experience in vb6 upgrades, so this may or may not > be an easy fix. What im wondering is should i spend a little time now > investigating it ( if no one else has ) or just use my vb6 machine and > do the edits there? > > In case you're wondering i'm trying to lock alugen to my pendrive, so > i can provide the unlock facility to my client. I'll clearly have to > encrypt my application files too, but hopefully wont be too hard. > > I'll share the files if i do have to end up doing it myself of course... > > Thanks and happy new year to all!! > > Dan > > ----- Original Message ----- > *From:* Thanh Hai Tran <mailto:th...@sy...> > *To:* act...@li... > <mailto:act...@li...> > *Sent:* Tuesday, December 02, 2003 1:17 AM > *Subject:* [ActiveLock-Development] New team member: Dan Keeley > > Everyone, > Please join me in welcoming Dan Keeley to the team. He has been > helping me update the tutorial doc. He will be helping us get our > acts together in the area of docs, whenever he has a spare moment. :-) > > - Thanh > |
From: Dan K. <da...@da...> - 2003-12-22 20:23:10
|
Hi Everyone, Quick question I hope! Has anyone upgraded alugen to compile in vb.net? There doesnt seem to be too many problems, i could be wrong though, but = here's one: modALUGEN.rsa_generate(Key, 1024, AddressOf CryptoProgressUpdate, = VarPtr(progress)) It says VarPtr is not declared. Any ideas? Has anyone else upgraded it = yet? ( To save me the work :) ) Now i dont have any experience in vb6 upgrades, so this may or may not = be an easy fix. What im wondering is should i spend a little time now = investigating it ( if no one else has ) or just use my vb6 machine and = do the edits there? In case you're wondering i'm trying to lock alugen to my pendrive, so i = can provide the unlock facility to my client. I'll clearly have to = encrypt my application files too, but hopefully wont be too hard. I'll share the files if i do have to end up doing it myself of course... Thanks and happy new year to all!! Dan ----- Original Message -----=20 From: Thanh Hai Tran=20 To: act...@li...=20 Sent: Tuesday, December 02, 2003 1:17 AM Subject: [ActiveLock-Development] New team member: Dan Keeley Everyone, Please join me in welcoming Dan Keeley to the team. He has been = helping me update the tutorial doc. He will be helping us get our acts = together in the area of docs, whenever he has a spare moment. :-) - Thanh |
From: Thanh H. T. <th...@sy...> - 2003-12-02 03:26:35
|
Everyone, Please join me in welcoming Dan Keeley to the team. He has been helping me update the tutorial doc. He will be helping us get our acts together in the area of docs, whenever he has a spare moment. :-) - Thanh |
From: SourceForge.net <no...@so...> - 2003-11-30 05:38:20
|
Task #85537 has been updated. Project: ActiveLock Subproject: ActiveLock 2.0 General Summary: Fix bug 526385 Complete: 0% Status: Open Authority : th2tran Assigned to: th2tran Description: http://sourceforge.net/tracker/index.php?func=detail&aid=786272&group_id=70007&atid=526385 Follow-Ups: ------------------------------------------------------- Date: 2003-11-30 05:38 By: th2tran Comment: Moving to 2.0 general. Wasn't done for alpha 2. ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=85537&group_id=70007&group_project_id=29689 |