I'm currently using such code compiling to 32 bit (Windows, Unicode):
Code: Select all
Import "version.lib"
GetFileVersionInfoSize( *lptstrFilename, *lpdwHandle ) As "_GetFileVersionInfoSizeW@8"
GetFileVersionInfo( *lptstrFilename, dwHandle, dwLen, *lpData) As "_GetFileVersionInfoW@16"
VerQueryValue( *pBlock, *lpSubBlock, *lplpBuffer, *puLen) As "_VerQueryValueW@16"I found that the version.lib from 32 bit differs from 64 bit:
C:\Program Files (x86)\PureBasic5\PureLibraries\Windows\Libraries\version.lib
Function names beginning with underscore.
C:\Program Files\PureBasic5\PureLibraries\Windows\Libraries\version.lib
Function names not beginning with underscore.
Also, it only compiles on 64 bit if I leave the @ values away. But how does the 64 bit compiler now knowing the number of bytes for function parameters?
Thus, this one compiles for 64 bit (Windows, Unicode):
Code: Select all
Import "version.lib"
GetFileVersionInfoSize( *lptstrFilename, *lpdwHandle ) As "GetFileVersionInfoSizeW"
GetFileVersionInfo( *lptstrFilename, dwHandle, dwLen, *lpData) As "GetFileVersionInfoW"
VerQueryValue( *pBlock, *lpSubBlock, *lplpBuffer, *puLen) As "VerQueryValueW"Best,
Kukulkan



