IDebugControl4::GetSystemVersionValues 方法 (dbgeng.h)

GetSystemVersionValues 方法返回当前目标的版本号信息。

语法

HRESULT GetSystemVersionValues(
  [out]           PULONG PlatformId,
  [out]           PULONG Win32Major,
  [out]           PULONG Win32Minor,
  [out, optional] PULONG KdMajor,
  [out, optional] PULONG KdMinor
);

参数

[out] PlatformId

接收平台 ID。 对于基于 NT 的 Windows,PlatformId 始终VER_PLATFORM_WIN32_NT。

[out] Win32Major

接收目标作系统的主要版本号。 对于 Windows 2000、Windows XP 和 Windows Server 2003,此数字为 5。 对于 Windows Vista、Windows 7 和 Windows 8,此数字为 6。

[out] Win32Minor

接收目标的作系统的次要版本号。 对于 Windows 2000,这是 0;对于 Windows XP,1;对于 Windows Server 2003、2。 对于 Windows Vista,这是 0;对于 Windows 7,1;适用于 Windows 8、2。

[out, optional] KdMajor

如果目标的作系统是免费版本,则接收0xF;如果它是已检查的生成,则0xC。

[out, optional] KdMinor

接收目标的作系统的内部版本号。

返回值

此方法也可能返回错误值。 有关详细信息,请参阅 返回值

返回代码 描述
S_OK
该方法成功。

言论

有关详细信息,请参阅 目标信息

要求

要求 价值
目标平台 桌面
标头 dbgeng.h (包括 Dbgeng.h)

另请参阅

GetSystemVersion

GetSystemVersionString

IDebugControl4