Slide 12
Slide 12 text
12
COM/DCOM Tools & API – Instance Creation
CoGetClassObject(rclsid, dwClsContext, pServerInfo, riid, ppv)
DLL EXE Service
1. Locate CLSID in HKEY_CLASSES_ROOT
2. Load DLL from InprocServer32 key
CoLoadLibrary()
3. Call GetProcAddress() for DllGetClassObject()
4. Call DllGetClassObject()
5. Return Class Factory to caller
1. Locate CLSID in a global table that maps CLSID to its
associated Class Factory. This map is managed by
DCOMLaunch (hosted in svchost.exe)
2. If not found, locate CLSID in HKEY_CLASSES_ROOT
3. Launch executable from LocalServer32 key
where Command Line is stored.
DCOMLaunch uses CreateProcess()
4. Created process registers itself in the DCOMLaunch
table by calling CoRegisterClassObject()
5. Once registered, client receives a proxy object to the
class factory
1. Locate CLSID in a global table that maps CLSID to
its associated Class Factory. This map is managed
by DCOMLaunch (hosted in svchost.exe)
2. If not found, locate CLSID in HKEY_CLASSES_ROOT
3. Launch executable from AppID key
where Launch permissions and service name is
stored.
DCOMLaunch contacts SCM
4. Created process registers itself in the
DCOMLaunch table by calling
CoRegisterClassObject()
5. Once registered, client receives a proxy object to
the class factory