I'm in the process of implementing my first out-of-process COM server (my first COM server altogether, for that matter). I have followed the steps to write an IDL file, generate the code for the proxy/stub DLL, compile the DLL, and register it.
When I check the registry keys, I have
- A key named
HKEY_CLASSES_ROOT/Interface/<GUID>
, whose vaue is (say)IMyApp
and - A key named
HKEY_CLASSES_ROOT/Interface/<GUID>/ProxyStubClsid32
, whose value is<GUID>
, i.e. the same value as in the key name
I don't understand how the the second key's value can be the same <GUID>
value as in the key name, because my current understanding is that
- In
HKEY_CLASSES_ROOT/Interface/<GUID>
, GUID is an interface ID - The value of
ProxyStubClsid32
is not an interface ID, but a class ID referring to the component that implements the above interface - The value of
HKEY_CLASSES_ROOT/CLSID/<GUID>/InprocServer32
(where GUID is the above class ID) points to the proxy DLL
How, then, can the value of HKEY_CLASSES_ROOT/Interface/<GUID>/ProxyStubClsid32
hold the same value GUID if one is an interface ID and the other is a class ID?
EDIT: I'm still hoping for an answer to this one. To put it short: Since a component and an interface are two different things, how can the same ID be used for both?