StringFromCLSID

Converts a CLSID into a string of printable characters. Different CLSIDs always convert to different strings.

WINOLEAPI StringFromCLSID(
  REFCLSID rclsid, //CLSID to be converted
  LPOLESTR * ppsz  //Address of output variable that receives a 
                   // pointer to the resulting string
);
 

Parameters

rclsid
[in] CLSID to be converted.
ppsz
[out] Address of LPOLESTR pointer variable that receives a pointer to the resulting string.

Return Values

This function supports the standard return value E_OUTOFMEMORY; as well as the following:

S_OK
Indicates the CLSID was successfully converted and returned.

Remarks

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.

Windows CE: Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application. For more information about handling exceptions, see Programming Considerations.

QuickInfo

  Windows NT: Use version 3.1 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Use version 2.0 or later.
  Header: Declared in objbase.h.
  Import Library: Included as a resource in ole32.dll.

See Also

CLSIDFromString, StringFromGuid2