CLSIDFromString function (combaseapi.h)
Converts a string generated by the StringFromCLSID function back into the original CLSID.
Syntax
HRESULT CLSIDFromString(
[in] LPCOLESTR lpsz,
[out] LPCLSID pclsid
);
Parameters
[in] lpsz
The zero terminated string representation of the CLSID or the ProgID or NULL.
[out] pclsid
A pointer to the CLSID.
Return value
This function can return the standard return value E_INVALIDARG, as well as the following values.
Return code | Description |
---|---|
|
The CLSID was obtained successfully. |
|
The class string was improperly formatted. |
Remarks
The CLSID format is {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.
Passing the ProgID results in saving associated CLSID in pclsid. Passing NULL results in GUID_NULL.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | combaseapi.h (include Objbase.h) |
Library | Ole32.lib |
DLL | Ole32.dll |