Argument | Type | Description |
clsidOld | REFCID | The class for which the emulation information is to be retrieved. |
pclsidNew | CLSID * | The place at which to return the class, if any, which emulates clsidOld. clsidOld is returned if there is no such class. pclsidNew may not be NULL. |
Return Value | Meaning |
S_OK | Success. A new, (possibly) different CLSID is returned through *pclisdNew. |
S_FALSE | Success. The class is emulating itself. |
CO_E_READREGDB | . |
E_UNEXPECTED | An unspecified error occurred. |
TreatAs = {<new CLSID>}
When the Windows COM implementation of CoGetClassObject attempts to locate a server for a CLSID, it will always call CoGetTreatAsClass to retrieve the actual CLSID to use. Since CoGetTreatAsClass will return the same CLSID as passed in if no emulation exists, COM doesn't have to do any special case checks for emulation.