如何取得一个DLL的版本信息,急,在线等待高手指点!
如何取得一个DLL的版本信息,以下为错误程序:
Private Declare Function GetFileVersionInfo Lib "version.dll" Alias "GetFileVersionInfoA" (ByVal lptstrFilename As String, ByVal dwHandle As Long, ByVal dwLen As Long, lpData As Any) As Long
Private Declare Function GetFileVersionInfoSize Lib "version.dll" Alias "GetFileVersionInfoSizeA" (ByVal lptstrFilename As String, lpdwHandle As Long) As Long
Private Declare Function VerQueryValue Lib "version.dll" (pBlock As Any, ByVal lpSubBlock As String, ByVal lplpBuffer As Long, puLen As Long) As Long
Private Sub Command1_Click()
Dim i As Long
Dim temp(10) As Byte
Dim ii As Integer
Dim a(10) As Long
i = GetFileVersionInfoSize("C:\WINDOWS\system32\34api.dll", 0)
GetFileVersionInfo "C:\WINDOWS\system32\34api.dll", 0, i, temp(0)
VerQueryValue temp(0), "\VarFileInfo\Translation", a(0), i
MsgBox a(0)
End Sub
望各位高手指点小弟!谢谢!