IWbemPath::GetClassName method

The IWbemPath::GetClassName method retrieves the class name portion from the path.

Syntax


HRESULT GetClassName(
  [in, out]  ULONG *puBuffLength,
  [in, out]  LPWSTR pszName
);

Parameters

puBuffLength [in, out]

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

pszName [in, out]

Buffer into which the class name is copied.

Return value

This method returns an HRESULT indicating the status of the method call.

Return codeDescription
S_OK

Method executed successfully.

WBEM_E_BUFFER_TOO_SMALL

Buffer is not large enough.

WBEM_E_INVALID_PARAMETER

The puBuffLength parameter indicates a nonzero buffer length, but pszName is NULL.

WBEM_E_OUT_OF_MEMORY

Out of memory.

 

Remarks

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

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wmiutils.h

Library

Wbemuuid.lib

DLL

Wmiutils.dll

See also

IWbemPath

 

 

Show:
© 2014 Microsoft