Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving the EXE version
Message
From
02/04/1998 05:21:38
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00088701
Message ID:
00088888
Views:
67
Snip...
>Part of the problem is that the version information is in Unicode. This is one of the reasons I didn't get much further than what follows:
>
DECLARE INTEGER GetFileVersionInfoSize IN Version;
>  STRING @lptstrFilename, INTEGER @dwHandle
>DECLARE SHORT GetFileVersionInfo IN Version;
>  STRING @lptstrFilename, INTEGER dwHandle,;
>  INTEGER dwLen, STRING @lpData
>* lcfile is the file name
>* lnhandle can be any value
>lnhandle = 99
>* Get the block size
>lnsize = GetFileVersionInfoSize(@lcfile, @lnhandle)
>lcbuffer = SPACE(lnsize)
>* lnresult will not equal zero if the function succeeds
>lnresult = GetFileVersionInfo(@lcfile, lnhandle, lnsize, @lcbuffer)
>If you want to pursue this, look also at VerQueryValue and VerLanguageName functions (also in Version).
>
>hth,
Thanks George. This one works and now mine too. The missing piece was lcBuffer, BUFLEN (mistakenly set less than needed). One more question. Where is the list of parameter types ? (I mean integer, short, string etc and not LPTSTR, LPDWORD etc).
Thanks again
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform