Debugging Tools for Windows

GetModuleVersionInformation

The GetModuleVersionInformation and GetModuleVersionInformationWide methods return version information for the specified module.

HRESULT
  IDebugSymbols2::GetModuleVersionInformation(
    IN ULONG  Index,
    IN ULONG64  Base,
    IN PCSTR  Item,
    OUT OPTIONAL PVOID  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  VerInfoSize
    );

HRESULT
  IDebugSymbols3::GetModuleVersionInformationWide(
    IN ULONG  Index,
    IN ULONG64  Base,
    IN PCWSTR  Item,
    OUT OPTIONAL PVOID  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  VerInfoSize
    );

#ifdef UNICODE
#define GetModuleVersionInformationT GetModuleVersionInformationWide
#else
#define GetModuleVersionInformationT GetModuleVersionInformation
#endif

Parameters

Index
Specifies the index of the module. If it is set to DEBUG_ANY_ID, the Base parameter is used to specify the location of the module instead.
Base
If Index is DEBUG_ANY_ID, specifies the location in the target's memory address space of the base of the module. Otherwise it is ignored.
Item
Specifies the version information being requested. This string corresponds to the lpSubBlock parameter of the function VerQueryValue. For details on the VerQueryValue function, see the Platform SDK.
Buffer
Receives the requested version information. If Buffer is NULL, this information is not returned.
BufferSize
Specifies the size in characters of the buffer Buffer.
VerInfoSize
Receives the size in characters of the version information. If VerInfoSize is NULL, this information is not returned.

Return Value

S_OK
The method was successful.
S_FALSE
The size of the buffer was smaller than the size of the version information. In this case the buffer is filled with the truncated version information.
E_NOINTERFACE
The specified module was not found.

This method may also return other error values. See Return Values for more details.

Interface Version

GetModuleVersionInformation is available in IDebugSymbols2 and later versions. GetModuleVersionInformationWide is available in IDebugSymbols3 and later versions.

Comments

Module version information is available only for loaded modules and may not be available in all sessions.

For more information about modules, see Modules.

Requirements

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

See Also

GetModuleByOffset2, GetModuleByIndex, GetNumberModules

Build machine: CAPEBUILD