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

VxWorks

开发平台:

C/C++

  1. /* RemoteActivation_ps.cpp generated by WIDL Version 2.2.1 on 06-Dec-01 at 11:54:44 AM */
  2. #define __WIDL_PROXY_STUB 0x0200
  3. #include "dcomProxy.h"
  4. #include "RemoteActivation.h"
  5. #include <string.h>
  6. extern "C" int include_RemoteActivation () {return 0;}
  7. NdrTypeDesc StructDesc_tagORPCTHIS(NDRTYPES&);
  8. NdrTypeDesc StructDesc_tagORPCTHAT(NDRTYPES&);
  9. NdrTypeDesc StructDesc__GUID(NDRTYPES&);
  10. NdrTypeDesc StructDesc_tagMInterfacePointer(NDRTYPES&);
  11. NdrTypeDesc StructDesc__GUID(NDRTYPES&);
  12. NdrTypeDesc StructDesc_tagDUALSTRINGARRAY(NDRTYPES&);
  13. NdrTypeDesc StructDesc__GUID(NDRTYPES&);
  14. NdrTypeDesc StructDesc_tagCOMVERSION(NDRTYPES&);
  15. NdrTypeDesc StructDesc_tagMInterfacePointer(NDRTYPES&);
  16. HRESULT STDMETHODCALLTYPE IRemoteActivation_RemoteActivation_vxproxy (void* pvRpcChannel, ORPCTHIS* pORPCthis, ORPCTHAT* pORPCthat, GUID* pClsid, WCHAR* pwszObjectName, MInterfacePointer* pObjectStorage, DWORD clientImpLevel, DWORD mode, DWORD nItfs, IID* pIIDs, unsigned short cReqProtseqs, USHORT* reqProtseqs, OXID* pOxid, DUALSTRINGARRAY** ppdsaOxidBindings, IPID* pipidRemUnknown, DWORD* pAuthnHint, COMVERSION* pServerVersion, HRESULT* phr, MInterfacePointer** ppInterfaceData, HRESULT* pResults)
  17.     {
  18.     RPC_PROXY_MSG msg (IID_IRemoteActivation, RpcMode::DCE, 0, pvRpcChannel);
  19.     NDRTYPES ndrtypes;
  20.     HRESULT hrMethod;
  21.     HRESULT hr;
  22.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  23.     hr=widlMarshal (&pORPCthis, pms, ndrtypes.refptr_t(StructDesc_tagORPCTHIS (ndrtypes))); if (FAILED(hr)) return hr;
  24.     hr=widlMarshal (&pClsid, pms, ndrtypes.refptr_t(StructDesc__GUID (ndrtypes))); if (FAILED(hr)) return hr;
  25.     hr=widlMarshal (&pwszObjectName, pms, ndrtypes.pointer_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  26.     hr=widlMarshal (&pObjectStorage, pms, ndrtypes.pointer_t(StructDesc_tagMInterfacePointer (ndrtypes))); if (FAILED(hr)) return hr;
  27.     hr=widlMarshal (&clientImpLevel, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  28.     hr=widlMarshal (&mode, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  29.     hr=widlMarshal (&nItfs, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  30.     hr=widlMarshal (&pIIDs, pms, ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(IID), nItfs))); if (FAILED(hr)) return hr;
  31.     hr=widlMarshal (&cReqProtseqs, pms, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
  32.     hr=widlMarshal (&reqProtseqs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ushort_t (), NDR_SIZEOF(USHORT), cReqProtseqs))); if (FAILED(hr)) return hr;
  33.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  34.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  35.     hr=widlUnmarshal (&pORPCthat, pus, ndrtypes.refptr_t(StructDesc_tagORPCTHAT (ndrtypes))); if (FAILED(hr)) return hr;
  36.     hr=widlUnmarshal (&pOxid, pus, ndrtypes.refptr_t(ndrtypes.hyper_t ())); if (FAILED(hr)) return hr;
  37.     hr=widlUnmarshal (&ppdsaOxidBindings, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagDUALSTRINGARRAY (ndrtypes)))); if (FAILED(hr)) return hr;
  38.     hr=widlUnmarshal (&pipidRemUnknown, pus, ndrtypes.refptr_t(StructDesc__GUID (ndrtypes))); if (FAILED(hr)) return hr;
  39.     hr=widlUnmarshal (&pAuthnHint, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  40.     hr=widlUnmarshal (&pServerVersion, pus, ndrtypes.refptr_t(StructDesc_tagCOMVERSION (ndrtypes))); if (FAILED(hr)) return hr;
  41.     hr=widlUnmarshal (&phr, pus, ndrtypes.refptr_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
  42.     hr=widlUnmarshal (&ppInterfaceData, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(StructDesc_tagMInterfacePointer (ndrtypes)), NDR_SIZEOF(MInterfacePointer*)))); if (FAILED(hr)) return hr;
  43.     hr=widlUnmarshal (&pResults, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT)))); if (FAILED(hr)) return hr;
  44.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  45.     if (FAILED(hr))
  46.         return hr;
  47.     return hrMethod;
  48.     }
  49. HRESULT STDMETHODCALLTYPE IRemoteActivation_RemoteActivation_vxstub (IRemoteActivation* pitf, RPC_STUB_MSG& msg)
  50.     {
  51.     NDRTYPES ndrtypes;
  52.     HRESULT hr;
  53.     HRESULT hrMethod;
  54.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  55.     ORPCTHIS* pORPCthis;
  56.     hr=widlUnmarshal (&pORPCthis, pus, ndrtypes.refptr_t(StructDesc_tagORPCTHIS (ndrtypes))); if (FAILED(hr)) return hr;
  57.     GUID* pClsid;
  58.     hr=widlUnmarshal (&pClsid, pus, ndrtypes.refptr_t(StructDesc__GUID (ndrtypes))); if (FAILED(hr)) return hr;
  59.     WCHAR* pwszObjectName;
  60.     hr=widlUnmarshal (&pwszObjectName, pus, ndrtypes.pointer_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  61.     MInterfacePointer* pObjectStorage;
  62.     hr=widlUnmarshal (&pObjectStorage, pus, ndrtypes.pointer_t(StructDesc_tagMInterfacePointer (ndrtypes))); if (FAILED(hr)) return hr;
  63.     DWORD clientImpLevel;
  64.     hr=widlUnmarshal (&clientImpLevel, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  65.     DWORD mode;
  66.     hr=widlUnmarshal (&mode, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  67.     DWORD nItfs;
  68.     hr=widlUnmarshal (&nItfs, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  69.     IID* pIIDs;
  70.     hr=widlUnmarshal (&pIIDs, pus, ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(IID)))); if (FAILED(hr)) return hr;
  71.     unsigned short cReqProtseqs;
  72.     hr=widlUnmarshal (&cReqProtseqs, pus, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
  73.     USHORT* reqProtseqs;
  74.     hr=widlUnmarshal (&reqProtseqs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ushort_t (), NDR_SIZEOF(USHORT)))); if (FAILED(hr)) return hr;
  75.     ORPCTHAT pORPCthat_tmp;
  76.     ORPCTHAT* pORPCthat = &pORPCthat_tmp;
  77.     OXID pOxid_tmp;
  78.     OXID* pOxid = &pOxid_tmp;
  79.     DUALSTRINGARRAY* ppdsaOxidBindings_tmp;
  80.     DUALSTRINGARRAY** ppdsaOxidBindings = &ppdsaOxidBindings_tmp;
  81.     IPID pipidRemUnknown_tmp;
  82.     IPID* pipidRemUnknown = &pipidRemUnknown_tmp;
  83.     DWORD pAuthnHint_tmp;
  84.     DWORD* pAuthnHint = &pAuthnHint_tmp;
  85.     COMVERSION pServerVersion_tmp;
  86.     COMVERSION* pServerVersion = &pServerVersion_tmp;
  87.     HRESULT phr_tmp;
  88.     HRESULT* phr = &phr_tmp;
  89.     MInterfacePointer** ppInterfaceData = (MInterfacePointer**) CoTaskMemAlloc (NDR_SIZEOF(MInterfacePointer*) * nItfs);
  90.     HRESULT* pResults = (HRESULT*) CoTaskMemAlloc (NDR_SIZEOF(HRESULT) * nItfs);
  91.     hrMethod = RemoteActivation ((void*) msg.channelIdGet (), pORPCthis, pORPCthat, pClsid, pwszObjectName, pObjectStorage, clientImpLevel, mode, nItfs, pIIDs, cReqProtseqs, reqProtseqs, pOxid, ppdsaOxidBindings, pipidRemUnknown, pAuthnHint, pServerVersion, phr, ppInterfaceData, pResults);
  92.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  93.     hr=widlMarshal (&pORPCthat, pms, ndrtypes.refptr_t(StructDesc_tagORPCTHAT (ndrtypes))); if (FAILED(hr)) return hr;
  94.     hr=widlMarshal (&pOxid, pms, ndrtypes.refptr_t(ndrtypes.hyper_t ())); if (FAILED(hr)) return hr;
  95.     hr=widlMarshal (&ppdsaOxidBindings, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagDUALSTRINGARRAY (ndrtypes)))); if (FAILED(hr)) return hr;
  96.     hr=widlMarshal (&pipidRemUnknown, pms, ndrtypes.refptr_t(StructDesc__GUID (ndrtypes))); if (FAILED(hr)) return hr;
  97.     hr=widlMarshal (&pAuthnHint, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  98.     hr=widlMarshal (&pServerVersion, pms, ndrtypes.refptr_t(StructDesc_tagCOMVERSION (ndrtypes))); if (FAILED(hr)) return hr;
  99.     hr=widlMarshal (&phr, pms, ndrtypes.refptr_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
  100.     hr=widlMarshal (&ppInterfaceData, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(StructDesc_tagMInterfacePointer (ndrtypes)), NDR_SIZEOF(MInterfacePointer*), nItfs))); if (FAILED(hr)) return hr;
  101.     hr=widlMarshal (&pResults, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), nItfs))); if (FAILED(hr)) return hr;
  102.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  103.     if (FAILED(hr))
  104.         return hr;
  105.     if ((*pORPCthat).extensions) {if ((*(*pORPCthat).extensions).extent) {{for (DWORD __ix=0; __ix < (*(*pORPCthat).extensions).size; ++__ix) {if (((*(*pORPCthat).extensions).extent[__ix])) {CoTaskMemFree (((*(*pORPCthat).extensions).extent[__ix]));}}}CoTaskMemFree ((*(*pORPCthat).extensions).extent);}CoTaskMemFree ((*pORPCthat).extensions);}if ((*ppdsaOxidBindings)) {CoTaskMemFree ((*ppdsaOxidBindings));}{for (DWORD __ix=0; __ix < nItfs; ++__ix) {if ((ppInterfaceData[__ix])) {CoTaskMemFree ((ppInterfaceData[__ix]));}}};
  106.     CoTaskMemFree (ppInterfaceData);
  107.     CoTaskMemFree (pResults);
  108.     return S_OK;
  109.     }
  110. const PFN_ORPC_STUB stub_functbl_IRemoteActivation [] =
  111.     {
  112.     (PFN_ORPC_STUB) IRemoteActivation_RemoteActivation_vxstub,
  113.     };
  114. EXTERN_C const VXDCOM_STUB_DISPTBL IRemoteActivation_vxstub_disptbl =
  115.     {
  116.     1,
  117.     stub_functbl_IRemoteActivation
  118.     };