IWbemPath::GetScopeAsText method (wmiutils.h)

The IWbemPath::GetScopeAsText method retrieves a scope in text format based on an index.

Syntax

HRESULT GetScopeAsText(
  [in]      ULONG  uIndex,
  [in, out] ULONG  *puTextBufSize,
  [out]     LPWSTR pszText
);

Parameters

[in] uIndex

Index of the scope.

[in, out] puTextBufSize

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

[out] pszText

Buffer where the scope is to be copied.

Return value

This method returns the following values.

Remarks

This method can be used to determine how big a buffer is needed for pszText. This is done by passing in a NULL pointer for the buffer, setting puTextBufSize to zero (0), and then making the call. When returned, puTextBufSize indicates how large a buffer is needed for pszText 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