Functions


CLSIDFromString Function

Converts a string generated by the StringFromCLSID function back into the original CLSID.

Syntax

C++
HRESULT CLSIDFromString(
  __in   LPCOLESTR lpsz,
  __out  LPCLSID pclsid
);

Parameters

lpsz [in]

The string representation of the CLSID.

pclsid [out]

A pointer to the CLSID.

Return Value

This function can return the standard return value E_INVALIDARG, as well as the following values.

Return codeDescription
NOERROR

The CLSID was obtained successfully.

CO_E_CLASSSTRING

The class string was improperly formatted.

REGDB_E_CLASSNOTREG

The CLSID corresponding to the class string was not found in the registry.

REGDB_E_READREGDB

The registry could not be opened for reading.

 

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderObjbase.h
LibraryOle32.lib
DLLOle32.dll

See Also

CLSIDFromProgID
StringFromCLSID

Send comments about this topic to Microsoft

Build date: 10/22/2009

Tags :


Community Content

Daniel Earwicker
Incorrect parameter type
The string parameter is of type LPOLESTR in ObjBase.h, instead of LPCOLESTR as suggested here.

(Ideally the header would be corrected to match the documentation, not the other way round.)
Tags : contentbug

Page view tracker