How do you load a VERSIONINFO resource and display it in a message box?
Posted on 2004-12-29 18:01:44 by Retsim_X
check out GetFileVersionInfo, GetFileVersionInfoSize and VerQueryValue api functions.
Posted on 2004-12-29 18:26:24 by arafel
yes but i dont understand how they work i tryed but they keep not working
Posted on 2004-12-29 19:52:22 by Retsim_X
Hi, getting version info must be done in 3 steps. First you must get the size of the version info stored in the DLL (or other executable), second you must create a buffer and copy the information to it, and third you must query that buffer for the information. There is a complete example in WinExplorer that I posted in the Algorithms and Source Code section of the board but in general to get the version information you can do this (GoAsm syntax)...

LOCAL Verification :D

LOCAL pBuffer :D
LOCAL pVersion :D
LOCAL pVersionLen :D

invoke GetFileVersionInfoSize,[pFileName],OFFSET Verification
push eax
invoke GlobalAlloc,040h,eax
mov [pBuffer] ,eax
pop eax
invoke GetFileVersionInfo,[pFileName],0,eax,[pBuffer]
invoke VerQueryValue,[pBuffer],"\",OFFSET pVersion,OFFSET pVersionLen


The version information (VS_FIXEDFILEINFO) will be at the address pointed to by pVersion.
Posted on 2004-12-29 20:16:18 by donkey