与In-proc调用没有什么区别,关键是CoCreateInstance的参数不同。

解决方案 »

  1.   

    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
      

  2.   

    有proxy/stud帮你代理了进程通讯,所以接口调用跟in-proc是一样的