IDebugControl3::GetSystemVersion 方法 (dbgeng.h)

GetSystemVersion 方法返回标识运行当前目标的计算机上的操作系统的信息。

语法

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
);

参数

[out] PlatformId

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

[out] Major

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

[out] Minor

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

[out, optional] ServicePackString

接收目标计算机的 Service Pack 级别的字符串。 如果 ServicePackStringNULL,则不会返回此信息。 如果未安装 Service Pack,ServicePackString 可以为空。

[in] ServicePackStringSize

指定 ServicePackString 指定的缓冲区的大小(以字符为单位)。 此大小包括“\0”终止字符的空间。

[out, optional] ServicePackStringUsed

接收 Service Pack 级别的字符串的大小(以字符为单位)。 此大小包括“\0”终止字符的空间。 如果 ServicePackStringUsedNULL,则不会返回此信息。

[out] ServicePackNumber

接收目标操作系统的 Service Pack 级别。

[out, optional] BuildString

接收标识系统内部版本的字符串。 如果 BuildStringNULL,则不会返回此信息。

[in] BuildStringSize

指定 BuildString 指定的缓冲区的大小(以字符为单位)。 此大小包括“\0”终止字符的空间。

[out, optional] BuildStringUsed

接收标识生成的字符串的大小(以字符为单位)。 此大小包括“\0”终止字符的空间。 如果 BuildStringUsedNULL,则不会返回此信息。

返回值

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

返回代码 说明
S_OK
方法成功。
S_FALSE
方法成功。 但是, ServicePackString 缓冲区或 BuildString 缓冲区太小,相应的字符串被截断。

注解

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

要求

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

另请参阅

GetSystemVersionString

GetSystemVersionValues

IDebugControl

IDebugControl2

IDebugControl3