(SST) ShlWAPIFunctionInfo Version 1.0

Developer Reference
TSSTDllVerInfo.RetResourceVersionInfoBuf Method
Allocates the memory into which the version information should be copied.
Scope
Protected (i.e. the method can only be accessed from code in a descendant class or the unit it which it is implemented).
Syntax
Function RetResourceVersionInfoBuf() : POINTER; VIRTUAL;  
Parameters
None  
Return Values
Returns a pointer to the allocated buffer.
Remarks
The returned pointer and data are also available in the form of property ResourceVersionInfoBuf, and reading the property should be preferred to calling the RetResourceVersionInfoBuf function directly.
The function checks if a buffer has already been allocated, by comparing member variable fresourceinfobuffer to nil. If fresourceinfobuffer is still nil, the function reads property ResourceVersionInfoSize to determine the required buffer size. Provided the returned value is larger than zero (0), it calls the Delphi SDK procedure GetMem to allocate the memory and assign the returned pointer to member variable fresourceinfobuffer.
If a buffer already exists the function returns a pointer to the exisiting buffer. This also means that no size adjustments are made to the previously allocated memory.
The function handles all runtime library (RTL) exceptions raised during the allocation of the required memory. Should an exception be raised and handled/caught as a result of calling the Delphi SDK procedure GetMem, the function calls procdure SetLastErrorCode with a default error code of ERROR_OUTOFMEMORY (= 14).
The allocated buffer is freed in the destructor.
Requirements
Unit (Declared and implemented in) SSTNewUnit.pas
Library SSTNewUnit.dcu/SSTNewUnit.obj
Unicode Implemented as ANSI version only.
See Also
TSSTDllVerInfo, ResourceVersionInfoSize, ResourceVersionInfoBuf, ResourceVersionInfo, SetLastErrorCode, LastError, Source Code.
 
Windows APIs: GlobalAlloc, GlobalHandle, LocalAlloc, LocalHandle, GlobalFree, LocalFree.


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