IWbemPath::GetText method

The IWbemPath::GetText method returns a textual representation of a path that has previously been placed into a parser object.

Syntax


HRESULT GetText(
  [in]      long   lFlags,
  [in, out] ULONG  *puBuffLength,
  [in, out] LPWSTR pszText
);

Parameters

lFlags [in]

Flag which controls how the text is returned.

WBEMPATH_COMPRESSED

Obsolete. Do not use.

WBEMPATH_GET_RELATIVE_ONLY

Returns the relative path, skips server and namespaces.

WBEMPATH_GET_SERVER_TOO

Returns the entire path, including server and namespace.

WBEMPATH_GET_SERVER_AND_NAMESPACE_ONLY

Returns only the server and namespace portion of the path. Ignores the class or key portion.

WBEMPATH_GET_NAMESPACE_ONLY

Returns only the namespace portion of the path.

WBEMPATH_GET_ORIGINAL

Returns whatever was passed in using SetText method.

puBuffLength [in, out]

Caller sets this to the size of pszText. If the method is successful, it sets puBufferLength to the number of wide characters used, including the terminating null character.

pszText [in, out]

Textual representation of the path.

Return value

This method returns the following values.

S_OK

Method executed successfully.

WBEM_E_BUFFER_TOO_SMALL

Buffer pointed to by pszText is too small to hold the text.

WBEM_E_INVALID_PARAMETER

Bad flag or text.

WBEM_E_OUT_OF_MEMORY

Insufficient memory to perform the operation.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Wmiutils.h

Library

Wbemuuid.lib

DLL

Wmiutils.dll

See also

IWbemPath

 

 

Show: