RemUnknown_ps.cpp
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:8k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* RemUnknown_ps.cpp generated by WIDL Version 2.2.1 on 06-Dec-01 at 11:54:55 AM */
  2. #define __WIDL_PROXY_STUB 0x0200
  3. #include "dcomProxy.h"
  4. #include "RemUnknown.h"
  5. #include <string.h>
  6. extern "C" int include_RemUnknown () {return 0;}
  7. NdrTypeDesc StructDesc_tagSTDOBJREF(NDRTYPES&);
  8. NdrTypeDesc StructDesc_tagREMQIRESULT (NDRTYPES& ndrtypes)
  9.     {
  10.     NdrMemberInfo m [] =
  11.         {
  12.         NDR_MEMBER(tagREMQIRESULT, hResult, ndrtypes.long_t ()),
  13.         NDR_MEMBER(tagREMQIRESULT, std, StructDesc_tagSTDOBJREF (ndrtypes)),
  14.         };
  15.     return ndrtypes.struct_t (2, m);
  16.     }
  17. NdrTypeDesc StructDesc__GUID(NDRTYPES&);
  18. NdrTypeDesc StructDesc__GUID(NDRTYPES&);
  19. NdrTypeDesc StructDesc_tagREMQIRESULT(NDRTYPES&);
  20. NdrTypeDesc StructDesc__GUID(NDRTYPES&);
  21. NdrTypeDesc StructDesc_tagREMINTERFACEREF (NDRTYPES& ndrtypes)
  22.     {
  23.     NdrMemberInfo m [] =
  24.         {
  25.         NDR_MEMBER(tagREMINTERFACEREF, ipid, StructDesc__GUID (ndrtypes)),
  26.         NDR_MEMBER(tagREMINTERFACEREF, cPublicRefs, ndrtypes.ulong_t ()),
  27.         NDR_MEMBER(tagREMINTERFACEREF, cPrivateRefs, ndrtypes.ulong_t ()),
  28.         };
  29.     return ndrtypes.struct_t (3, m);
  30.     }
  31. NdrTypeDesc StructDesc_tagREMINTERFACEREF(NDRTYPES&);
  32. NdrTypeDesc StructDesc_tagREMINTERFACEREF(NDRTYPES&);
  33. HRESULT STDMETHODCALLTYPE IRemUnknown_RemQueryInterface_vxproxy (IRemUnknown* pThis, REFIPID ipid, unsigned long cRefs, unsigned short cIids, const IID* iids, REMQIRESULT** ppQIResults)
  34.     {
  35.     RPC_PROXY_MSG msg (IID_IRemUnknown, RpcMode::OBJECT, 3, pThis);
  36.     NDRTYPES ndrtypes;
  37.     HRESULT hrMethod;
  38.     HRESULT hr;
  39.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  40.     hr=widlMarshal (&ipid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
  41.     hr=widlMarshal (&cRefs, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  42.     hr=widlMarshal (&cIids, pms, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
  43.     hr=widlMarshal (&iids, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(IID), cIids))); if (FAILED(hr)) return hr;
  44.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  45.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  46.     hr=widlUnmarshal (&ppQIResults, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagREMQIRESULT (ndrtypes), NDR_SIZEOF(REMQIRESULT))))); if (FAILED(hr)) return hr;
  47.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  48.     if (FAILED(hr))
  49.         return hr;
  50.     return hrMethod;
  51.     }
  52. HRESULT STDMETHODCALLTYPE IRemUnknown_RemQueryInterface_vxstub (IRemUnknown* pitf, RPC_STUB_MSG& msg)
  53.     {
  54.     NDRTYPES ndrtypes;
  55.     HRESULT hr;
  56.     HRESULT hrMethod;
  57.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  58.     IPID ipid;
  59.     hr=widlUnmarshal (&ipid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
  60.     unsigned long cRefs;
  61.     hr=widlUnmarshal (&cRefs, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  62.     unsigned short cIids;
  63.     hr=widlUnmarshal (&cIids, pus, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
  64.     IID* iids;
  65.     hr=widlUnmarshal (&iids, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(IID)))); if (FAILED(hr)) return hr;
  66.     REMQIRESULT* ppQIResults_tmp;
  67.     REMQIRESULT** ppQIResults = &ppQIResults_tmp;
  68.     hrMethod = pitf->RemQueryInterface (ipid, cRefs, cIids, iids, ppQIResults);
  69.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  70.     hr=widlMarshal (&ppQIResults, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagREMQIRESULT (ndrtypes), NDR_SIZEOF(REMQIRESULT), cIids)))); if (FAILED(hr)) return hr;
  71.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  72.     if (FAILED(hr))
  73.         return hr;
  74.     if ((*ppQIResults)) {CoTaskMemFree ((*ppQIResults));};
  75.     return S_OK;
  76.     }
  77. HRESULT STDMETHODCALLTYPE IRemUnknown_RemAddRef_vxproxy (IRemUnknown* pThis, unsigned short cInterfaceRefs, REMINTERFACEREF* InterfaceRefs, HRESULT* pResults)
  78.     {
  79.     RPC_PROXY_MSG msg (IID_IRemUnknown, RpcMode::OBJECT, 4, pThis);
  80.     NDRTYPES ndrtypes;
  81.     HRESULT hrMethod;
  82.     HRESULT hr;
  83.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  84.     hr=widlMarshal (&cInterfaceRefs, pms, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
  85.     hr=widlMarshal (&InterfaceRefs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagREMINTERFACEREF (ndrtypes), NDR_SIZEOF(REMINTERFACEREF), cInterfaceRefs))); if (FAILED(hr)) return hr;
  86.     hr=widlMarshal (&pResults, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), cInterfaceRefs))); if (FAILED(hr)) return hr;
  87.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  88.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  89.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  90.     if (FAILED(hr))
  91.         return hr;
  92.     return hrMethod;
  93.     }
  94. HRESULT STDMETHODCALLTYPE IRemUnknown_RemAddRef_vxstub (IRemUnknown* pitf, RPC_STUB_MSG& msg)
  95.     {
  96.     NDRTYPES ndrtypes;
  97.     HRESULT hr;
  98.     HRESULT hrMethod;
  99.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  100.     unsigned short cInterfaceRefs;
  101.     hr=widlUnmarshal (&cInterfaceRefs, pus, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
  102.     REMINTERFACEREF* InterfaceRefs;
  103.     hr=widlUnmarshal (&InterfaceRefs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagREMINTERFACEREF (ndrtypes), NDR_SIZEOF(REMINTERFACEREF)))); if (FAILED(hr)) return hr;
  104.     HRESULT* pResults;
  105.     hr=widlUnmarshal (&pResults, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT)))); if (FAILED(hr)) return hr;
  106.     hrMethod = pitf->RemAddRef (cInterfaceRefs, InterfaceRefs, pResults);
  107.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  108.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  109.     if (FAILED(hr))
  110.         return hr;
  111.     return S_OK;
  112.     }
  113. HRESULT STDMETHODCALLTYPE IRemUnknown_RemRelease_vxproxy (IRemUnknown* pThis, unsigned short cInterfaceRefs, REMINTERFACEREF* InterfaceRefs)
  114.     {
  115.     RPC_PROXY_MSG msg (IID_IRemUnknown, RpcMode::OBJECT, 5, pThis);
  116.     NDRTYPES ndrtypes;
  117.     HRESULT hrMethod;
  118.     HRESULT hr;
  119.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  120.     hr=widlMarshal (&cInterfaceRefs, pms, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
  121.     hr=widlMarshal (&InterfaceRefs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagREMINTERFACEREF (ndrtypes), NDR_SIZEOF(REMINTERFACEREF), cInterfaceRefs))); if (FAILED(hr)) return hr;
  122.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  123.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  124.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  125.     if (FAILED(hr))
  126.         return hr;
  127.     return hrMethod;
  128.     }
  129. HRESULT STDMETHODCALLTYPE IRemUnknown_RemRelease_vxstub (IRemUnknown* pitf, RPC_STUB_MSG& msg)
  130.     {
  131.     NDRTYPES ndrtypes;
  132.     HRESULT hr;
  133.     HRESULT hrMethod;
  134.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  135.     unsigned short cInterfaceRefs;
  136.     hr=widlUnmarshal (&cInterfaceRefs, pus, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
  137.     REMINTERFACEREF* InterfaceRefs;
  138.     hr=widlUnmarshal (&InterfaceRefs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagREMINTERFACEREF (ndrtypes), NDR_SIZEOF(REMINTERFACEREF)))); if (FAILED(hr)) return hr;
  139.     hrMethod = pitf->RemRelease (cInterfaceRefs, InterfaceRefs);
  140.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  141.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  142.     if (FAILED(hr))
  143.         return hr;
  144.     return S_OK;
  145.     }
  146. COM_VTABLE(IRemUnknown) IRemUnknown_vxproxy_vtbl = {
  147.     COM_VTBL_HEADER
  148.     COM_VTBL_METHOD(&IUnknown_QueryInterface_vxproxy),
  149.     COM_VTBL_METHOD(&IUnknown_AddRef_vxproxy),
  150.     COM_VTBL_METHOD(&IUnknown_Release_vxproxy),
  151.     COM_VTBL_METHOD(&IRemUnknown_RemQueryInterface_vxproxy),
  152.     COM_VTBL_METHOD(&IRemUnknown_RemAddRef_vxproxy),
  153.     COM_VTBL_METHOD(&IRemUnknown_RemRelease_vxproxy),
  154.     };
  155. const PFN_ORPC_STUB stub_functbl_IRemUnknown [] =
  156.     {
  157.     0,0,0,
  158.     (PFN_ORPC_STUB) IRemUnknown_RemQueryInterface_vxstub,
  159.     (PFN_ORPC_STUB) IRemUnknown_RemAddRef_vxstub,
  160.     (PFN_ORPC_STUB) IRemUnknown_RemRelease_vxstub,
  161.     };
  162. EXTERN_C const VXDCOM_STUB_DISPTBL IRemUnknown_vxstub_disptbl =
  163.     {
  164.     6,
  165.     stub_functbl_IRemUnknown
  166.     };
  167. VXDCOM_PS_AUTOREGISTER(IRemUnknown);