RemoteActivation_ps.cpp
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:9k
- /* RemoteActivation_ps.cpp generated by WIDL Version 2.2.1 on 06-Dec-01 at 11:54:44 AM */
- #define __WIDL_PROXY_STUB 0x0200
- #include "dcomProxy.h"
- #include "RemoteActivation.h"
- #include <string.h>
- extern "C" int include_RemoteActivation () {return 0;}
- NdrTypeDesc StructDesc_tagORPCTHIS(NDRTYPES&);
- NdrTypeDesc StructDesc_tagORPCTHAT(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagMInterfacePointer(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagDUALSTRINGARRAY(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagCOMVERSION(NDRTYPES&);
- NdrTypeDesc StructDesc_tagMInterfacePointer(NDRTYPES&);
- 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)
- {
- RPC_PROXY_MSG msg (IID_IRemoteActivation, RpcMode::DCE, 0, pvRpcChannel);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pORPCthis, pms, ndrtypes.refptr_t(StructDesc_tagORPCTHIS (ndrtypes))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pClsid, pms, ndrtypes.refptr_t(StructDesc__GUID (ndrtypes))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pwszObjectName, pms, ndrtypes.pointer_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pObjectStorage, pms, ndrtypes.pointer_t(StructDesc_tagMInterfacePointer (ndrtypes))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&clientImpLevel, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&mode, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&nItfs, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pIIDs, pms, ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(IID), nItfs))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&cReqProtseqs, pms, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&reqProtseqs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ushort_t (), NDR_SIZEOF(USHORT), cReqProtseqs))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pORPCthat, pus, ndrtypes.refptr_t(StructDesc_tagORPCTHAT (ndrtypes))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pOxid, pus, ndrtypes.refptr_t(ndrtypes.hyper_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppdsaOxidBindings, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagDUALSTRINGARRAY (ndrtypes)))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pipidRemUnknown, pus, ndrtypes.refptr_t(StructDesc__GUID (ndrtypes))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pAuthnHint, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pServerVersion, pus, ndrtypes.refptr_t(StructDesc_tagCOMVERSION (ndrtypes))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&phr, pus, ndrtypes.refptr_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppInterfaceData, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(StructDesc_tagMInterfacePointer (ndrtypes)), NDR_SIZEOF(MInterfacePointer*)))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pResults, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT)))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IRemoteActivation_RemoteActivation_vxstub (IRemoteActivation* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- ORPCTHIS* pORPCthis;
- hr=widlUnmarshal (&pORPCthis, pus, ndrtypes.refptr_t(StructDesc_tagORPCTHIS (ndrtypes))); if (FAILED(hr)) return hr;
- GUID* pClsid;
- hr=widlUnmarshal (&pClsid, pus, ndrtypes.refptr_t(StructDesc__GUID (ndrtypes))); if (FAILED(hr)) return hr;
- WCHAR* pwszObjectName;
- hr=widlUnmarshal (&pwszObjectName, pus, ndrtypes.pointer_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- MInterfacePointer* pObjectStorage;
- hr=widlUnmarshal (&pObjectStorage, pus, ndrtypes.pointer_t(StructDesc_tagMInterfacePointer (ndrtypes))); if (FAILED(hr)) return hr;
- DWORD clientImpLevel;
- hr=widlUnmarshal (&clientImpLevel, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD mode;
- hr=widlUnmarshal (&mode, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD nItfs;
- hr=widlUnmarshal (&nItfs, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- IID* pIIDs;
- hr=widlUnmarshal (&pIIDs, pus, ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(IID)))); if (FAILED(hr)) return hr;
- unsigned short cReqProtseqs;
- hr=widlUnmarshal (&cReqProtseqs, pus, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- USHORT* reqProtseqs;
- hr=widlUnmarshal (&reqProtseqs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ushort_t (), NDR_SIZEOF(USHORT)))); if (FAILED(hr)) return hr;
- ORPCTHAT pORPCthat_tmp;
- ORPCTHAT* pORPCthat = &pORPCthat_tmp;
- OXID pOxid_tmp;
- OXID* pOxid = &pOxid_tmp;
- DUALSTRINGARRAY* ppdsaOxidBindings_tmp;
- DUALSTRINGARRAY** ppdsaOxidBindings = &ppdsaOxidBindings_tmp;
- IPID pipidRemUnknown_tmp;
- IPID* pipidRemUnknown = &pipidRemUnknown_tmp;
- DWORD pAuthnHint_tmp;
- DWORD* pAuthnHint = &pAuthnHint_tmp;
- COMVERSION pServerVersion_tmp;
- COMVERSION* pServerVersion = &pServerVersion_tmp;
- HRESULT phr_tmp;
- HRESULT* phr = &phr_tmp;
- MInterfacePointer** ppInterfaceData = (MInterfacePointer**) CoTaskMemAlloc (NDR_SIZEOF(MInterfacePointer*) * nItfs);
- HRESULT* pResults = (HRESULT*) CoTaskMemAlloc (NDR_SIZEOF(HRESULT) * nItfs);
- hrMethod = RemoteActivation ((void*) msg.channelIdGet (), pORPCthis, pORPCthat, pClsid, pwszObjectName, pObjectStorage, clientImpLevel, mode, nItfs, pIIDs, cReqProtseqs, reqProtseqs, pOxid, ppdsaOxidBindings, pipidRemUnknown, pAuthnHint, pServerVersion, phr, ppInterfaceData, pResults);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pORPCthat, pms, ndrtypes.refptr_t(StructDesc_tagORPCTHAT (ndrtypes))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pOxid, pms, ndrtypes.refptr_t(ndrtypes.hyper_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppdsaOxidBindings, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagDUALSTRINGARRAY (ndrtypes)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pipidRemUnknown, pms, ndrtypes.refptr_t(StructDesc__GUID (ndrtypes))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pAuthnHint, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pServerVersion, pms, ndrtypes.refptr_t(StructDesc_tagCOMVERSION (ndrtypes))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phr, pms, ndrtypes.refptr_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
- 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;
- hr=widlMarshal (&pResults, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), nItfs))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- 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]));}}};
- CoTaskMemFree (ppInterfaceData);
- CoTaskMemFree (pResults);
- return S_OK;
- }
- const PFN_ORPC_STUB stub_functbl_IRemoteActivation [] =
- {
- (PFN_ORPC_STUB) IRemoteActivation_RemoteActivation_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IRemoteActivation_vxstub_disptbl =
- {
- 1,
- stub_functbl_IRemoteActivation
- };