CPlusOOP
SiteMap
Advanced COM
Basic COM
Basic COM
«Prev
Com Fundamentals
Component Object Model
COM Specification
Terminology Com Objects
COM Method Property
COM Interface Properties
Interface Definition Language
Compiling IDL Files
Implementing COM Objects
iunknown Interface Navigation
iunknown Reference Counting
COM Type Library
COM Basics
COM Class Objects
iclassfactory Creates Objects
COM Servers
InProcess Com Servers
Creating COM Objects
In Process Com Server
Development Frameworks
Core ATL Classes
Generate ATL Process ComServer
Add COM Class
Adding COM
Examine ATL Code
ATL Project Files
phbook.idl-phbook.h
Designing Data Structures
Designing Methods
Adding Structures Constants
Add readWrite Property
Add Read Only
Add Interface Methods
Add Application Data
Coding COM Methods
Add Phone Record
COM Server Conclusion
Std Api coGetClassObject
1) The rclsid parameter is the CLSID of the COM object whose class factory we are interested in
2) Parameter dwContext is CLSCTX_INPROC_SERVER. This tells COM we want to access a COM object's class factory form an in-process server.
3) pServerInfo is used with DCOM to specify the machine to access the server on. For us this value is NULL. This tells COM to look in the registry for the location of the server.
4) Parameters riid is IID_IClassFactory
5) ppv will contain a pointer to IClassFactory if the call is successful