Debugging Tools for Windows

GetSystemVersionString

The GetSystemVersionString and GetSystemVersionStringWide methods return a string that describes the target's operating system version.

HRESULT
  IDebugControl4::GetSystemVersionString(
    IN ULONG  Which,
    OUT OPTIONAL PSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  StringSize
    );

HRESULT
  IDebugControl4::GetSystemVersionStringWide(
    IN ULONG  Which,
    OUT OPTIONAL PWSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  StringSize
    );

#ifdef UNICODE
#define GetSystemVersionStringT GetSystemVersionStringWide
#else
#define GetSystemVersionStringT GetSystemVersionString
#endif

Parameters

Which
Specifies which version string to return. The possible values are listed in the following table.
Value Version string
DEBUG_SYSVERSTR_SERVICE_PACK Returns a description of the service pack for the target's operating system. For example, "Service Pack 1".
DEBUG_SYSVERSTR_BUILD Returns a description of the target's operating system build version. For example, "kernel32.dll version: 5.1.2600.1106 (xpsp1.020828-1920)".

Buffer
Receives the version string. If Buffer is NULL, this information is not returned.
BufferSize
Specifies the size, in characters, of the buffer that Buffer specifies.
StringSize
Receives the size, in characters, of the string that identifies the build. If SizeString is NULL, this information is not returned.

Return Value

S_OK
The method was successful.
S_FALSE
The method was successful. However, the buffer was too small, so the string was truncated.

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

Interface Version

GetSystemVersionString and GetSystemVersionStringWide are available in IDebugControl4 and later versions.

Comments

For more information, see Target Information.

Requirements

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

See Also

GetSystemVersion, GetSystemVersionValues

Build machine: CAPEBUILD