IWbemPath::GetClassName method (wmiutils.h)

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


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


[in, out] puBuffLength

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.

[in, out] pszName

Buffer into which the class name is copied.

Return value

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


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.


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