BOOL VerQueryValue(lpvBlock, lpszSubBlock, lplpBuffer, lpcb) | |||||
const LPVOID lpvBlock; | /* address of buffer for version resource | */ | |||
LPSTR lpszSubBlock; | /* address of value to retrieve | */ | |||
LPVOID *lplpBuffer; | /* address of buffer for version pointer | */ | |||
LPDWORD lpcb; | /* address of version-value length buffer | */ |
The VerQueryValue function returns selected version information from the specified version-information resource. To obtain the appropriate resource, the GetFileVersionInfo function must be called before VerQueryValue.
lpvBlock
Points to the buffer containing the version-information resource returned by the GetFileVersionInfo function.
lpszSubBlock
Points to a zero-terminated string specifying which version-information value to retrieve. The string consists of names separated by backslashes (\) and can have one of the following forms:
Form | Description |
\ | ||
Specifies the root block. The function retrieves a pointer to the VS_FIXEDFILEINFO structure for the version-information resource. | ||
\VarFileInfo\Translation | ||
Specifies the translation table in the variable information block. The function retrieves a pointer to an array of language and character-set identifiers. An application uses these identifiers to create the name of an language-specific block in the version-information resource. | ||
\StringFileInfo\lang-charset\string-name | ||
Specifies a value in a language-specific block. The lang-charset name is a concatenation of a language and character-set identifier pair found in the translation table for the resource. The lang-charset name must be specified as a hexadecimal string. The string-name name is one of the predefined strings described in the following Comments section. |
lplpBuffer
Points to a buffer that receives a pointer to the version-information value.
lpcb
Points to a buffer that receives the length, in bytes, of the version-information value.
The return value is nonzero if the specified block exists and version information is available. If lpcb is zero, no value is available for the specified version-information name. The return value is zero if the specified name does not exist or the resource pointed to by lpvBlock is not valid.
GetFileVersionInfo, VS_VERSION_INFO