This function converts a class identifier into a string of printable characters. Different class identifiers always convert to different strings.

REFCLSID rclsid, 
LPOLESTR *ppsz); 


  • rclsid
    [in] Class identifier to be converted.
  • ppsz
    [out] Address of LPOLESTR pointer variable that receives a pointer to the resulting null-terminated string.

Return Values

S_OK indicates the class identifier was successfully converted and returned. The standard return value E_OUTOFMEMORY is also supported.


The StringFromCLSID function calls the StringFromGuid2 function to convert a globally unique identifier (GUID) into a string of printable characters.

The caller is responsible for freeing the memory allocated for the string by calling CoTaskMemFree.

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


Runs On Versions Defined in Include Link to
Windows CE OS 2.0 and later Objbase.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CoTaskMemFree, StringFromGuid2

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.