(SST) ShlWAPIFunctionInfo Version 1.0

Developer Reference
TSSTDllVerInfo.RetResourceFixedFileInfo Method
Retrieves the VS_FIXEDFILEINFO data record/structure from the in-memory copy of the version information resources of an executable.
Protected (i.e. the method can only be accessed from code in a descendant class or the unit it which it is implemented).
Function RetResourceFixedFileInfo() : TVSFixedFileInfo; VIRTUAL;  
Return Values
If the function succeeds it returns a copy of the VS_FIXEDFILEINFO data record/structure in the version information of the file. If the function fails it returns an empty recourd (i.e. all members/fields arer set to zero (0)).
The returned data is also available in form of property ResourceFixedFileInfo, and reading the property should be preferred to calling the RetResourceFixedFileInfo function directly.
The function reads property ResourceVersionInfo to obtain a pointer to the in-memory copy of the version information. Provided the pointer is not nil, the function then calls the ANSI version of the Windows API function VerQueryValue to obtain a pointer to the VS_FIXEDFILEINFO record. If VerQueryValue returns TRUE and the values returned via the parameters ane valid (i.e. non-nil and larger zero), the data from the in-memory copy of the VS_FIXEDFILEINFO record/structure is copied into the returned record/structure and the function exits. If VerQueryValue returns FALSE or either of the two values returned in the parameters are invalid, the function calls procedure SetLastErrorCode with a default error code of -1 (0xFFFFFFFF).
As the function always returns a TVSFixedFileInfo record/structure, it is not possible to establish whether the call succeeded or not, based solely on the return value. However, it is possible to determine failure or success indirectly by any, or a combination of, the three following methods.
1. By checking if the "dwSignature" member/field of the returned record is $FEEF04BD (0xFEEF04BD = 4,277,077,181). If this member/field is not $FEEF04BD, the returned data is invalid.
2. By checking if high order word of the "dwStrucVersion" member/field is equal to or larger than 1, and/or the low order word is larger or equal to zero. Currently (Novermber 2015), this member should typically be $00010000 (0x00010000 = 65,536).
3. By reading property LastError. Any value other than 0 indicates that an error has occurred in the thread in which the method was called. However, this value is not (entirely) unambiguous (see SetLastErrorCode for futher details).
TVSFixedFileInfo is the Delphi SDK synonym for VS_FIXEDFILEINFO.
Unit (Declared and implemented in) SSTNewUnit.pas
Library SSTNewUnit.dcu/SSTNewUnit.obj
Unicode Implemented as ANSI version only.
See Also
TSSTDllVerInfo, ResourceFixedFileInfo, ResourceVersionInfo, RetResourceVersionInfo, SetLastErrorCode, LastError, Source Code
Windows APIs: VERSIONINFO Resource, VS_VERSIONINFO Structure, VS_FIXEDFILEINFO. VerQueryValue. GetLastError.

Document/Contents version 1.00
Page/URI last updated on April 30, 2022
Copyright © Stoelzel Software Technologie (SST) 2010 - 2017
Suggestions and comments mail to: