[ActiveLock-Development] CVS: activelock/src ActiveLock.cls,1.6,1.7 modWinApi.bas,1.2,1.3
Brought to you by:
ialkan
From: Thanh H. T. <th...@us...> - 2003-11-03 07:25:09
|
Update of /cvsroot/activelock/activelock/src In directory sc8-pr-cvs1:/tmp/cvs-serv4051 Modified Files: ActiveLock.cls modWinApi.bas Log Message: alcrypto.dll is now expected to be in the winsys directory. Index: ActiveLock.cls =================================================================== RCS file: /cvsroot/activelock/activelock/src/ActiveLock.cls,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ActiveLock.cls 3 Nov 2003 06:30:42 -0000 1.6 +++ ActiveLock.cls 3 Nov 2003 07:25:06 -0000 1.7 @@ -82,6 +82,7 @@ ' but not so OK when multiple apps are involved. ' 10.13.03 - th2tran - Fixed bug: If ValidateValue event was not handled by the client, then we ended up ' hashing an empty string. +' 11.02.03 - th2tran - alcrypto.dll now resides in the Windows System directory ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -127,7 +128,7 @@ ' Checksum ALCrypto.dll Const ALCRYPTO_MD5$ = "1941fefd79fed9403e24f3d7fd76ae13" Dim strdata As String, strMD5 As String - Call modActiveLock.ReadFile(WinDir() & "\alcrypto.dll", strdata) + Call modActiveLock.ReadFile(WinSysDir() & "\alcrypto.dll", strdata) strMD5 = modMD5.Hash(strdata) ' use our own MD5 hashing routine instead of ALCrypto's md5_hash() function. Debug.Print "ALCrypto Hash: " & strMD5 If strMD5 <> ALCRYPTO_MD5 Then Index: modWinApi.bas =================================================================== RCS file: /cvsroot/activelock/activelock/src/modWinApi.bas,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- modWinApi.bas 6 Oct 2003 05:09:29 -0000 1.2 +++ modWinApi.bas 3 Nov 2003 07:25:06 -0000 1.3 @@ -54,6 +54,7 @@ ' ' 07.07.03 - mecrute - Updated the header comments for this file. ' 10.06.03 - th2tran - Added WinDir() +' 11.02.03 - th2tran - Added WinSysDir() ' ' ' /////////////////////////////////////////////////////////////////////// @@ -76,6 +77,10 @@ Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, _ ByVal nSize As Long) As Long +Public Declare Function GetSystemDirectory Lib "kernel32.dll" Alias "GetSystemDirectoryA" _ + (ByVal lpBuffer As String, ByVal nSize As Long) As Long + + '' ' Retrieves the error text for the specified Windows error code ' @@ -103,5 +108,17 @@ Length = GeneralWinDirApi(Buffer, FIX_LENGTH - 1) WinDir = Left$(Buffer, Length) +End Function + +'' +' Gets the system directory +' +Public Function WinSysDir() As String + Const FIX_LENGTH% = 4096 + Dim Length As Integer + Dim Buffer As String * FIX_LENGTH + + Length = GetSystemDirectory(Buffer, FIX_LENGTH - 1) + WinSysDir = Left$(Buffer, Length) End Function |