ADim FileVer As String Dim dwHandle&, BufSize&, lpvData$, R& '*** Get Version Information If Available **** FileVer = "" BufSize& = GetFileVersionInfoSize(FileName, dwHandle&) If BufSize& = 0 Then GetVersion = "Invalid File Name or no Version information available" Exit Function End If lpvData$ = Space$(BufSize&) R& = GetFileVersionInfo(FileName, dwHandle&, BufSize&, lpvData$) hmemcpy x, ByVal lpvData$, Len(x) '**** Parse File Version Number **** FileVer = Trim$(Str$(HIWORD(x.dwFileVersionMS))) + "." FileVer = FileVer + Trim$(Str$(LOWORD(x.dwFileVersionMS))) If Trim$(Str$(HIWORD(x.dwFileVersionLS))) Then FileVer = FileVer + "." + Trim$(Str$(HIWORD(x.dwFileVersionLS))) End If If Trim$(Str$(LOWORD(x.dwFileVersionLS))) Then FileVer = FileVer + "." + Trim$(Str$(LOWORD(x.dwFileVersionLS))) End If GetVersion = "Version of " & FileName & " is : " & FileVer
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams