RemUnknown_ps.cpp
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:8k
- /* RemUnknown_ps.cpp generated by WIDL Version 2.2.1 on 06-Dec-01 at 11:54:55 AM */
- #define __WIDL_PROXY_STUB 0x0200
- #include "dcomProxy.h"
- #include "RemUnknown.h"
- #include <string.h>
- extern "C" int include_RemUnknown () {return 0;}
- NdrTypeDesc StructDesc_tagSTDOBJREF(NDRTYPES&);
- NdrTypeDesc StructDesc_tagREMQIRESULT (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagREMQIRESULT, hResult, ndrtypes.long_t ()),
- NDR_MEMBER(tagREMQIRESULT, std, StructDesc_tagSTDOBJREF (ndrtypes)),
- };
- return ndrtypes.struct_t (2, m);
- }
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagREMQIRESULT(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagREMINTERFACEREF (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagREMINTERFACEREF, ipid, StructDesc__GUID (ndrtypes)),
- NDR_MEMBER(tagREMINTERFACEREF, cPublicRefs, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagREMINTERFACEREF, cPrivateRefs, ndrtypes.ulong_t ()),
- };
- return ndrtypes.struct_t (3, m);
- }
- NdrTypeDesc StructDesc_tagREMINTERFACEREF(NDRTYPES&);
- NdrTypeDesc StructDesc_tagREMINTERFACEREF(NDRTYPES&);
- HRESULT STDMETHODCALLTYPE IRemUnknown_RemQueryInterface_vxproxy (IRemUnknown* pThis, REFIPID ipid, unsigned long cRefs, unsigned short cIids, const IID* iids, REMQIRESULT** ppQIResults)
- {
- RPC_PROXY_MSG msg (IID_IRemUnknown, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ipid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- hr=widlMarshal (&cRefs, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&cIids, pms, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&iids, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(IID), cIids))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppQIResults, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagREMQIRESULT (ndrtypes), NDR_SIZEOF(REMQIRESULT))))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IRemUnknown_RemQueryInterface_vxstub (IRemUnknown* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- IPID ipid;
- hr=widlUnmarshal (&ipid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- unsigned long cRefs;
- hr=widlUnmarshal (&cRefs, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- unsigned short cIids;
- hr=widlUnmarshal (&cIids, pus, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- IID* iids;
- hr=widlUnmarshal (&iids, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(IID)))); if (FAILED(hr)) return hr;
- REMQIRESULT* ppQIResults_tmp;
- REMQIRESULT** ppQIResults = &ppQIResults_tmp;
- hrMethod = pitf->RemQueryInterface (ipid, cRefs, cIids, iids, ppQIResults);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- 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;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppQIResults)) {CoTaskMemFree ((*ppQIResults));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IRemUnknown_RemAddRef_vxproxy (IRemUnknown* pThis, unsigned short cInterfaceRefs, REMINTERFACEREF* InterfaceRefs, HRESULT* pResults)
- {
- RPC_PROXY_MSG msg (IID_IRemUnknown, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&cInterfaceRefs, pms, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&InterfaceRefs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagREMINTERFACEREF (ndrtypes), NDR_SIZEOF(REMINTERFACEREF), cInterfaceRefs))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pResults, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), cInterfaceRefs))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IRemUnknown_RemAddRef_vxstub (IRemUnknown* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- unsigned short cInterfaceRefs;
- hr=widlUnmarshal (&cInterfaceRefs, pus, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- REMINTERFACEREF* InterfaceRefs;
- hr=widlUnmarshal (&InterfaceRefs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagREMINTERFACEREF (ndrtypes), NDR_SIZEOF(REMINTERFACEREF)))); if (FAILED(hr)) return hr;
- HRESULT* pResults;
- hr=widlUnmarshal (&pResults, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->RemAddRef (cInterfaceRefs, InterfaceRefs, pResults);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IRemUnknown_RemRelease_vxproxy (IRemUnknown* pThis, unsigned short cInterfaceRefs, REMINTERFACEREF* InterfaceRefs)
- {
- RPC_PROXY_MSG msg (IID_IRemUnknown, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&cInterfaceRefs, pms, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&InterfaceRefs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagREMINTERFACEREF (ndrtypes), NDR_SIZEOF(REMINTERFACEREF), cInterfaceRefs))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IRemUnknown_RemRelease_vxstub (IRemUnknown* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- unsigned short cInterfaceRefs;
- hr=widlUnmarshal (&cInterfaceRefs, pus, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- REMINTERFACEREF* InterfaceRefs;
- hr=widlUnmarshal (&InterfaceRefs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagREMINTERFACEREF (ndrtypes), NDR_SIZEOF(REMINTERFACEREF)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->RemRelease (cInterfaceRefs, InterfaceRefs);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- COM_VTABLE(IRemUnknown) IRemUnknown_vxproxy_vtbl = {
- COM_VTBL_HEADER
- COM_VTBL_METHOD(&IUnknown_QueryInterface_vxproxy),
- COM_VTBL_METHOD(&IUnknown_AddRef_vxproxy),
- COM_VTBL_METHOD(&IUnknown_Release_vxproxy),
- COM_VTBL_METHOD(&IRemUnknown_RemQueryInterface_vxproxy),
- COM_VTBL_METHOD(&IRemUnknown_RemAddRef_vxproxy),
- COM_VTBL_METHOD(&IRemUnknown_RemRelease_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IRemUnknown [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IRemUnknown_RemQueryInterface_vxstub,
- (PFN_ORPC_STUB) IRemUnknown_RemAddRef_vxstub,
- (PFN_ORPC_STUB) IRemUnknown_RemRelease_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IRemUnknown_vxstub_disptbl =
- {
- 6,
- stub_functbl_IRemUnknown
- };
- VXDCOM_PS_AUTOREGISTER(IRemUnknown);