- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Been happily using the Version resource in my release builds for many years. Now, we need to put out a 64 bit version.
so (after reinstalling Visual Studio in order to remove SP 1 and be able to access 64 bit versions), I am getting several errors and one which stops the build.
the build stopper:
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(604): error #6580: Name in only-list does not exist. [VERSIONQUERYVALUE]
use ifwbase, only: VersionQueryValue
The rest I can look into:
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(653): warning #6075: The data type of the actual argument does not match the definition. [GHINSTANCE]
ret = GetModuleFileName (ghInstance, szFullPath, len(szFullPath))
---------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(660): warning #6075: The data type of the actual argument does not match the definition. [INT]
hMem = GlobalAlloc(GMEM_MOVEABLE, INT(dwVerInfoSize))
---------------------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(661): warning #6075: The data type of the actual argument does not match the definition. [HMEM]
lpstrVffInfo = GlobalLock(hMem)
--------------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(662): warning #6075: The data type of the actual argument does not match the definition. [LPSTRVFFINFO]
ret = GetFileVersionInfo (szFullPath, dwVerHnd, dwVerInfoSize, lpstrVffInfo)
--------------------------------------------------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(703): warning #6075: The data type of the actual argument does not match the definition. [HMEM]
retlock = GlobalUnlock(hMem)
----------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(704): warning #6075: The data type of the actual argument does not match the definition. [HMEM]
ret = GlobalFree(hMem)
I noticed the resource types (add resource) only reference 32 bit os.
Is there some new way to be able to embed a version number for a 64 bit exe?
Linda
so (after reinstalling Visual Studio in order to remove SP 1 and be able to access 64 bit versions), I am getting several errors and one which stops the build.
the build stopper:
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(604): error #6580: Name in only-list does not exist. [VERSIONQUERYVALUE]
use ifwbase, only: VersionQueryValue
The rest I can look into:
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(653): warning #6075: The data type of the actual argument does not match the definition. [GHINSTANCE]
ret = GetModuleFileName (ghInstance, szFullPath, len(szFullPath))
---------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(660): warning #6075: The data type of the actual argument does not match the definition. [INT]
hMem = GlobalAlloc(GMEM_MOVEABLE, INT(dwVerInfoSize))
---------------------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(661): warning #6075: The data type of the actual argument does not match the definition. [HMEM]
lpstrVffInfo = GlobalLock(hMem)
--------------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(662): warning #6075: The data type of the actual argument does not match the definition. [LPSTRVFFINFO]
ret = GetFileVersionInfo (szFullPath, dwVerHnd, dwVerInfoSize, lpstrVffInfo)
--------------------------------------------------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(703): warning #6075: The data type of the actual argument does not match the definition. [HMEM]
retlock = GlobalUnlock(hMem)
----------------------------^
D:\\EPPgm\\IVF\\EnergyPlus-64\\EnergyPlus.f90(704): warning #6075: The data type of the actual argument does not match the definition. [HMEM]
ret = GlobalFree(hMem)
I noticed the resource types (add resource) only reference 32 bit os.
Is there some new way to be able to embed a version number for a 64 bit exe?
Linda
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that VersionQueryValue is an obsolete API from 16-bit Windows that was not carried over to x64. Use VerQueryValue instead. Look it up to see if the arguments have changed.
The other problems you have are due to handles being declared as INTEGER*4 rather than INTEGER(HANDLE).
The other problems you have are due to handles being declared as INTEGER*4 rather than INTEGER(HANDLE).
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that VersionQueryValue is an obsolete API from 16-bit Windows that was not carried over to x64. Use VerQueryValue instead. Look it up to see if the arguments have changed.
The other problems you have are due to handles being declared as INTEGER*4 rather than INTEGER(HANDLE).
The other problems you have are due to handles being declared as INTEGER*4 rather than INTEGER(HANDLE).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, as always, Steve.
That looks like it will do it.
Linda
That looks like it will do it.
Linda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, VerQueryValue compiles on Intel64, the interface is defined in version.f90
program U78030
use version
integer(BOOL) :: VQueryV
integer(LPVOID) :: pBlock ! LPVOID pBlock
character (len=37) lpSubBlock /"root block\\VarFileInfo\\StringFileInfo"C/
integer(LPVOID) :: lplpBuffer ! LPVOID* lplpBuffer
integer(LPUINT) :: puLen ! PUINT puLen
VQueryV = VerQueryValue(pBlock, lpSubBlock, lplpBuffer, puLen)
end program U78030
Don't try to run the above; you need to call GetFileVersionInfoSize and GetFileVersionInfo to get the appropriate resource info before calling VerQueryValue.
Patrick Kennedy
Intel Developer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any chance we could get a complete (very small) example file to illustrate this use?
I'm coming up empty.
Linda
I'm coming up empty.
Linda
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page