Const StdJet35DLLDateTimeInfo As Date = #9/28/1999 10:42:48 PM#
Const StdJet35DLLVerInfo As String = "3.51.3328.0"
Dim CurJet35DLLDateTimeInfo As Date, CurJet35DLLVerInfo As String
CurJet35DLLDateTimeInfo = FileDateTime(fReturnSysDir & "\msjet35.dll")
CurJet35DLLVerInfo = tt_ProdVerInfo(fReturnSysDir & "\msjet35.dll")
If CurJet35DLLVerInfo <> StdJet35DLLVerInfo Or _
CLng(StdJet35DLLDateTimeInfo) <> CLng(CurJet35DLLDateTimeInfo) Then
MsgBox "A wrong version of an MS Access DLL is present on your system. Please get it checked soon as this " & _
"may cause corruption of data." & vbCrLf & vbCrLf & _
"(Technical Details for file " & fReturnSysDir & "\msjet35.dll" & vbCrLf & _
"Version " & CurJet35DLLVerInfo & " present but should be " & StdJet35DLLVerInfo & vbCrLf & _
"Date/Time " & CurJet35DLLDateTimeInfo & " present but should be " & StdJet35DLLDateTimeInfo & ".)", _
vbCritical
End If
Private Declare Function apiGetSystemDirectory& Lib "kernel32" _
Alias "GetSystemDirectoryA" _
(ByVal lpBuffer As String, ByVal nSize As Long)
Function fReturnSysDir()
'Returns System Folder Name (C:\WinNT\System32)
Dim strSysDirName As String
Dim lngx As Long
strSysDirName = String$(MAX_PATH, 0)
lngx = apiGetSystemDirectory(strSysDirName, MAX_PATH)
If lngx <> 0 Then
fReturnSysDir = Left$(strSysDirName, lngx)
Else
fReturnSysDir = ""
End If
End Function
' ******** 代码开始********
'This code was originally written by Dev Ashish.
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Dev Ashish
'
' structure contains version information about a file. This
' information is language and code page independent.
Private Type VS_FIXEDFILEINFO
' Contains the value 0xFEEFO4BD (szKey)
dwSignature As Long
' Specifies the binary version number of this structure.
dwStrucVersion As Long
' most significant 32 bits of the file's binary version number.
dwFileVersionMS As Long
' least significant 32 bits of the file's binary version number.
dwFileVersionLS As Long
' most significant 32 bits of the binary version number of
' the product with which this file was distributed
dwProductVersionLS As Long
' least significant 32 bits of the binary version number of
' the product with which this file was distributed
dwFileFlagsMask As Long
' Contains a bitmask that specifies the valid bits in dwFileFlags.
dwProductVersionMS As Long
' Contains a bitmask that specifies the
' Boolean attributes of the file.
dwFileFlags As Long
' operating system for which this file was designed.
dwFileOS As Long
' general type of file.
dwFileType As Long
' function of the file.
dwFileSubtype As Long
' most significant 32 bits of the file's 64-bit
' binary creation date and time stamp.
dwFileDateMS As Long
' least significant 32 bits of the file's 64-bit binary
' creation date and time stamp.
dwFileDateLS As Long
End Type