call_as.cpp
上传用户:bjlvip
上传日期:2010-02-08
资源大小:744k
文件大小:1k
源码类别:

Windows编程

开发平台:

Visual C++

  1. // call_as.cpp
  2. // Compile and then link this file with the proxy-stub DLL generated by MIDL
  3. // Find declarations for these functions at the bottom of the MIDL generated.h file
  4. #include "Componentcomponent.h"
  5. // [local] HRESULT GetInterfacePointer4([in] REFIID riid, [out, iid_is(riid)] void** ppv);
  6. // [call_as(GetInterfacePointer4)] HRESULT RemoteGetInterfacePointer4([in] REFIID riid, [out, iid_is(riid)] IUnknown** ppv);
  7. HRESULT __stdcall IPointerTest_GetInterfacePointer4_Proxy(IPointerTest* Me, REFIID riid, void** ppv)
  8. {
  9. return IPointerTest_RemoteGetInterfacePointer4_Proxy(Me, riid, (IUnknown**)ppv);
  10. }
  11. HRESULT __stdcall IPointerTest_GetInterfacePointer4_Stub(IPointerTest* Me, REFIID riid, IUnknown** ppv)
  12. {
  13. return Me->GetInterfacePointer4(riid, (void**)ppv);
  14. }