This topic has not yet been rated - Rate this topic

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.

ValueMeaning
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.

Return codeDescription
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.

 

Remarks

Windows 2000 and Windows NT:  Requires the WMI SDK Update or the Microsoft .NET Framework SDK. For more information about obtaining this SDK, see Windows Management Instrumentation.
Windows NT:  Requires the Microsoft .NET Framework SDK. For more information about obtaining this SDK, see Windows Management Instrumentation.

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Redistributable

WMI Redistributable Components version 1.0 on Windows 2000.

Header

Wmiutils.h

Library

Wbemuuid.lib

DLL

Wmiutils.dll

See also

IWbemPath

 

 

Send comments about this topic to Microsoft

Build date: 11/19/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.