STDAPI CoCreateInstance( REFCLSID rclsid, //Class identifier (CLSID) of the object LPUNKNOWN pUnkOuter, //Pointer to whether object is or isn't part // of an aggregate DWORD dwClsContext, //Context for running executable code REFIID riid, //Reference to the identifier of the interface LPVOID * ppv //Address of output variable that receives // the interface pointer requested in riid );DWORD dwClsContext 取值 CLSCTX_SERVER 或CLSCTX_LOCAL_SERVER
REFCLSID rclsid, //Class identifier (CLSID) of the object
LPUNKNOWN pUnkOuter, //Pointer to whether object is or isn't part
// of an aggregate
DWORD dwClsContext, //Context for running executable code
REFIID riid, //Reference to the identifier of the interface
LPVOID * ppv //Address of output variable that receives
// the interface pointer requested in riid
);DWORD dwClsContext 取值 CLSCTX_SERVER 或CLSCTX_LOCAL_SERVER