IWbemPath::GetScope 方法 (wmiutils.h)

IWbemPath::GetScope 方法基于索引检索范围。 此方法检索类名和 IWbemPathKeyList 指针,以便可以检索键的详细信息。

语法

HRESULT GetScope(
  [in]      ULONG            uIndex,
  [in, out] ULONG            *puClassNameBufSize,
  [out]     LPWSTR           pszClass,
  [out]     IWbemPathKeyList **pKeyList
);

参数

[in] uIndex

范围的索引。

[in, out] puClassNameBufSize

调用方将此设置为缓冲区可以容纳的字符数。 成功后,此值设置为复制到缓冲区中的字符数,包括 NULL 终止符。

[out] pszClass

要在其中复制作用域的缓冲区。

[out] pKeyList

指向 IWbemPathKeyList 对象的指针。

返回值

此方法返回以下值。

注解

此方法可用于确定 pszClass 所需的缓冲区大小。 为此,请传入缓冲区的 NULL 指针,将 puClassNameBufSize 设置为 0,然后进行调用。 返回后, puClassNameBufSize 指示 pszClass 及其终止 NULL 字符所需的缓冲区大小。

要求

   
最低受支持的客户端 Windows Vista
最低受支持的服务器 Windows Server 2008
目标平台 Windows
标头 wmiutils.h
Library Wbemuuid.lib
DLL Wmiutils.dll

另请参阅

IWbemPath