IWbemPath::GetScope method (wmiutils.h)

The IWbemPath::GetScope method retrieves a scope based upon an index. This method retrieves the class name and a IWbemPathKeyList pointer so that the details of the keys can be retrieved.

Syntax

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

Parameters

[in] uIndex

Index of the scope.

[in, out] puClassNameBufSize

Caller sets this to the number of characters that the buffer can hold. Upon success, this is set to the number of characters copied into the buffer including the NULL terminator.

[out] pszClass

Buffer where the scope is to be copied.

[out] pKeyList

Pointer to an IWbemPathKeyList object.

Return value

This method returns the following values.

Remarks

This method can be used to determine how big a buffer is needed for pszClass. This is done by passing in a NULL pointer for the buffer, setting puClassNameBufSize to 0 and then making the call. Upon return, puClassNameBufSize indicates how large of a buffer is needed for pszClass and its terminating NULL character.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wmiutils.h
Library Wbemuuid.lib
DLL Wmiutils.dll

See also

IWbemPath