please dont rip this site Prev Next

VerQueryValue info  Overview  Group

The VerQueryValue function returns selected version information from the specified version-information resource. To retrieve the appropriate resource, before you call VerQueryValue, you must first call the GetFileVersionInfoSize function, and then the GetFileVersionInfo function.

As with the other file installation functions, VerQueryValue works only with Win32 file images. It does not work with 16-bit Windows file images.

BOOL VerQueryValue(

    const LPVOID pBlock,

// address of buffer for version resource

    LPTSTR lpSubBlock,

// address of value to retrieve

    LPVOID *lplpBuffer,

// address of buffer for version value pointer

    PUINT puLen 

// address of length buffer

   );

Parameters

pBlock
Points to the buffer containing the version-information resource returned by the GetFileVersionInfo function.
lpSubBlock
Points to a zero-terminated string specifying which version-information value to retrieve. The string must consist of names separated by backslashes (\) and it must 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 array in a Var variable information structure. The function retrieves a pointer to an array of language and code page identifiers. An application can use these identifiers to access a language-specific StringTable structure in the version-information resource.

\StringFileInfo\lang-codepage\string-name

Specifies a value in a language-specific StringTable structure. The lang-codepage name is a concatenation of a language and code page identifier pair found as a DWORD in the translation array for the resource. Here the lang-codepage name must be specified as a hexadecimal string. The string-name name must be one of the predefined strings described in the following Remarks section. The function retrieves a string value specific to the language and code page indicated.

lplpBuffer
Points to a buffer that receives a pointer to the version-information value.
puLen
Points to a buffer that receives the length, in characters, of the version-information value.

Return Values

If the specified version-information structure exists, and version information is available, the return value is nonzero. If the address of the length buffer is zero, no value is available for the specified version-information name.

If the specified name does not exist or the specified resource is not valid, the return value is zero.

Remarks

The Win32 API contains the following predefined version information Unicode strings:

CompanyName FileDescription FileVersion InternalName LegalCopyright OriginalFilename ProductName ProductVersion Comments LegalTrademarks PrivateBuild SpecialBuild

The following example shows how to retrieve the FileDescription string-value from a block of version information, if the language is U.S. English and the code page is Windows Multilingual:

VerQueryValue(pBlock, 

              TEXT("\\StringFileInfo\\040904E4\\FileDescription"), 

              &lpBuffer, 

              &dwBytes); 

 

Call the GetFileVersionInfoSize and GetFileVersionInfo functions before calling the VerQueryValue function to properly initialize the pBlock buffer.

See Also

GetFileVersionInfo, VarFileInfo, Var, StringFileInfo, StringTable, String, GetFileVersionInfoSize, VS_FIXEDFILEINFO, VS_VERSION_INFO 


file: /Techref/os/win/api/win32/func/src/f90_7.htm, 6KB, , updated: 2008/4/17 23:37, local time: 2024/11/24 11:51,
TOP NEW HELP FIND: 
3.145.163.138:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://sxlist.com/TECHREF/os/win/api/win32/func/src/f90_7.htm"> VerQueryValue</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .