CLSIDFromProgID function (combaseapi.h)
Looks up a CLSID in the registry, given a ProgID.
Syntax
HRESULT CLSIDFromProgID(
[in] LPCOLESTR lpszProgID,
[out] LPCLSID lpclsid
);
Parameters
[in] lpszProgID
A pointer to the ProgID whose CLSID is requested.
[out] lpclsid
Receives a pointer to the retrieved CLSID on return.
Return value
This function can return the following values.
Return code | Description |
---|---|
|
The CLSID was retrieved successfully. |
|
The registered CLSID for the ProgID is invalid. |
|
An error occurred writing the CLSID to the registry. See Remarks below. |
Remarks
Given a ProgID, CLSIDFromProgID looks up its associated CLSID in the registry. If the ProgID cannot be found in the registry, CLSIDFromProgID creates an OLE 1 CLSID for the ProgID and a CLSID entry in the registry. Because of the restrictions placed on OLE 1 CLSID values, CLSIDFromProgID and CLSIDFromString are the only two functions that can be used to generate a CLSID for an OLE 1 object.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | combaseapi.h (include Objbase.h) |
Library | Ole32.lib |
DLL | Ole32.dll |