|
|
|
Click here to copy the following block | Private Declare Function GetFileVersionInfoSize Lib "version.dll" Alias _ "GetFileVersionInfoSizeA" (ByVal lptstrFilename As String, _ lpdwHandle As Long) As Long 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
Function GetFileVersionData(ByVal FileName As String) As Variant Dim length As Long Dim handle As Long Dim buffer As String Dim index As Long Dim pos As Long length = GetFileVersionInfoSize(FileName, handle) If length = 0 Then Exit Function buffer = Space$(length) If GetFileVersionInfo(FileName, handle, length, ByVal StrPtr(buffer)) = 0 _ Then Exit Function End If Dim res() As String res() = Split("CompanyName;FileDescription;FileVersion;InternalName;" & _ "LegalCopyright;OriginalFilename;ProductName;ProductVersion;" & _ "Comments;LegalTrademarks;PrivateBuild;SpecialBuild", ";") For index = 0 To UBound(res) pos = InStr(buffer, res(index)) If pos Then pos = pos + Len(res(index)) + 1 If Mid$(buffer, pos, 1) = vbNullChar Then pos = pos + 1 res(index) = res(index) & ": " & Mid$(buffer, pos, InStr(pos, _ buffer, vbNullChar) - pos) End If Next GetFileVersionData = res() End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|