Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IWbemPath interface

The IWbemPath interface is the primary interface for the object path parser and makes parsing a path available to programs in a standard way. This interface is the main interface for setting and retrieving path information.

The following table lists the methods for IWbemPath.

Members

The IWbemPath interface inherits from the IUnknown interface. IWbemPath also has these types of members:

Methods

The IWbemPath interface has these methods.

MethodDescription
CreateClassPart

Initializes the class/key portion of the path.

DeleteClassPart

Deletes the class portion of the path.

GetClassName

Retrieves the class name from the path.

GetInfo

Returns details about a path that has been placed into a parser object.

GetKeyList

Retrieves an IWbemPathKeyList pointer so that the individual key may be accessed.

GetNamespaceAt

Retrieves a namespace based upon its index.

GetNamespaceCount

Returns the number of namespaces in the path.

GetScope

Retrieves a scope based upon an index.

GetScopeAsText

Retrieves a scope in text format based upon an index.

GetScopeCount

Returns the number of scopes in the path.

GetServer

Returns the server portion of the path.

GetText

Returns a textual representation of a path that has previously been placed into a parser object.

IsLocal

Tests if the computer name passed in matches the computer name in the path.

IsRelative

Tests if the path is relative to a particular computer and namespace.

IsRelativeOrChild

Tests if the path is relative to or a child of a particular computer and namespace.

IsSameClassName

Tests whether the class name passed in matches the one in the path.

RemoveAllNamespaces

Removes the namespace portion of the path.

RemoveAllScopes

Removes all scopes from the path.

RemoveNamespaceAt

Removes a namespace at a particular index.

RemoveScope

Removes a scope based on the index.

SetClassName

Sets the class name portion of the path.

SetNamespaceAt

Sets a namespace's value in the path based upon an index.

SetScope

Sets a scope in the path based upon an index.

SetScopeFromText

Not implemented.

SetServer

Sets the server portion of the path.

SetText

Parses a path so that information on the path can be returned by the path parser.

 

Examples

The following C++ example shows how to create an object path parser object. The code requires the following #include statements and references.


#define _WIN32_DCOM
#include <comdef.h>
#include <wmiutils.h>
#pragma comment(lib, "wbemuuid.lib")


IWbemPath *pParser = NULL;
HRESULT hr = NULL;
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
hr = CoCreateInstance(CLSID_WbemDefPath,
                      0,
                      CLSCTX_INPROC_SERVER,
                      IID_IWbemPath,
                      (LPVOID *)&pParser);
// -- do something
pParser->Release();

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Wmiutils.h

Library

Wbemuuid.lib

DLL

Wmiutils.dll

 

 

Show:
© 2014 Microsoft. All rights reserved.