CLSIDFromString (Compact 2013)

3/26/2014

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

Syntax

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 Value

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

Header

objbase.h

Library

ole32.lib

See Also

Reference

COM Functions
StringFromCLSID