CLSIDFromString

This function converts a string generated by the StringFromCLSID function back into the original class identifier.

HRESULT CLSIDFromString(
  LPOLESTR lpsz, 
  LPCLSID pclsid
); 

Parameters

  • lpsz
    [in] Long pointer to the null-terminated string that represents the class identifier.
  • pclsid
    [out] Pointer to the class identifier on return.

Return Values

One of the values described in the following table is returned.

Value Description
NOERROR The class identifier was obtained successfully.
CO_E_CLASSSTRING The class string was improperly formatted.
REGDB_E_WRITEREGDB The class identifier corresponding to the class string was not found in the registry.

The standard return value E_INVALIDARG is also supported.

Remarks

Passing into this function any invalid and, under some circumstances, NULL pointers result in unexpected termination of the application.

To determine whether the platform supports this function, see Determining Supported COM APIs.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Objbase.h.
Link Library: Ole32.lib.

See Also

StringFromCLSID

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.