opcda_ps.cpp
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:121k
- /* opcda_ps.cpp generated by WIDL Version 2.2.1 on 06-Dec-01 at 11:55:00 AM */
- #define __WIDL_PROXY_STUB 0x0200
- #include "dcomProxy.h"
- #include "opcda.h"
- #include <string.h>
- extern "C" int include_opcda () {return 0;}
- NdrTypeDesc StructDesc_tagOPCGROUPHEADER (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCGROUPHEADER, dwSize, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCGROUPHEADER, dwItemCount, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCGROUPHEADER, hClientGroup, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCGROUPHEADER, dwTransactionID, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCGROUPHEADER, hrStatus, ndrtypes.long_t ()),
- };
- return ndrtypes.struct_t (5, m);
- }
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCITEMHEADER1 (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCITEMHEADER1, hClient, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMHEADER1, dwValueOffset, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMHEADER1, wQuality, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCITEMHEADER1, wReserved, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCITEMHEADER1, ftTimeStampItem, StructDesc__FILETIME (ndrtypes)),
- };
- return ndrtypes.struct_t (5, m);
- }
- NdrTypeDesc StructDesc_tagOPCITEMHEADER2 (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCITEMHEADER2, hClient, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMHEADER2, dwValueOffset, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMHEADER2, wQuality, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCITEMHEADER2, wReserved, ndrtypes.short_t ()),
- };
- return ndrtypes.struct_t (4, m);
- }
- NdrTypeDesc StructDesc_tagOPCGROUPHEADERWRITE (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCGROUPHEADERWRITE, dwItemCount, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCGROUPHEADERWRITE, hClientGroup, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCGROUPHEADERWRITE, dwTransactionID, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCGROUPHEADERWRITE, hrStatus, ndrtypes.long_t ()),
- };
- return ndrtypes.struct_t (4, m);
- }
- NdrTypeDesc StructDesc_tagOPCITEMHEADERWRITE (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCITEMHEADERWRITE, hClient, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMHEADERWRITE, dwError, ndrtypes.long_t ()),
- };
- return ndrtypes.struct_t (2, m);
- }
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCITEMSTATE (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCITEMSTATE, hClient, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMSTATE, ftTimeStamp, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCITEMSTATE, wQuality, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCITEMSTATE, wReserved, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCITEMSTATE, vDataValue, ndrtypes.variant_t ()),
- };
- return ndrtypes.struct_t (5, m);
- }
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCSERVERSTATUS (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCSERVERSTATUS, ftStartTime, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCSERVERSTATUS, ftCurrentTime, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCSERVERSTATUS, ftLastUpdateTime, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCSERVERSTATUS, dwServerState, ndrtypes.enum_t ()),
- NDR_MEMBER(tagOPCSERVERSTATUS, dwGroupCount, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCSERVERSTATUS, dwBandWidth, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCSERVERSTATUS, wMajorVersion, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCSERVERSTATUS, wMinorVersion, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCSERVERSTATUS, wBuildNumber, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCSERVERSTATUS, wReserved, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCSERVERSTATUS, szVendorInfo, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- };
- return ndrtypes.struct_t (11, m);
- }
- NdrTypeDesc StructDesc_tagOPCITEMDEF (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCITEMDEF, szAccessPath, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagOPCITEMDEF, szItemID, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagOPCITEMDEF, bActive, ndrtypes.int_t ()),
- NDR_MEMBER(tagOPCITEMDEF, hClient, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMDEF, dwBlobSize, ndrtypes.ulong_t ()),
- NDR_MEMBERX(tagOPCITEMDEF, pBlob, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.uchar_t (), NDR_SIZEOF(BYTE))), 4),
- NDR_MEMBER(tagOPCITEMDEF, vtRequestedDataType, ndrtypes.ushort_t ()),
- NDR_MEMBER(tagOPCITEMDEF, wReserved, ndrtypes.short_t ()),
- };
- return ndrtypes.struct_t (8, m, 4);
- }
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCITEMATTRIBUTES (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCITEMATTRIBUTES, szAccessPath, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, szItemID, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, bActive, ndrtypes.int_t ()),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, hClient, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, hServer, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, dwAccessRights, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, dwBlobSize, ndrtypes.ulong_t ()),
- NDR_MEMBERX(tagOPCITEMATTRIBUTES, pBlob, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.uchar_t (), NDR_SIZEOF(BYTE))), 6),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, vtRequestedDataType, ndrtypes.ushort_t ()),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, vtCanonicalDataType, ndrtypes.ushort_t ()),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, dwEUType, ndrtypes.enum_t ()),
- NDR_MEMBER(tagOPCITEMATTRIBUTES, vEUInfo, ndrtypes.variant_t ()),
- };
- return ndrtypes.struct_t (12, m, 6);
- }
- NdrTypeDesc StructDesc_tagOPCITEMRESULT (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCITEMRESULT, hServer, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMRESULT, vtCanonicalDataType, ndrtypes.ushort_t ()),
- NDR_MEMBER(tagOPCITEMRESULT, wReserved, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCITEMRESULT, dwAccessRights, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCITEMRESULT, dwBlobSize, ndrtypes.ulong_t ()),
- NDR_MEMBERX(tagOPCITEMRESULT, pBlob, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.uchar_t (), NDR_SIZEOF(BYTE))), 4),
- };
- return ndrtypes.struct_t (6, m, 4);
- }
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCSERVERSTATUS(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCITEMSTATE(NDRTYPES&);
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCITEMDEF(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCITEMRESULT(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCITEMDEF(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCITEMRESULT(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCITEMATTRIBUTES(NDRTYPES&);
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- HRESULT STDMETHODCALLTYPE IOPCServer_AddGroup_vxproxy (IOPCServer* pThis, LPCWSTR szName, BOOL bActive, DWORD dwRequestedUpdateRate, OPCHANDLE hClientGroup, LONG* pTimeBias, FLOAT* pPercentDeadband, DWORD dwLCID, OPCHANDLE* phServerGroup, DWORD* pRevisedUpdateRate, REFIID riid, LPUNKNOWN* ppUnk)
- {
- RPC_PROXY_MSG msg (IID_IOPCServer, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&bActive, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwRequestedUpdateRate, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hClientGroup, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pTimeBias, pms, ndrtypes.pointer_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pPercentDeadband, pms, ndrtypes.pointer_t(ndrtypes.float_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwLCID, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&phServerGroup, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pRevisedUpdateRate, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_AddGroup_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPCWSTR szName;
- hr=widlUnmarshal (&szName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- BOOL bActive;
- hr=widlUnmarshal (&bActive, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- DWORD dwRequestedUpdateRate;
- hr=widlUnmarshal (&dwRequestedUpdateRate, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE hClientGroup;
- hr=widlUnmarshal (&hClientGroup, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LONG* pTimeBias;
- hr=widlUnmarshal (&pTimeBias, pus, ndrtypes.pointer_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
- FLOAT* pPercentDeadband;
- hr=widlUnmarshal (&pPercentDeadband, pus, ndrtypes.pointer_t(ndrtypes.float_t ())); if (FAILED(hr)) return hr;
- DWORD dwLCID;
- hr=widlUnmarshal (&dwLCID, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- IID riid;
- hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- OPCHANDLE phServerGroup_tmp;
- OPCHANDLE* phServerGroup = &phServerGroup_tmp;
- DWORD pRevisedUpdateRate_tmp;
- DWORD* pRevisedUpdateRate = &pRevisedUpdateRate_tmp;
- LPUNKNOWN ppUnk_tmp;
- LPUNKNOWN* ppUnk = &ppUnk_tmp;
- hrMethod = pitf->AddGroup (szName, bActive, dwRequestedUpdateRate, hClientGroup, pTimeBias, pPercentDeadband, dwLCID, phServerGroup, pRevisedUpdateRate, riid, ppUnk);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&phServerGroup, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pRevisedUpdateRate, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppUnk)) {((*ppUnk))->Release ();};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_GetErrorString_vxproxy (IOPCServer* pThis, HRESULT dwError, LCID dwLocale, LPWSTR* ppString)
- {
- RPC_PROXY_MSG msg (IID_IOPCServer, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwError, pms, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwLocale, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppString, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_GetErrorString_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- HRESULT dwError;
- hr=widlUnmarshal (&dwError, pus, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- LCID dwLocale;
- hr=widlUnmarshal (&dwLocale, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LPWSTR ppString_tmp;
- LPWSTR* ppString = &ppString_tmp;
- hrMethod = pitf->GetErrorString (dwError, dwLocale, ppString);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppString, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppString)) {CoTaskMemFree ((*ppString));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_GetGroupByName_vxproxy (IOPCServer* pThis, LPCWSTR szName, REFIID riid, LPUNKNOWN* ppUnk)
- {
- RPC_PROXY_MSG msg (IID_IOPCServer, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_GetGroupByName_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPCWSTR szName;
- hr=widlUnmarshal (&szName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- IID riid;
- hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- LPUNKNOWN ppUnk_tmp;
- LPUNKNOWN* ppUnk = &ppUnk_tmp;
- hrMethod = pitf->GetGroupByName (szName, riid, ppUnk);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppUnk)) {((*ppUnk))->Release ();};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_GetStatus_vxproxy (IOPCServer* pThis, OPCSERVERSTATUS** ppServerStatus)
- {
- RPC_PROXY_MSG msg (IID_IOPCServer, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppServerStatus, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCSERVERSTATUS (ndrtypes)))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_GetStatus_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- OPCSERVERSTATUS* ppServerStatus_tmp;
- OPCSERVERSTATUS** ppServerStatus = &ppServerStatus_tmp;
- hrMethod = pitf->GetStatus (ppServerStatus);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppServerStatus, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCSERVERSTATUS (ndrtypes)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppServerStatus)) {if ((*(*ppServerStatus)).szVendorInfo) {CoTaskMemFree ((*(*ppServerStatus)).szVendorInfo);}CoTaskMemFree ((*ppServerStatus));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_RemoveGroup_vxproxy (IOPCServer* pThis, OPCHANDLE hServerGroup, BOOL bForce)
- {
- RPC_PROXY_MSG msg (IID_IOPCServer, RpcMode::OBJECT, 7, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&hServerGroup, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&bForce, pms, ndrtypes.int_t ()); 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 IOPCServer_RemoveGroup_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCHANDLE hServerGroup;
- hr=widlUnmarshal (&hServerGroup, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- BOOL bForce;
- hr=widlUnmarshal (&bForce, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- hrMethod = pitf->RemoveGroup (hServerGroup, bForce);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_CreateGroupEnumerator_vxproxy (IOPCServer* pThis, OPCENUMSCOPE dwScope, REFIID riid, LPUNKNOWN* ppUnk)
- {
- RPC_PROXY_MSG msg (IID_IOPCServer, RpcMode::OBJECT, 8, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwScope, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCServer_CreateGroupEnumerator_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCENUMSCOPE dwScope;
- hr=widlUnmarshal (&dwScope, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- IID riid;
- hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- LPUNKNOWN ppUnk_tmp;
- LPUNKNOWN* ppUnk = &ppUnk_tmp;
- hrMethod = pitf->CreateGroupEnumerator (dwScope, riid, ppUnk);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppUnk)) {((*ppUnk))->Release ();};
- return S_OK;
- }
- COM_VTABLE(IOPCServer) IOPCServer_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(&IOPCServer_AddGroup_vxproxy),
- COM_VTBL_METHOD(&IOPCServer_GetErrorString_vxproxy),
- COM_VTBL_METHOD(&IOPCServer_GetGroupByName_vxproxy),
- COM_VTBL_METHOD(&IOPCServer_GetStatus_vxproxy),
- COM_VTBL_METHOD(&IOPCServer_RemoveGroup_vxproxy),
- COM_VTBL_METHOD(&IOPCServer_CreateGroupEnumerator_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCServer [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCServer_AddGroup_vxstub,
- (PFN_ORPC_STUB) IOPCServer_GetErrorString_vxstub,
- (PFN_ORPC_STUB) IOPCServer_GetGroupByName_vxstub,
- (PFN_ORPC_STUB) IOPCServer_GetStatus_vxstub,
- (PFN_ORPC_STUB) IOPCServer_RemoveGroup_vxstub,
- (PFN_ORPC_STUB) IOPCServer_CreateGroupEnumerator_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCServer_vxstub_disptbl =
- {
- 9,
- stub_functbl_IOPCServer
- };
- VXDCOM_PS_AUTOREGISTER(IOPCServer);
- HRESULT STDMETHODCALLTYPE IOPCServerPublicGroups_GetPublicGroupByName_vxproxy (IOPCServerPublicGroups* pThis, LPCWSTR szName, REFIID riid, LPUNKNOWN* ppUnk)
- {
- RPC_PROXY_MSG msg (IID_IOPCServerPublicGroups, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCServerPublicGroups_GetPublicGroupByName_vxstub (IOPCServerPublicGroups* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPCWSTR szName;
- hr=widlUnmarshal (&szName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- IID riid;
- hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- LPUNKNOWN ppUnk_tmp;
- LPUNKNOWN* ppUnk = &ppUnk_tmp;
- hrMethod = pitf->GetPublicGroupByName (szName, riid, ppUnk);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppUnk)) {((*ppUnk))->Release ();};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCServerPublicGroups_RemovePublicGroup_vxproxy (IOPCServerPublicGroups* pThis, OPCHANDLE hServerGroup, BOOL bForce)
- {
- RPC_PROXY_MSG msg (IID_IOPCServerPublicGroups, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&hServerGroup, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&bForce, pms, ndrtypes.int_t ()); 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 IOPCServerPublicGroups_RemovePublicGroup_vxstub (IOPCServerPublicGroups* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCHANDLE hServerGroup;
- hr=widlUnmarshal (&hServerGroup, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- BOOL bForce;
- hr=widlUnmarshal (&bForce, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- hrMethod = pitf->RemovePublicGroup (hServerGroup, bForce);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- COM_VTABLE(IOPCServerPublicGroups) IOPCServerPublicGroups_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(&IOPCServerPublicGroups_GetPublicGroupByName_vxproxy),
- COM_VTBL_METHOD(&IOPCServerPublicGroups_RemovePublicGroup_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCServerPublicGroups [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCServerPublicGroups_GetPublicGroupByName_vxstub,
- (PFN_ORPC_STUB) IOPCServerPublicGroups_RemovePublicGroup_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCServerPublicGroups_vxstub_disptbl =
- {
- 5,
- stub_functbl_IOPCServerPublicGroups
- };
- VXDCOM_PS_AUTOREGISTER(IOPCServerPublicGroups);
- HRESULT STDMETHODCALLTYPE IOPCBrowseServerAddressSpace_QueryOrganization_vxproxy (IOPCBrowseServerAddressSpace* pThis, OPCNAMESPACETYPE* pNameSpaceType)
- {
- RPC_PROXY_MSG msg (IID_IOPCBrowseServerAddressSpace, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pNameSpaceType, pus, ndrtypes.refptr_t(ndrtypes.enum_t ())); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCBrowseServerAddressSpace_QueryOrganization_vxstub (IOPCBrowseServerAddressSpace* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- OPCNAMESPACETYPE pNameSpaceType_tmp;
- OPCNAMESPACETYPE* pNameSpaceType = &pNameSpaceType_tmp;
- hrMethod = pitf->QueryOrganization (pNameSpaceType);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pNameSpaceType, pms, ndrtypes.refptr_t(ndrtypes.enum_t ())); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCBrowseServerAddressSpace_ChangeBrowsePosition_vxproxy (IOPCBrowseServerAddressSpace* pThis, OPCBROWSEDIRECTION dwBrowseDirection, LPCWSTR szString)
- {
- RPC_PROXY_MSG msg (IID_IOPCBrowseServerAddressSpace, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwBrowseDirection, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&szString, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); 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 IOPCBrowseServerAddressSpace_ChangeBrowsePosition_vxstub (IOPCBrowseServerAddressSpace* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCBROWSEDIRECTION dwBrowseDirection;
- hr=widlUnmarshal (&dwBrowseDirection, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- LPCWSTR szString;
- hr=widlUnmarshal (&szString, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hrMethod = pitf->ChangeBrowsePosition (dwBrowseDirection, szString);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCBrowseServerAddressSpace_BrowseOPCItemIDs_vxproxy (IOPCBrowseServerAddressSpace* pThis, OPCBROWSETYPE dwBrowseFilterType, LPCWSTR szFilterCriteria, VARTYPE vtDataTypeFilter, DWORD dwAccessRightsFilter, LPENUMSTRING* ppIEnumString)
- {
- RPC_PROXY_MSG msg (IID_IOPCBrowseServerAddressSpace, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwBrowseFilterType, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&szFilterCriteria, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&vtDataTypeFilter, pms, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwAccessRightsFilter, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppIEnumString, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IEnumString))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCBrowseServerAddressSpace_BrowseOPCItemIDs_vxstub (IOPCBrowseServerAddressSpace* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCBROWSETYPE dwBrowseFilterType;
- hr=widlUnmarshal (&dwBrowseFilterType, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- LPCWSTR szFilterCriteria;
- hr=widlUnmarshal (&szFilterCriteria, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- VARTYPE vtDataTypeFilter;
- hr=widlUnmarshal (&vtDataTypeFilter, pus, ndrtypes.ushort_t ()); if (FAILED(hr)) return hr;
- DWORD dwAccessRightsFilter;
- hr=widlUnmarshal (&dwAccessRightsFilter, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LPENUMSTRING ppIEnumString_tmp;
- LPENUMSTRING* ppIEnumString = &ppIEnumString_tmp;
- hrMethod = pitf->BrowseOPCItemIDs (dwBrowseFilterType, szFilterCriteria, vtDataTypeFilter, dwAccessRightsFilter, ppIEnumString);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppIEnumString, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IEnumString))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppIEnumString)) {((*ppIEnumString))->Release ();};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCBrowseServerAddressSpace_GetItemID_vxproxy (IOPCBrowseServerAddressSpace* pThis, LPWSTR szItemDataID, LPWSTR* szItemID)
- {
- RPC_PROXY_MSG msg (IID_IOPCBrowseServerAddressSpace, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szItemDataID, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&szItemID, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCBrowseServerAddressSpace_GetItemID_vxstub (IOPCBrowseServerAddressSpace* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPWSTR szItemDataID;
- hr=widlUnmarshal (&szItemDataID, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- LPWSTR szItemID_tmp;
- LPWSTR* szItemID = &szItemID_tmp;
- hrMethod = pitf->GetItemID (szItemDataID, szItemID);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szItemID, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*szItemID)) {CoTaskMemFree ((*szItemID));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCBrowseServerAddressSpace_BrowseAccessPaths_vxproxy (IOPCBrowseServerAddressSpace* pThis, LPCWSTR szItemID, LPENUMSTRING* ppIEnumString)
- {
- RPC_PROXY_MSG msg (IID_IOPCBrowseServerAddressSpace, RpcMode::OBJECT, 7, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szItemID, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppIEnumString, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IEnumString))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCBrowseServerAddressSpace_BrowseAccessPaths_vxstub (IOPCBrowseServerAddressSpace* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPCWSTR szItemID;
- hr=widlUnmarshal (&szItemID, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- LPENUMSTRING ppIEnumString_tmp;
- LPENUMSTRING* ppIEnumString = &ppIEnumString_tmp;
- hrMethod = pitf->BrowseAccessPaths (szItemID, ppIEnumString);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppIEnumString, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IEnumString))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppIEnumString)) {((*ppIEnumString))->Release ();};
- return S_OK;
- }
- COM_VTABLE(IOPCBrowseServerAddressSpace) IOPCBrowseServerAddressSpace_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(&IOPCBrowseServerAddressSpace_QueryOrganization_vxproxy),
- COM_VTBL_METHOD(&IOPCBrowseServerAddressSpace_ChangeBrowsePosition_vxproxy),
- COM_VTBL_METHOD(&IOPCBrowseServerAddressSpace_BrowseOPCItemIDs_vxproxy),
- COM_VTBL_METHOD(&IOPCBrowseServerAddressSpace_GetItemID_vxproxy),
- COM_VTBL_METHOD(&IOPCBrowseServerAddressSpace_BrowseAccessPaths_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCBrowseServerAddressSpace [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCBrowseServerAddressSpace_QueryOrganization_vxstub,
- (PFN_ORPC_STUB) IOPCBrowseServerAddressSpace_ChangeBrowsePosition_vxstub,
- (PFN_ORPC_STUB) IOPCBrowseServerAddressSpace_BrowseOPCItemIDs_vxstub,
- (PFN_ORPC_STUB) IOPCBrowseServerAddressSpace_GetItemID_vxstub,
- (PFN_ORPC_STUB) IOPCBrowseServerAddressSpace_BrowseAccessPaths_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCBrowseServerAddressSpace_vxstub_disptbl =
- {
- 8,
- stub_functbl_IOPCBrowseServerAddressSpace
- };
- VXDCOM_PS_AUTOREGISTER(IOPCBrowseServerAddressSpace);
- HRESULT STDMETHODCALLTYPE IOPCGroupStateMgt_GetState_vxproxy (IOPCGroupStateMgt* pThis, DWORD* pUpdateRate, BOOL* pActive, LPWSTR* ppName, LONG* pTimeBias, FLOAT* pPercentDeadband, DWORD* pLCID, OPCHANDLE* phClientGroup, OPCHANDLE* phServerGroup)
- {
- RPC_PROXY_MSG msg (IID_IOPCGroupStateMgt, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pUpdateRate, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pActive, pus, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppName, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pTimeBias, pus, ndrtypes.refptr_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pPercentDeadband, pus, ndrtypes.refptr_t(ndrtypes.float_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pLCID, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&phClientGroup, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&phServerGroup, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCGroupStateMgt_GetState_vxstub (IOPCGroupStateMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- DWORD pUpdateRate_tmp;
- DWORD* pUpdateRate = &pUpdateRate_tmp;
- BOOL pActive_tmp;
- BOOL* pActive = &pActive_tmp;
- LPWSTR ppName_tmp;
- LPWSTR* ppName = &ppName_tmp;
- LONG pTimeBias_tmp;
- LONG* pTimeBias = &pTimeBias_tmp;
- FLOAT pPercentDeadband_tmp;
- FLOAT* pPercentDeadband = &pPercentDeadband_tmp;
- DWORD pLCID_tmp;
- DWORD* pLCID = &pLCID_tmp;
- OPCHANDLE phClientGroup_tmp;
- OPCHANDLE* phClientGroup = &phClientGroup_tmp;
- OPCHANDLE phServerGroup_tmp;
- OPCHANDLE* phServerGroup = &phServerGroup_tmp;
- hrMethod = pitf->GetState (pUpdateRate, pActive, ppName, pTimeBias, pPercentDeadband, pLCID, phClientGroup, phServerGroup);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pUpdateRate, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pActive, pms, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppName, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pTimeBias, pms, ndrtypes.refptr_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pPercentDeadband, pms, ndrtypes.refptr_t(ndrtypes.float_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pLCID, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phClientGroup, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServerGroup, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppName)) {CoTaskMemFree ((*ppName));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCGroupStateMgt_SetState_vxproxy (IOPCGroupStateMgt* pThis, DWORD* pRequestedUpdateRate, DWORD* pRevisedUpdateRate, BOOL* pActive, LONG* pTimeBias, FLOAT* pPercentDeadband, DWORD* pLCID, OPCHANDLE* phClientGroup)
- {
- RPC_PROXY_MSG msg (IID_IOPCGroupStateMgt, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pRequestedUpdateRate, pms, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pActive, pms, ndrtypes.pointer_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pTimeBias, pms, ndrtypes.pointer_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pPercentDeadband, pms, ndrtypes.pointer_t(ndrtypes.float_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pLCID, pms, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phClientGroup, pms, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pRevisedUpdateRate, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCGroupStateMgt_SetState_vxstub (IOPCGroupStateMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD* pRequestedUpdateRate;
- hr=widlUnmarshal (&pRequestedUpdateRate, pus, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- BOOL* pActive;
- hr=widlUnmarshal (&pActive, pus, ndrtypes.pointer_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- LONG* pTimeBias;
- hr=widlUnmarshal (&pTimeBias, pus, ndrtypes.pointer_t(ndrtypes.long_t ())); if (FAILED(hr)) return hr;
- FLOAT* pPercentDeadband;
- hr=widlUnmarshal (&pPercentDeadband, pus, ndrtypes.pointer_t(ndrtypes.float_t ())); if (FAILED(hr)) return hr;
- DWORD* pLCID;
- hr=widlUnmarshal (&pLCID, pus, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- OPCHANDLE* phClientGroup;
- hr=widlUnmarshal (&phClientGroup, pus, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- DWORD pRevisedUpdateRate_tmp;
- DWORD* pRevisedUpdateRate = &pRevisedUpdateRate_tmp;
- hrMethod = pitf->SetState (pRequestedUpdateRate, pRevisedUpdateRate, pActive, pTimeBias, pPercentDeadband, pLCID, phClientGroup);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pRevisedUpdateRate, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCGroupStateMgt_SetName_vxproxy (IOPCGroupStateMgt* pThis, LPCWSTR szName)
- {
- RPC_PROXY_MSG msg (IID_IOPCGroupStateMgt, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); 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 IOPCGroupStateMgt_SetName_vxstub (IOPCGroupStateMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPCWSTR szName;
- hr=widlUnmarshal (&szName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hrMethod = pitf->SetName (szName);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCGroupStateMgt_CloneGroup_vxproxy (IOPCGroupStateMgt* pThis, LPCWSTR szName, REFIID riid, LPUNKNOWN* ppUnk)
- {
- RPC_PROXY_MSG msg (IID_IOPCGroupStateMgt, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCGroupStateMgt_CloneGroup_vxstub (IOPCGroupStateMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPCWSTR szName;
- hr=widlUnmarshal (&szName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- IID riid;
- hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- LPUNKNOWN ppUnk_tmp;
- LPUNKNOWN* ppUnk = &ppUnk_tmp;
- hrMethod = pitf->CloneGroup (szName, riid, ppUnk);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppUnk)) {((*ppUnk))->Release ();};
- return S_OK;
- }
- COM_VTABLE(IOPCGroupStateMgt) IOPCGroupStateMgt_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(&IOPCGroupStateMgt_GetState_vxproxy),
- COM_VTBL_METHOD(&IOPCGroupStateMgt_SetState_vxproxy),
- COM_VTBL_METHOD(&IOPCGroupStateMgt_SetName_vxproxy),
- COM_VTBL_METHOD(&IOPCGroupStateMgt_CloneGroup_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCGroupStateMgt [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCGroupStateMgt_GetState_vxstub,
- (PFN_ORPC_STUB) IOPCGroupStateMgt_SetState_vxstub,
- (PFN_ORPC_STUB) IOPCGroupStateMgt_SetName_vxstub,
- (PFN_ORPC_STUB) IOPCGroupStateMgt_CloneGroup_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCGroupStateMgt_vxstub_disptbl =
- {
- 7,
- stub_functbl_IOPCGroupStateMgt
- };
- VXDCOM_PS_AUTOREGISTER(IOPCGroupStateMgt);
- HRESULT STDMETHODCALLTYPE IOPCPublicGroupStateMgt_GetState_vxproxy (IOPCPublicGroupStateMgt* pThis, BOOL* pPublic)
- {
- RPC_PROXY_MSG msg (IID_IOPCPublicGroupStateMgt, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pPublic, pus, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCPublicGroupStateMgt_GetState_vxstub (IOPCPublicGroupStateMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- BOOL pPublic_tmp;
- BOOL* pPublic = &pPublic_tmp;
- hrMethod = pitf->GetState (pPublic);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pPublic, pms, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCPublicGroupStateMgt_MoveToPublic_vxproxy (IOPCPublicGroupStateMgt* pThis)
- {
- RPC_PROXY_MSG msg (IID_IOPCPublicGroupStateMgt, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT 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 IOPCPublicGroupStateMgt_MoveToPublic_vxstub (IOPCPublicGroupStateMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- hrMethod = pitf->MoveToPublic ();
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- COM_VTABLE(IOPCPublicGroupStateMgt) IOPCPublicGroupStateMgt_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(&IOPCPublicGroupStateMgt_GetState_vxproxy),
- COM_VTBL_METHOD(&IOPCPublicGroupStateMgt_MoveToPublic_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCPublicGroupStateMgt [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCPublicGroupStateMgt_GetState_vxstub,
- (PFN_ORPC_STUB) IOPCPublicGroupStateMgt_MoveToPublic_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCPublicGroupStateMgt_vxstub_disptbl =
- {
- 5,
- stub_functbl_IOPCPublicGroupStateMgt
- };
- VXDCOM_PS_AUTOREGISTER(IOPCPublicGroupStateMgt);
- HRESULT STDMETHODCALLTYPE IOPCSyncIO_Read_vxproxy (IOPCSyncIO* pThis, OPCDATASOURCE dwSource, DWORD dwCount, OPCHANDLE* phServer, OPCITEMSTATE** ppItemValues, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCSyncIO, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwSource, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppItemValues, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagOPCITEMSTATE (ndrtypes), NDR_SIZEOF(OPCITEMSTATE))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCSyncIO_Read_vxstub (IOPCSyncIO* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCDATASOURCE dwSource;
- hr=widlUnmarshal (&dwSource, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- OPCITEMSTATE* ppItemValues_tmp;
- OPCITEMSTATE** ppItemValues = &ppItemValues_tmp;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->Read (dwSource, dwCount, phServer, ppItemValues, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppItemValues, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagOPCITEMSTATE (ndrtypes), NDR_SIZEOF(OPCITEMSTATE), dwCount)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppItemValues)) {{for (DWORD __ix=0; __ix < dwCount; ++__ix) {::VariantClear (&(((*ppItemValues)[__ix]).vDataValue)); }}CoTaskMemFree ((*ppItemValues));}if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCSyncIO_Write_vxproxy (IOPCSyncIO* pThis, DWORD dwCount, OPCHANDLE* phServer, VARIANT* pItemValues, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCSyncIO, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pItemValues, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCSyncIO_Write_vxstub (IOPCSyncIO* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- VARIANT* pItemValues;
- hr=widlUnmarshal (&pItemValues, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT)))); if (FAILED(hr)) return hr;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->Write (dwCount, phServer, pItemValues, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- COM_VTABLE(IOPCSyncIO) IOPCSyncIO_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(&IOPCSyncIO_Read_vxproxy),
- COM_VTBL_METHOD(&IOPCSyncIO_Write_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCSyncIO [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCSyncIO_Read_vxstub,
- (PFN_ORPC_STUB) IOPCSyncIO_Write_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCSyncIO_vxstub_disptbl =
- {
- 5,
- stub_functbl_IOPCSyncIO
- };
- VXDCOM_PS_AUTOREGISTER(IOPCSyncIO);
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO_Read_vxproxy (IOPCAsyncIO* pThis, DWORD dwConnection, OPCDATASOURCE dwSource, DWORD dwCount, OPCHANDLE* phServer, DWORD* pTransactionID, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwConnection, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwSource, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pTransactionID, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCAsyncIO_Read_vxstub (IOPCAsyncIO* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwConnection;
- hr=widlUnmarshal (&dwConnection, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCDATASOURCE dwSource;
- hr=widlUnmarshal (&dwSource, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- DWORD pTransactionID_tmp;
- DWORD* pTransactionID = &pTransactionID_tmp;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->Read (dwConnection, dwSource, dwCount, phServer, pTransactionID, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pTransactionID, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO_Write_vxproxy (IOPCAsyncIO* pThis, DWORD dwConnection, DWORD dwCount, OPCHANDLE* phServer, VARIANT* pItemValues, DWORD* pTransactionID, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwConnection, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pItemValues, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pTransactionID, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCAsyncIO_Write_vxstub (IOPCAsyncIO* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwConnection;
- hr=widlUnmarshal (&dwConnection, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- VARIANT* pItemValues;
- hr=widlUnmarshal (&pItemValues, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT)))); if (FAILED(hr)) return hr;
- DWORD pTransactionID_tmp;
- DWORD* pTransactionID = &pTransactionID_tmp;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->Write (dwConnection, dwCount, phServer, pItemValues, pTransactionID, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pTransactionID, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO_Refresh_vxproxy (IOPCAsyncIO* pThis, DWORD dwConnection, OPCDATASOURCE dwSource, DWORD* pTransactionID)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwConnection, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwSource, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pTransactionID, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO_Refresh_vxstub (IOPCAsyncIO* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwConnection;
- hr=widlUnmarshal (&dwConnection, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCDATASOURCE dwSource;
- hr=widlUnmarshal (&dwSource, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- DWORD pTransactionID_tmp;
- DWORD* pTransactionID = &pTransactionID_tmp;
- hrMethod = pitf->Refresh (dwConnection, dwSource, pTransactionID);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pTransactionID, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO_Cancel_vxproxy (IOPCAsyncIO* pThis, DWORD dwTransactionID)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwTransactionID, pms, ndrtypes.ulong_t ()); 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 IOPCAsyncIO_Cancel_vxstub (IOPCAsyncIO* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwTransactionID;
- hr=widlUnmarshal (&dwTransactionID, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hrMethod = pitf->Cancel (dwTransactionID);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- COM_VTABLE(IOPCAsyncIO) IOPCAsyncIO_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(&IOPCAsyncIO_Read_vxproxy),
- COM_VTBL_METHOD(&IOPCAsyncIO_Write_vxproxy),
- COM_VTBL_METHOD(&IOPCAsyncIO_Refresh_vxproxy),
- COM_VTBL_METHOD(&IOPCAsyncIO_Cancel_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCAsyncIO [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCAsyncIO_Read_vxstub,
- (PFN_ORPC_STUB) IOPCAsyncIO_Write_vxstub,
- (PFN_ORPC_STUB) IOPCAsyncIO_Refresh_vxstub,
- (PFN_ORPC_STUB) IOPCAsyncIO_Cancel_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCAsyncIO_vxstub_disptbl =
- {
- 7,
- stub_functbl_IOPCAsyncIO
- };
- VXDCOM_PS_AUTOREGISTER(IOPCAsyncIO);
- HRESULT STDMETHODCALLTYPE IOPCItemMgt_AddItems_vxproxy (IOPCItemMgt* pThis, DWORD dwCount, OPCITEMDEF* pItemArray, OPCITEMRESULT** ppAddResults, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemMgt, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pItemArray, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagOPCITEMDEF (ndrtypes), NDR_SIZEOF(OPCITEMDEF), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppAddResults, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagOPCITEMRESULT (ndrtypes), NDR_SIZEOF(OPCITEMRESULT))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCItemMgt_AddItems_vxstub (IOPCItemMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCITEMDEF* pItemArray;
- hr=widlUnmarshal (&pItemArray, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagOPCITEMDEF (ndrtypes), NDR_SIZEOF(OPCITEMDEF)))); if (FAILED(hr)) return hr;
- OPCITEMRESULT* ppAddResults_tmp;
- OPCITEMRESULT** ppAddResults = &ppAddResults_tmp;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->AddItems (dwCount, pItemArray, ppAddResults, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppAddResults, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagOPCITEMRESULT (ndrtypes), NDR_SIZEOF(OPCITEMRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppAddResults)) {{for (DWORD __ix=0; __ix < dwCount; ++__ix) {if (((*ppAddResults)[__ix]).pBlob) {CoTaskMemFree (((*ppAddResults)[__ix]).pBlob);}}}CoTaskMemFree ((*ppAddResults));}if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemMgt_ValidateItems_vxproxy (IOPCItemMgt* pThis, DWORD dwCount, OPCITEMDEF* pItemArray, BOOL bBlobUpdate, OPCITEMRESULT** ppValidationResults, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemMgt, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pItemArray, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagOPCITEMDEF (ndrtypes), NDR_SIZEOF(OPCITEMDEF), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&bBlobUpdate, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppValidationResults, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagOPCITEMRESULT (ndrtypes), NDR_SIZEOF(OPCITEMRESULT))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCItemMgt_ValidateItems_vxstub (IOPCItemMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCITEMDEF* pItemArray;
- hr=widlUnmarshal (&pItemArray, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagOPCITEMDEF (ndrtypes), NDR_SIZEOF(OPCITEMDEF)))); if (FAILED(hr)) return hr;
- BOOL bBlobUpdate;
- hr=widlUnmarshal (&bBlobUpdate, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- OPCITEMRESULT* ppValidationResults_tmp;
- OPCITEMRESULT** ppValidationResults = &ppValidationResults_tmp;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->ValidateItems (dwCount, pItemArray, bBlobUpdate, ppValidationResults, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppValidationResults, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagOPCITEMRESULT (ndrtypes), NDR_SIZEOF(OPCITEMRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppValidationResults)) {{for (DWORD __ix=0; __ix < dwCount; ++__ix) {if (((*ppValidationResults)[__ix]).pBlob) {CoTaskMemFree (((*ppValidationResults)[__ix]).pBlob);}}}CoTaskMemFree ((*ppValidationResults));}if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemMgt_RemoveItems_vxproxy (IOPCItemMgt* pThis, DWORD dwCount, OPCHANDLE* phServer, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemMgt, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCItemMgt_RemoveItems_vxstub (IOPCItemMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->RemoveItems (dwCount, phServer, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemMgt_SetActiveState_vxproxy (IOPCItemMgt* pThis, DWORD dwCount, OPCHANDLE* phServer, BOOL bActive, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemMgt, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&bActive, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCItemMgt_SetActiveState_vxstub (IOPCItemMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- BOOL bActive;
- hr=widlUnmarshal (&bActive, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->SetActiveState (dwCount, phServer, bActive, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemMgt_SetClientHandles_vxproxy (IOPCItemMgt* pThis, DWORD dwCount, OPCHANDLE* phServer, OPCHANDLE* phClient, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemMgt, RpcMode::OBJECT, 7, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phClient, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCItemMgt_SetClientHandles_vxstub (IOPCItemMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- OPCHANDLE* phClient;
- hr=widlUnmarshal (&phClient, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->SetClientHandles (dwCount, phServer, phClient, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemMgt_SetDatatypes_vxproxy (IOPCItemMgt* pThis, DWORD dwCount, OPCHANDLE* phServer, VARTYPE* pRequestedDatatypes, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemMgt, RpcMode::OBJECT, 8, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pRequestedDatatypes, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ushort_t (), NDR_SIZEOF(VARTYPE), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCItemMgt_SetDatatypes_vxstub (IOPCItemMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- VARTYPE* pRequestedDatatypes;
- hr=widlUnmarshal (&pRequestedDatatypes, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ushort_t (), NDR_SIZEOF(VARTYPE)))); if (FAILED(hr)) return hr;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->SetDatatypes (dwCount, phServer, pRequestedDatatypes, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemMgt_CreateEnumerator_vxproxy (IOPCItemMgt* pThis, REFIID riid, LPUNKNOWN* ppUnk)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemMgt, RpcMode::OBJECT, 9, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemMgt_CreateEnumerator_vxstub (IOPCItemMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- IID riid;
- hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
- LPUNKNOWN ppUnk_tmp;
- LPUNKNOWN* ppUnk = &ppUnk_tmp;
- hrMethod = pitf->CreateEnumerator (riid, ppUnk);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppUnk)) {((*ppUnk))->Release ();};
- return S_OK;
- }
- COM_VTABLE(IOPCItemMgt) IOPCItemMgt_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(&IOPCItemMgt_AddItems_vxproxy),
- COM_VTBL_METHOD(&IOPCItemMgt_ValidateItems_vxproxy),
- COM_VTBL_METHOD(&IOPCItemMgt_RemoveItems_vxproxy),
- COM_VTBL_METHOD(&IOPCItemMgt_SetActiveState_vxproxy),
- COM_VTBL_METHOD(&IOPCItemMgt_SetClientHandles_vxproxy),
- COM_VTBL_METHOD(&IOPCItemMgt_SetDatatypes_vxproxy),
- COM_VTBL_METHOD(&IOPCItemMgt_CreateEnumerator_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCItemMgt [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCItemMgt_AddItems_vxstub,
- (PFN_ORPC_STUB) IOPCItemMgt_ValidateItems_vxstub,
- (PFN_ORPC_STUB) IOPCItemMgt_RemoveItems_vxstub,
- (PFN_ORPC_STUB) IOPCItemMgt_SetActiveState_vxstub,
- (PFN_ORPC_STUB) IOPCItemMgt_SetClientHandles_vxstub,
- (PFN_ORPC_STUB) IOPCItemMgt_SetDatatypes_vxstub,
- (PFN_ORPC_STUB) IOPCItemMgt_CreateEnumerator_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCItemMgt_vxstub_disptbl =
- {
- 10,
- stub_functbl_IOPCItemMgt
- };
- VXDCOM_PS_AUTOREGISTER(IOPCItemMgt);
- HRESULT STDMETHODCALLTYPE IEnumOPCItemAttributes_Next_vxproxy (IEnumOPCItemAttributes* pThis, ULONG celt, OPCITEMATTRIBUTES** ppItemArray, ULONG* pceltFetched)
- {
- RPC_PROXY_MSG msg (IID_IEnumOPCItemAttributes, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&celt, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppItemArray, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagOPCITEMATTRIBUTES (ndrtypes), NDR_SIZEOF(OPCITEMATTRIBUTES))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pceltFetched, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IEnumOPCItemAttributes_Next_vxstub (IEnumOPCItemAttributes* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- ULONG celt;
- hr=widlUnmarshal (&celt, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCITEMATTRIBUTES* ppItemArray_tmp;
- OPCITEMATTRIBUTES** ppItemArray = &ppItemArray_tmp;
- ULONG pceltFetched_tmp;
- ULONG* pceltFetched = &pceltFetched_tmp;
- hrMethod = pitf->Next (celt, ppItemArray, pceltFetched);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppItemArray, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc_tagOPCITEMATTRIBUTES (ndrtypes), NDR_SIZEOF(OPCITEMATTRIBUTES), *pceltFetched)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pceltFetched, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppItemArray)) {{for (DWORD __ix=0; __ix < *pceltFetched; ++__ix) {if (((*ppItemArray)[__ix]).szAccessPath) {CoTaskMemFree (((*ppItemArray)[__ix]).szAccessPath);}if (((*ppItemArray)[__ix]).szItemID) {CoTaskMemFree (((*ppItemArray)[__ix]).szItemID);}if (((*ppItemArray)[__ix]).pBlob) {CoTaskMemFree (((*ppItemArray)[__ix]).pBlob);}::VariantClear (&(((*ppItemArray)[__ix]).vEUInfo)); }}CoTaskMemFree ((*ppItemArray));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IEnumOPCItemAttributes_Skip_vxproxy (IEnumOPCItemAttributes* pThis, ULONG celt)
- {
- RPC_PROXY_MSG msg (IID_IEnumOPCItemAttributes, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&celt, pms, ndrtypes.ulong_t ()); 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 IEnumOPCItemAttributes_Skip_vxstub (IEnumOPCItemAttributes* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- ULONG celt;
- hr=widlUnmarshal (&celt, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hrMethod = pitf->Skip (celt);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IEnumOPCItemAttributes_Reset_vxproxy (IEnumOPCItemAttributes* pThis)
- {
- RPC_PROXY_MSG msg (IID_IEnumOPCItemAttributes, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT 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 IEnumOPCItemAttributes_Reset_vxstub (IEnumOPCItemAttributes* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- hrMethod = pitf->Reset ();
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IEnumOPCItemAttributes_Clone_vxproxy (IEnumOPCItemAttributes* pThis, IEnumOPCItemAttributes** ppEnumItemAttributes)
- {
- RPC_PROXY_MSG msg (IID_IEnumOPCItemAttributes, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppEnumItemAttributes, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IEnumOPCItemAttributes))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IEnumOPCItemAttributes_Clone_vxstub (IEnumOPCItemAttributes* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- IEnumOPCItemAttributes* ppEnumItemAttributes_tmp = 0;
- IEnumOPCItemAttributes** ppEnumItemAttributes = &ppEnumItemAttributes_tmp;
- hrMethod = pitf->Clone (ppEnumItemAttributes);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppEnumItemAttributes, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IEnumOPCItemAttributes))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppEnumItemAttributes)) {((*ppEnumItemAttributes))->Release ();};
- return S_OK;
- }
- COM_VTABLE(IEnumOPCItemAttributes) IEnumOPCItemAttributes_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(&IEnumOPCItemAttributes_Next_vxproxy),
- COM_VTBL_METHOD(&IEnumOPCItemAttributes_Skip_vxproxy),
- COM_VTBL_METHOD(&IEnumOPCItemAttributes_Reset_vxproxy),
- COM_VTBL_METHOD(&IEnumOPCItemAttributes_Clone_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IEnumOPCItemAttributes [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IEnumOPCItemAttributes_Next_vxstub,
- (PFN_ORPC_STUB) IEnumOPCItemAttributes_Skip_vxstub,
- (PFN_ORPC_STUB) IEnumOPCItemAttributes_Reset_vxstub,
- (PFN_ORPC_STUB) IEnumOPCItemAttributes_Clone_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IEnumOPCItemAttributes_vxstub_disptbl =
- {
- 7,
- stub_functbl_IEnumOPCItemAttributes
- };
- VXDCOM_PS_AUTOREGISTER(IEnumOPCItemAttributes);
- HRESULT STDMETHODCALLTYPE IOPCDataCallback_OnDataChange_vxproxy (IOPCDataCallback* pThis, DWORD dwTransid, OPCHANDLE hGroup, HRESULT hrMasterquality, HRESULT hrMastererror, DWORD dwCount, OPCHANDLE* phClientItems, VARIANT* pvValues, WORD* pwQualities, FILETIME* pftTimeStamps, HRESULT* pErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCDataCallback, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwTransid, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hGroup, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hrMasterquality, pms, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hrMastererror, pms, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phClientItems, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pvValues, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pwQualities, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.short_t (), NDR_SIZEOF(WORD), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pftTimeStamps, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__FILETIME (ndrtypes), NDR_SIZEOF(FILETIME), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pErrors, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount))); 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 IOPCDataCallback_OnDataChange_vxstub (IOPCDataCallback* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwTransid;
- hr=widlUnmarshal (&dwTransid, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE hGroup;
- hr=widlUnmarshal (&hGroup, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- HRESULT hrMasterquality;
- hr=widlUnmarshal (&hrMasterquality, pus, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- HRESULT hrMastererror;
- hr=widlUnmarshal (&hrMastererror, pus, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phClientItems;
- hr=widlUnmarshal (&phClientItems, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- VARIANT* pvValues;
- hr=widlUnmarshal (&pvValues, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT)))); if (FAILED(hr)) return hr;
- WORD* pwQualities;
- hr=widlUnmarshal (&pwQualities, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.short_t (), NDR_SIZEOF(WORD)))); if (FAILED(hr)) return hr;
- FILETIME* pftTimeStamps;
- hr=widlUnmarshal (&pftTimeStamps, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__FILETIME (ndrtypes), NDR_SIZEOF(FILETIME)))); if (FAILED(hr)) return hr;
- HRESULT* pErrors;
- hr=widlUnmarshal (&pErrors, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->OnDataChange (dwTransid, hGroup, hrMasterquality, hrMastererror, dwCount, phClientItems, pvValues, pwQualities, pftTimeStamps, pErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCDataCallback_OnReadComplete_vxproxy (IOPCDataCallback* pThis, DWORD dwTransid, OPCHANDLE hGroup, HRESULT hrMasterquality, HRESULT hrMastererror, DWORD dwCount, OPCHANDLE* phClientItems, VARIANT* pvValues, WORD* pwQualities, FILETIME* pftTimeStamps, HRESULT* pErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCDataCallback, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwTransid, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hGroup, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hrMasterquality, pms, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hrMastererror, pms, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phClientItems, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pvValues, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pwQualities, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.short_t (), NDR_SIZEOF(WORD), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pftTimeStamps, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__FILETIME (ndrtypes), NDR_SIZEOF(FILETIME), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pErrors, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount))); 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 IOPCDataCallback_OnReadComplete_vxstub (IOPCDataCallback* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwTransid;
- hr=widlUnmarshal (&dwTransid, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE hGroup;
- hr=widlUnmarshal (&hGroup, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- HRESULT hrMasterquality;
- hr=widlUnmarshal (&hrMasterquality, pus, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- HRESULT hrMastererror;
- hr=widlUnmarshal (&hrMastererror, pus, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phClientItems;
- hr=widlUnmarshal (&phClientItems, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- VARIANT* pvValues;
- hr=widlUnmarshal (&pvValues, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT)))); if (FAILED(hr)) return hr;
- WORD* pwQualities;
- hr=widlUnmarshal (&pwQualities, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.short_t (), NDR_SIZEOF(WORD)))); if (FAILED(hr)) return hr;
- FILETIME* pftTimeStamps;
- hr=widlUnmarshal (&pftTimeStamps, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__FILETIME (ndrtypes), NDR_SIZEOF(FILETIME)))); if (FAILED(hr)) return hr;
- HRESULT* pErrors;
- hr=widlUnmarshal (&pErrors, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->OnReadComplete (dwTransid, hGroup, hrMasterquality, hrMastererror, dwCount, phClientItems, pvValues, pwQualities, pftTimeStamps, pErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCDataCallback_OnWriteComplete_vxproxy (IOPCDataCallback* pThis, DWORD dwTransid, OPCHANDLE hGroup, HRESULT hrMastererr, DWORD dwCount, OPCHANDLE* pClienthandles, HRESULT* pErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCDataCallback, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwTransid, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hGroup, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hrMastererr, pms, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pClienthandles, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pErrors, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount))); 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 IOPCDataCallback_OnWriteComplete_vxstub (IOPCDataCallback* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwTransid;
- hr=widlUnmarshal (&dwTransid, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE hGroup;
- hr=widlUnmarshal (&hGroup, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- HRESULT hrMastererr;
- hr=widlUnmarshal (&hrMastererr, pus, ndrtypes.long_t ()); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* pClienthandles;
- hr=widlUnmarshal (&pClienthandles, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- HRESULT* pErrors;
- hr=widlUnmarshal (&pErrors, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->OnWriteComplete (dwTransid, hGroup, hrMastererr, dwCount, pClienthandles, pErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCDataCallback_OnCancelComplete_vxproxy (IOPCDataCallback* pThis, DWORD dwTransid, OPCHANDLE hGroup)
- {
- RPC_PROXY_MSG msg (IID_IOPCDataCallback, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwTransid, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hGroup, pms, ndrtypes.ulong_t ()); 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 IOPCDataCallback_OnCancelComplete_vxstub (IOPCDataCallback* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwTransid;
- hr=widlUnmarshal (&dwTransid, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE hGroup;
- hr=widlUnmarshal (&hGroup, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hrMethod = pitf->OnCancelComplete (dwTransid, hGroup);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- COM_VTABLE(IOPCDataCallback) IOPCDataCallback_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(&IOPCDataCallback_OnDataChange_vxproxy),
- COM_VTBL_METHOD(&IOPCDataCallback_OnReadComplete_vxproxy),
- COM_VTBL_METHOD(&IOPCDataCallback_OnWriteComplete_vxproxy),
- COM_VTBL_METHOD(&IOPCDataCallback_OnCancelComplete_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCDataCallback [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCDataCallback_OnDataChange_vxstub,
- (PFN_ORPC_STUB) IOPCDataCallback_OnReadComplete_vxstub,
- (PFN_ORPC_STUB) IOPCDataCallback_OnWriteComplete_vxstub,
- (PFN_ORPC_STUB) IOPCDataCallback_OnCancelComplete_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCDataCallback_vxstub_disptbl =
- {
- 7,
- stub_functbl_IOPCDataCallback
- };
- VXDCOM_PS_AUTOREGISTER(IOPCDataCallback);
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO2_Read_vxproxy (IOPCAsyncIO2* pThis, DWORD dwCount, OPCHANDLE* phServer, DWORD dwTransactionID, DWORD* pdwCancelID, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO2, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwTransactionID, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pdwCancelID, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCAsyncIO2_Read_vxstub (IOPCAsyncIO2* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- DWORD dwTransactionID;
- hr=widlUnmarshal (&dwTransactionID, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD pdwCancelID_tmp;
- DWORD* pdwCancelID = &pdwCancelID_tmp;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->Read (dwCount, phServer, dwTransactionID, pdwCancelID, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCancelID, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO2_Write_vxproxy (IOPCAsyncIO2* pThis, DWORD dwCount, OPCHANDLE* phServer, VARIANT* pItemValues, DWORD dwTransactionID, DWORD* pdwCancelID, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO2, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phServer, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pItemValues, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwTransactionID, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pdwCancelID, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCAsyncIO2_Write_vxstub (IOPCAsyncIO2* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE* phServer;
- hr=widlUnmarshal (&phServer, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(OPCHANDLE)))); if (FAILED(hr)) return hr;
- VARIANT* pItemValues;
- hr=widlUnmarshal (&pItemValues, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT)))); if (FAILED(hr)) return hr;
- DWORD dwTransactionID;
- hr=widlUnmarshal (&dwTransactionID, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD pdwCancelID_tmp;
- DWORD* pdwCancelID = &pdwCancelID_tmp;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->Write (dwCount, phServer, pItemValues, dwTransactionID, pdwCancelID, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCancelID, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO2_Refresh2_vxproxy (IOPCAsyncIO2* pThis, OPCDATASOURCE dwSource, DWORD dwTransactionID, DWORD* pdwCancelID)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO2, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwSource, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwTransactionID, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pdwCancelID, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO2_Refresh2_vxstub (IOPCAsyncIO2* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCDATASOURCE dwSource;
- hr=widlUnmarshal (&dwSource, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
- DWORD dwTransactionID;
- hr=widlUnmarshal (&dwTransactionID, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD pdwCancelID_tmp;
- DWORD* pdwCancelID = &pdwCancelID_tmp;
- hrMethod = pitf->Refresh2 (dwSource, dwTransactionID, pdwCancelID);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCancelID, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO2_Cancel2_vxproxy (IOPCAsyncIO2* pThis, DWORD dwCancelID)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO2, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwCancelID, pms, ndrtypes.ulong_t ()); 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 IOPCAsyncIO2_Cancel2_vxstub (IOPCAsyncIO2* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwCancelID;
- hr=widlUnmarshal (&dwCancelID, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hrMethod = pitf->Cancel2 (dwCancelID);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO2_SetEnable_vxproxy (IOPCAsyncIO2* pThis, BOOL bEnable)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO2, RpcMode::OBJECT, 7, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&bEnable, pms, ndrtypes.int_t ()); 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 IOPCAsyncIO2_SetEnable_vxstub (IOPCAsyncIO2* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- BOOL bEnable;
- hr=widlUnmarshal (&bEnable, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- hrMethod = pitf->SetEnable (bEnable);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO2_GetEnable_vxproxy (IOPCAsyncIO2* pThis, BOOL* pbEnable)
- {
- RPC_PROXY_MSG msg (IID_IOPCAsyncIO2, RpcMode::OBJECT, 8, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pbEnable, pus, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCAsyncIO2_GetEnable_vxstub (IOPCAsyncIO2* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- BOOL pbEnable_tmp;
- BOOL* pbEnable = &pbEnable_tmp;
- hrMethod = pitf->GetEnable (pbEnable);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pbEnable, pms, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- COM_VTABLE(IOPCAsyncIO2) IOPCAsyncIO2_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(&IOPCAsyncIO2_Read_vxproxy),
- COM_VTBL_METHOD(&IOPCAsyncIO2_Write_vxproxy),
- COM_VTBL_METHOD(&IOPCAsyncIO2_Refresh2_vxproxy),
- COM_VTBL_METHOD(&IOPCAsyncIO2_Cancel2_vxproxy),
- COM_VTBL_METHOD(&IOPCAsyncIO2_SetEnable_vxproxy),
- COM_VTBL_METHOD(&IOPCAsyncIO2_GetEnable_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCAsyncIO2 [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCAsyncIO2_Read_vxstub,
- (PFN_ORPC_STUB) IOPCAsyncIO2_Write_vxstub,
- (PFN_ORPC_STUB) IOPCAsyncIO2_Refresh2_vxstub,
- (PFN_ORPC_STUB) IOPCAsyncIO2_Cancel2_vxstub,
- (PFN_ORPC_STUB) IOPCAsyncIO2_SetEnable_vxstub,
- (PFN_ORPC_STUB) IOPCAsyncIO2_GetEnable_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCAsyncIO2_vxstub_disptbl =
- {
- 9,
- stub_functbl_IOPCAsyncIO2
- };
- VXDCOM_PS_AUTOREGISTER(IOPCAsyncIO2);
- HRESULT STDMETHODCALLTYPE IOPCItemProperties_QueryAvailableProperties_vxproxy (IOPCItemProperties* pThis, LPWSTR szItemID, DWORD* pdwCount, DWORD** ppPropertyIDs, LPWSTR** ppDescriptions, VARTYPE** ppvtDataTypes)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemProperties, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szItemID, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pdwCount, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppPropertyIDs, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppDescriptions, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppvtDataTypes, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ushort_t (), NDR_SIZEOF(VARTYPE))))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemProperties_QueryAvailableProperties_vxstub (IOPCItemProperties* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPWSTR szItemID;
- hr=widlUnmarshal (&szItemID, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- DWORD pdwCount_tmp;
- DWORD* pdwCount = &pdwCount_tmp;
- DWORD* ppPropertyIDs_tmp;
- DWORD** ppPropertyIDs = &ppPropertyIDs_tmp;
- LPWSTR* ppDescriptions_tmp;
- LPWSTR** ppDescriptions = &ppDescriptions_tmp;
- VARTYPE* ppvtDataTypes_tmp;
- VARTYPE** ppvtDataTypes = &ppvtDataTypes_tmp;
- hrMethod = pitf->QueryAvailableProperties (szItemID, pdwCount, ppPropertyIDs, ppDescriptions, ppvtDataTypes);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppPropertyIDs, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), *pdwCount)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppDescriptions, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), *pdwCount)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppvtDataTypes, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ushort_t (), NDR_SIZEOF(VARTYPE), *pdwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppPropertyIDs)) {CoTaskMemFree ((*ppPropertyIDs));}if ((*ppDescriptions)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppDescriptions)[__ix])) {CoTaskMemFree (((*ppDescriptions)[__ix]));}}}CoTaskMemFree ((*ppDescriptions));}if ((*ppvtDataTypes)) {CoTaskMemFree ((*ppvtDataTypes));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemProperties_GetItemProperties_vxproxy (IOPCItemProperties* pThis, LPWSTR szItemID, DWORD dwCount, DWORD* pdwPropertyIDs, VARIANT** ppvData, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemProperties, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szItemID, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwPropertyIDs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppvData, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCItemProperties_GetItemProperties_vxstub (IOPCItemProperties* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPWSTR szItemID;
- hr=widlUnmarshal (&szItemID, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD* pdwPropertyIDs;
- hr=widlUnmarshal (&pdwPropertyIDs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
- VARIANT* ppvData_tmp;
- VARIANT** ppvData = &ppvData_tmp;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->GetItemProperties (szItemID, dwCount, pdwPropertyIDs, ppvData, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppvData, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT), dwCount)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppvData)) {{for (DWORD __ix=0; __ix < dwCount; ++__ix) {::VariantClear (&(((*ppvData)[__ix]))); }}CoTaskMemFree ((*ppvData));}if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCItemProperties_LookupItemIDs_vxproxy (IOPCItemProperties* pThis, LPWSTR szItemID, DWORD dwCount, DWORD* pdwPropertyIDs, LPWSTR** ppszNewItemIDs, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCItemProperties, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szItemID, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwPropertyIDs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), dwCount))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppszNewItemIDs, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_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 IOPCItemProperties_LookupItemIDs_vxstub (IOPCItemProperties* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPWSTR szItemID;
- hr=widlUnmarshal (&szItemID, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD* pdwPropertyIDs;
- hr=widlUnmarshal (&pdwPropertyIDs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
- LPWSTR* ppszNewItemIDs_tmp;
- LPWSTR** ppszNewItemIDs = &ppszNewItemIDs_tmp;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->LookupItemIDs (szItemID, dwCount, pdwPropertyIDs, ppszNewItemIDs, ppErrors);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppszNewItemIDs, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), dwCount)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppErrors, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppszNewItemIDs)) {{for (DWORD __ix=0; __ix < dwCount; ++__ix) {if (((*ppszNewItemIDs)[__ix])) {CoTaskMemFree (((*ppszNewItemIDs)[__ix]));}}}CoTaskMemFree ((*ppszNewItemIDs));}if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
- return S_OK;
- }
- COM_VTABLE(IOPCItemProperties) IOPCItemProperties_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(&IOPCItemProperties_QueryAvailableProperties_vxproxy),
- COM_VTBL_METHOD(&IOPCItemProperties_GetItemProperties_vxproxy),
- COM_VTBL_METHOD(&IOPCItemProperties_LookupItemIDs_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCItemProperties [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCItemProperties_QueryAvailableProperties_vxstub,
- (PFN_ORPC_STUB) IOPCItemProperties_GetItemProperties_vxstub,
- (PFN_ORPC_STUB) IOPCItemProperties_LookupItemIDs_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCItemProperties_vxstub_disptbl =
- {
- 6,
- stub_functbl_IOPCItemProperties
- };
- VXDCOM_PS_AUTOREGISTER(IOPCItemProperties);