Vip 7.2 ; bug in getFileVersionInfo

Discussions related to Visual Prolog
Matthias Greving
Posts: 18
Joined: 21 Mar 2002 0:01

Vip 7.2 ; bug in getFileVersionInfo

Unread post by Matthias Greving » 3 Feb 2009 14:06


today I tried to use fileVersion::getFileVersionInfo to get the version of a dll and got strange results. After some checks I saw that the function is now using 64 bit numbers and somehow the extraction of the version number does not work. I changed the code of the function in my copy of Vip back to the old 7.1 code and now for me it works again.
This is what i did, please have a look.

Code: Select all

clauses     getFileVersionInfo(FileName) = fileVersionInformation(A, B, C, D) :-         VerInfoBin = loadVersionInfo(FileName),         vs_fixedfileinfo(_Signature,_StrucVersion,FileVersion,_ProductVersion,_FileFlagsMask,_FileFlags,_FileOS,_FileType,_FileSubtype,_FileDate) = getRootKey(VerInfoBin), %        fc(D, C, B, A) = uncheckedConvert(fc, ptr(FileVersion)).         bit::getUnsigned64bytes(FileVersion, Lo, Hi),         C = bit::getHigh16of32(Hi),         D = bit::getLow16of32(Hi),         A = bit::getHigh16of32(Lo),         B = bit::getLow16of32(Lo).  

User avatar
Thomas Linder Puls
VIP Member
Posts: 2450
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 3 Feb 2009 22:53

Yes, you are right. Thank you.
Regards Thomas Linder Puls

Post Reply