IDebugControl::GetSystemVersion method (dbgeng.h)

The GetSystemVersion method returns information that identifies the operating system on the computer that is running the current target.

Syntax

HRESULT GetSystemVersion(
  [out]           PULONG PlatformId,
  [out]           PULONG Major,
  [out]           PULONG Minor,
  [out, optional] PSTR   ServicePackString,
  [in]            ULONG  ServicePackStringSize,
  [out, optional] PULONG ServicePackStringUsed,
  [out]           PULONG ServicePackNumber,
  [out, optional] PSTR   BuildString,
  [in]            ULONG  BuildStringSize,
  [out, optional] PULONG BuildStringUsed
);

Parameters

[out] PlatformId

Receives the platform ID. PlatformId is always VER_PLATFORM_WIN32_NT for NT-based Windows.

[out] Major

Receives 0xF if the target's operating system is a free build, or 0xC if the operating system is a checked build.

[out] Minor

Receives the build number for the target's operating system.

[out, optional] ServicePackString

Receives the string for the service pack level of the target computer. If ServicePackString is NULL, this information is not returned. If no service pack is installed, ServicePackString can be empty.

[in] ServicePackStringSize

Specifies the size, in characters, of the buffer that ServicePackString specifies. This size includes the space for the '\0' terminating character.

[out, optional] ServicePackStringUsed

Receives the size, in characters, of the string of the service pack level. This size includes the space for the '\0' terminating character. If ServicePackStringUsed is NULL, this information is not returned.

[out] ServicePackNumber

Receives the service pack level of the target's operating system.

[out, optional] BuildString

Receives the string that identifies the build of the system. If BuildString is NULL, this information is not returned.

[in] BuildStringSize

Specifies the size, in characters, of the buffer that BuildString specifies. This size includes the space for the '\0' terminating character.

[out, optional] BuildStringUsed

Receives the size, in characters, of the string that identifies the build. This size includes the space for the '\0' terminating character. If BuildStringUsed is NULL, this information is not returned.

Return value

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

Return code Description
S_OK
The method was successful.
S_FALSE
The method was successful. However, the ServicePackString buffer or the BuildString buffer were too small and the corresponding string was truncated.

Remarks

For more information, see Target Information.

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h, Ntddk.h)

See also

GetSystemVersionString

GetSystemVersionValues

IDebugControl

IDebugControl2

IDebugControl3