opc_ae_ps.cpp
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:80k
- /* opc_ae_ps.cpp generated by WIDL Version 2.2.1 on 06-Dec-01 at 11:55:11 AM */
- #define __WIDL_PROXY_STUB 0x0200
- #include "dcomProxy.h"
- #include "opc_ae.h"
- #include <string.h>
- extern "C" int include_opc_ae () {return 0;}
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- NdrTypeDesc StructDesc_tagONEVENTSTRUCT (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagONEVENTSTRUCT, wChangeMask, ndrtypes.short_t ()),
- NDR_MEMBER(tagONEVENTSTRUCT, wNewState, ndrtypes.short_t ()),
- NDR_MEMBER(tagONEVENTSTRUCT, szSource, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagONEVENTSTRUCT, ftTime, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagONEVENTSTRUCT, szMessage, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagONEVENTSTRUCT, dwEventType, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagONEVENTSTRUCT, dwEventCategory, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagONEVENTSTRUCT, dwSeverity, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagONEVENTSTRUCT, szConditionName, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagONEVENTSTRUCT, szSubconditionName, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagONEVENTSTRUCT, wQuality, ndrtypes.short_t ()),
- NDR_MEMBER(tagONEVENTSTRUCT, wReserved, ndrtypes.short_t ()),
- NDR_MEMBER(tagONEVENTSTRUCT, bAckRequired, ndrtypes.int_t ()),
- NDR_MEMBER(tagONEVENTSTRUCT, ftActiveTime, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagONEVENTSTRUCT, dwCookie, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagONEVENTSTRUCT, dwNumEventAttrs, ndrtypes.ulong_t ()),
- NDR_MEMBERX(tagONEVENTSTRUCT, pEventAttributes, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT))), 15),
- NDR_MEMBER(tagONEVENTSTRUCT, szActorID, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- };
- return ndrtypes.struct_t (18, m, 15);
- }
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCEVENTSERVERSTATUS (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCEVENTSERVERSTATUS, ftStartTime, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCEVENTSERVERSTATUS, ftCurrentTime, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCEVENTSERVERSTATUS, ftLastUpdateTime, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCEVENTSERVERSTATUS, dwServerState, ndrtypes.enum_t ()),
- NDR_MEMBER(tagOPCEVENTSERVERSTATUS, wMajorVersion, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCEVENTSERVERSTATUS, wMinorVersion, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCEVENTSERVERSTATUS, wBuildNumber, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCEVENTSERVERSTATUS, wReserved, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCEVENTSERVERSTATUS, szVendorInfo, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- };
- return ndrtypes.struct_t (9, m);
- }
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCCONDITIONSTATE (NDRTYPES& ndrtypes)
- {
- NdrMemberInfo m [] =
- {
- NDR_MEMBER(tagOPCCONDITIONSTATE, wState, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCCONDITIONSTATE, wReserved1, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCCONDITIONSTATE, szActiveSubCondition, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagOPCCONDITIONSTATE, szASCDefinition, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagOPCCONDITIONSTATE, dwASCSeverity, ndrtypes.ulong_t ()),
- NDR_MEMBER(tagOPCCONDITIONSTATE, szASCDescription, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagOPCCONDITIONSTATE, wQuality, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCCONDITIONSTATE, wReserved2, ndrtypes.short_t ()),
- NDR_MEMBER(tagOPCCONDITIONSTATE, ftLastAckTime, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCCONDITIONSTATE, ftSubCondLastActive, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCCONDITIONSTATE, ftCondLastActive, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCCONDITIONSTATE, ftCondLastInactive, StructDesc__FILETIME (ndrtypes)),
- NDR_MEMBER(tagOPCCONDITIONSTATE, szAcknowledgerID, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagOPCCONDITIONSTATE, szComment, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
- NDR_MEMBER(tagOPCCONDITIONSTATE, dwNumSCs, ndrtypes.ulong_t ()),
- NDR_MEMBERX(tagOPCCONDITIONSTATE, pszSCNames, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR))), 14),
- NDR_MEMBERX(tagOPCCONDITIONSTATE, pszSCDefinitions, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR))), 14),
- NDR_MEMBERX(tagOPCCONDITIONSTATE, pdwSCSeverities, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))), 14),
- NDR_MEMBERX(tagOPCCONDITIONSTATE, pszSCDescriptions, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR))), 14),
- NDR_MEMBER(tagOPCCONDITIONSTATE, dwNumEventAttrs, ndrtypes.ulong_t ()),
- NDR_MEMBERX(tagOPCCONDITIONSTATE, pEventAttributes, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT))), 19),
- NDR_MEMBERX(tagOPCCONDITIONSTATE, pErrors, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT))), 19),
- };
- return ndrtypes.struct_t (22, m, 19);
- }
- NdrTypeDesc StructDesc_tagOPCEVENTSERVERSTATUS(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagOPCCONDITIONSTATE(NDRTYPES&);
- NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
- NdrTypeDesc StructDesc__GUID(NDRTYPES&);
- NdrTypeDesc StructDesc_tagONEVENTSTRUCT(NDRTYPES&);
- HRESULT STDMETHODCALLTYPE IOPCEventServer_GetStatus_vxproxy (IOPCEventServer* pThis, OPCEVENTSERVERSTATUS** ppEventServerStatus)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppEventServerStatus, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCEVENTSERVERSTATUS (ndrtypes)))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_GetStatus_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- OPCEVENTSERVERSTATUS* ppEventServerStatus_tmp;
- OPCEVENTSERVERSTATUS** ppEventServerStatus = &ppEventServerStatus_tmp;
- hrMethod = pitf->GetStatus (ppEventServerStatus);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppEventServerStatus, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCEVENTSERVERSTATUS (ndrtypes)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppEventServerStatus)) {if ((*(*ppEventServerStatus)).szVendorInfo) {CoTaskMemFree ((*(*ppEventServerStatus)).szVendorInfo);}CoTaskMemFree ((*ppEventServerStatus));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_CreateEventSubscription_vxproxy (IOPCEventServer* pThis, BOOL bActive, DWORD dwBufferTime, DWORD dwMaxSize, OPCHANDLE hClientSubscription, REFIID riid, LPUNKNOWN* ppUnk, DWORD* pdwRevisedBufferTime, DWORD* pdwRevisedMaxSize)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&bActive, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwBufferTime, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwMaxSize, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hClientSubscription, 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 (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pdwRevisedBufferTime, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pdwRevisedMaxSize, 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 IOPCEventServer_CreateEventSubscription_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- BOOL bActive;
- hr=widlUnmarshal (&bActive, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- DWORD dwBufferTime;
- hr=widlUnmarshal (&dwBufferTime, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD dwMaxSize;
- hr=widlUnmarshal (&dwMaxSize, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- OPCHANDLE hClientSubscription;
- hr=widlUnmarshal (&hClientSubscription, pus, ndrtypes.ulong_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;
- DWORD pdwRevisedBufferTime_tmp;
- DWORD* pdwRevisedBufferTime = &pdwRevisedBufferTime_tmp;
- DWORD pdwRevisedMaxSize_tmp;
- DWORD* pdwRevisedMaxSize = &pdwRevisedMaxSize_tmp;
- hrMethod = pitf->CreateEventSubscription (bActive, dwBufferTime, dwMaxSize, hClientSubscription, riid, ppUnk, pdwRevisedBufferTime, pdwRevisedMaxSize);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwRevisedBufferTime, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwRevisedMaxSize, 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 ((*ppUnk)) {((*ppUnk))->Release ();};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryAvailableFilters_vxproxy (IOPCEventServer* pThis, DWORD* pdwFilterMask)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pdwFilterMask, 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 IOPCEventServer_QueryAvailableFilters_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- DWORD pdwFilterMask_tmp;
- DWORD* pdwFilterMask = &pdwFilterMask_tmp;
- hrMethod = pitf->QueryAvailableFilters (pdwFilterMask);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwFilterMask, 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 IOPCEventServer_QueryEventCategories_vxproxy (IOPCEventServer* pThis, DWORD dwEventType, DWORD* pdwCount, DWORD** ppdwEventCategories, LPWSTR** ppszEventCategoryDescs)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwEventType, pms, ndrtypes.ulong_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 (&ppdwEventCategories, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppszEventCategoryDescs, 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 (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryEventCategories_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwEventType;
- hr=widlUnmarshal (&dwEventType, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD pdwCount_tmp;
- DWORD* pdwCount = &pdwCount_tmp;
- DWORD* ppdwEventCategories_tmp;
- DWORD** ppdwEventCategories = &ppdwEventCategories_tmp;
- LPWSTR* ppszEventCategoryDescs_tmp;
- LPWSTR** ppszEventCategoryDescs = &ppszEventCategoryDescs_tmp;
- hrMethod = pitf->QueryEventCategories (dwEventType, pdwCount, ppdwEventCategories, ppszEventCategoryDescs);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppdwEventCategories, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), *pdwCount)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppszEventCategoryDescs, 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 (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppdwEventCategories)) {CoTaskMemFree ((*ppdwEventCategories));}if ((*ppszEventCategoryDescs)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppszEventCategoryDescs)[__ix])) {CoTaskMemFree (((*ppszEventCategoryDescs)[__ix]));}}}CoTaskMemFree ((*ppszEventCategoryDescs));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryConditionNames_vxproxy (IOPCEventServer* pThis, DWORD dwEventCategory, DWORD* pdwCount, LPWSTR** ppszConditionNames)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 7, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_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 (&ppszConditionNames, 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 (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryConditionNames_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwEventCategory;
- hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD pdwCount_tmp;
- DWORD* pdwCount = &pdwCount_tmp;
- LPWSTR* ppszConditionNames_tmp;
- LPWSTR** ppszConditionNames = &ppszConditionNames_tmp;
- hrMethod = pitf->QueryConditionNames (dwEventCategory, pdwCount, ppszConditionNames);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppszConditionNames, 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 (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppszConditionNames)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppszConditionNames)[__ix])) {CoTaskMemFree (((*ppszConditionNames)[__ix]));}}}CoTaskMemFree ((*ppszConditionNames));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_QuerySubConditionNames_vxproxy (IOPCEventServer* pThis, LPWSTR szConditionName, DWORD* pdwCount, LPWSTR** ppszSubConditionNames)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 8, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szConditionName, 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 (&ppszSubConditionNames, 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 (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_QuerySubConditionNames_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPWSTR szConditionName;
- hr=widlUnmarshal (&szConditionName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- DWORD pdwCount_tmp;
- DWORD* pdwCount = &pdwCount_tmp;
- LPWSTR* ppszSubConditionNames_tmp;
- LPWSTR** ppszSubConditionNames = &ppszSubConditionNames_tmp;
- hrMethod = pitf->QuerySubConditionNames (szConditionName, pdwCount, ppszSubConditionNames);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppszSubConditionNames, 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 (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppszSubConditionNames)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppszSubConditionNames)[__ix])) {CoTaskMemFree (((*ppszSubConditionNames)[__ix]));}}}CoTaskMemFree ((*ppszSubConditionNames));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_QuerySourceConditions_vxproxy (IOPCEventServer* pThis, LPWSTR szSource, DWORD* pdwCount, LPWSTR** ppszConditionNames)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 9, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szSource, 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 (&ppszConditionNames, 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 (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_QuerySourceConditions_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPWSTR szSource;
- hr=widlUnmarshal (&szSource, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- DWORD pdwCount_tmp;
- DWORD* pdwCount = &pdwCount_tmp;
- LPWSTR* ppszConditionNames_tmp;
- LPWSTR** ppszConditionNames = &ppszConditionNames_tmp;
- hrMethod = pitf->QuerySourceConditions (szSource, pdwCount, ppszConditionNames);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppszConditionNames, 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 (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppszConditionNames)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppszConditionNames)[__ix])) {CoTaskMemFree (((*ppszConditionNames)[__ix]));}}}CoTaskMemFree ((*ppszConditionNames));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryEventAttributes_vxproxy (IOPCEventServer* pThis, DWORD dwEventCategory, DWORD* pdwCount, DWORD** ppdwAttrIDs, LPWSTR** ppszAttrDescs, VARTYPE** ppvtAttrTypes)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 10, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_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 (&ppdwAttrIDs, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppszAttrDescs, 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 (&ppvtAttrTypes, 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 IOPCEventServer_QueryEventAttributes_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwEventCategory;
- hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD pdwCount_tmp;
- DWORD* pdwCount = &pdwCount_tmp;
- DWORD* ppdwAttrIDs_tmp;
- DWORD** ppdwAttrIDs = &ppdwAttrIDs_tmp;
- LPWSTR* ppszAttrDescs_tmp;
- LPWSTR** ppszAttrDescs = &ppszAttrDescs_tmp;
- VARTYPE* ppvtAttrTypes_tmp;
- VARTYPE** ppvtAttrTypes = &ppvtAttrTypes_tmp;
- hrMethod = pitf->QueryEventAttributes (dwEventCategory, pdwCount, ppdwAttrIDs, ppszAttrDescs, ppvtAttrTypes);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppdwAttrIDs, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), *pdwCount)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppszAttrDescs, 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 (&ppvtAttrTypes, 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 ((*ppdwAttrIDs)) {CoTaskMemFree ((*ppdwAttrIDs));}if ((*ppszAttrDescs)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppszAttrDescs)[__ix])) {CoTaskMemFree (((*ppszAttrDescs)[__ix]));}}}CoTaskMemFree ((*ppszAttrDescs));}if ((*ppvtAttrTypes)) {CoTaskMemFree ((*ppvtAttrTypes));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_TranslateToItemIDs_vxproxy (IOPCEventServer* pThis, LPWSTR szSource, DWORD dwEventCategory, LPWSTR szConditionName, LPWSTR szSubconditionName, DWORD dwCount, DWORD* pdwAssocAttrIDs, LPWSTR** ppszAttrItemIDs, LPWSTR** ppszNodeNames, CLSID** ppCLSIDs)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 11, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szSource, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&szConditionName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&szSubconditionName, 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 (&pdwAssocAttrIDs, 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 (&ppszAttrItemIDs, 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 (&ppszNodeNames, 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 (&ppCLSIDs, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(CLSID))))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_TranslateToItemIDs_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPWSTR szSource;
- hr=widlUnmarshal (&szSource, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- DWORD dwEventCategory;
- hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LPWSTR szConditionName;
- hr=widlUnmarshal (&szConditionName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- LPWSTR szSubconditionName;
- hr=widlUnmarshal (&szSubconditionName, 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* pdwAssocAttrIDs;
- hr=widlUnmarshal (&pdwAssocAttrIDs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
- LPWSTR* ppszAttrItemIDs_tmp;
- LPWSTR** ppszAttrItemIDs = &ppszAttrItemIDs_tmp;
- LPWSTR* ppszNodeNames_tmp;
- LPWSTR** ppszNodeNames = &ppszNodeNames_tmp;
- CLSID* ppCLSIDs_tmp;
- CLSID** ppCLSIDs = &ppCLSIDs_tmp;
- hrMethod = pitf->TranslateToItemIDs (szSource, dwEventCategory, szConditionName, szSubconditionName, dwCount, pdwAssocAttrIDs, ppszAttrItemIDs, ppszNodeNames, ppCLSIDs);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppszAttrItemIDs, 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 (&ppszNodeNames, 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 (&ppCLSIDs, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(CLSID), dwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppszAttrItemIDs)) {{for (DWORD __ix=0; __ix < dwCount; ++__ix) {if (((*ppszAttrItemIDs)[__ix])) {CoTaskMemFree (((*ppszAttrItemIDs)[__ix]));}}}CoTaskMemFree ((*ppszAttrItemIDs));}if ((*ppszNodeNames)) {{for (DWORD __ix=0; __ix < dwCount; ++__ix) {if (((*ppszNodeNames)[__ix])) {CoTaskMemFree (((*ppszNodeNames)[__ix]));}}}CoTaskMemFree ((*ppszNodeNames));}if ((*ppCLSIDs)) {CoTaskMemFree ((*ppCLSIDs));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_GetConditionState_vxproxy (IOPCEventServer* pThis, LPWSTR szSource, LPWSTR szConditionName, DWORD dwNumEventAttrs, DWORD* pdwAttributeIDs, OPCCONDITIONSTATE** ppConditionState)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 12, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szSource, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&szConditionName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwNumEventAttrs, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwAttributeIDs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), dwNumEventAttrs))); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&ppConditionState, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCCONDITIONSTATE (ndrtypes)))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_GetConditionState_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPWSTR szSource;
- hr=widlUnmarshal (&szSource, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- LPWSTR szConditionName;
- hr=widlUnmarshal (&szConditionName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- DWORD dwNumEventAttrs;
- hr=widlUnmarshal (&dwNumEventAttrs, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD* pdwAttributeIDs;
- hr=widlUnmarshal (&pdwAttributeIDs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
- OPCCONDITIONSTATE* ppConditionState_tmp;
- OPCCONDITIONSTATE** ppConditionState = &ppConditionState_tmp;
- hrMethod = pitf->GetConditionState (szSource, szConditionName, dwNumEventAttrs, pdwAttributeIDs, ppConditionState);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&ppConditionState, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCCONDITIONSTATE (ndrtypes)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppConditionState)) {if ((*(*ppConditionState)).szActiveSubCondition) {CoTaskMemFree ((*(*ppConditionState)).szActiveSubCondition);}if ((*(*ppConditionState)).szASCDefinition) {CoTaskMemFree ((*(*ppConditionState)).szASCDefinition);}if ((*(*ppConditionState)).szASCDescription) {CoTaskMemFree ((*(*ppConditionState)).szASCDescription);}if ((*(*ppConditionState)).szAcknowledgerID) {CoTaskMemFree ((*(*ppConditionState)).szAcknowledgerID);}if ((*(*ppConditionState)).szComment) {CoTaskMemFree ((*(*ppConditionState)).szComment);}if ((*(*ppConditionState)).pszSCNames) {{for (DWORD __ix=0; __ix < (*(*ppConditionState)).dwNumSCs; ++__ix) {if (((*(*ppConditionState)).pszSCNames[__ix])) {CoTaskMemFree (((*(*ppConditionState)).pszSCNames[__ix]));}}}CoTaskMemFree ((*(*ppConditionState)).pszSCNames);}if ((*(*ppConditionState)).pszSCDefinitions) {{for (DWORD __ix=0; __ix < (*(*ppConditionState)).dwNumSCs; ++__ix) {if (((*(*ppConditionState)).pszSCDefinitions[__ix])) {CoTaskMemFree (((*(*ppConditionState)).pszSCDefinitions[__ix]));}}}CoTaskMemFree ((*(*ppConditionState)).pszSCDefinitions);}if ((*(*ppConditionState)).pdwSCSeverities) {CoTaskMemFree ((*(*ppConditionState)).pdwSCSeverities);}if ((*(*ppConditionState)).pszSCDescriptions) {{for (DWORD __ix=0; __ix < (*(*ppConditionState)).dwNumSCs; ++__ix) {if (((*(*ppConditionState)).pszSCDescriptions[__ix])) {CoTaskMemFree (((*(*ppConditionState)).pszSCDescriptions[__ix]));}}}CoTaskMemFree ((*(*ppConditionState)).pszSCDescriptions);}if ((*(*ppConditionState)).pEventAttributes) {{for (DWORD __ix=0; __ix < (*(*ppConditionState)).dwNumEventAttrs; ++__ix) {::VariantClear (&(((*(*ppConditionState)).pEventAttributes[__ix]))); }}CoTaskMemFree ((*(*ppConditionState)).pEventAttributes);}if ((*(*ppConditionState)).pErrors) {CoTaskMemFree ((*(*ppConditionState)).pErrors);}CoTaskMemFree ((*ppConditionState));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_EnableConditionByArea_vxproxy (IOPCEventServer* pThis, DWORD dwNumAreas, LPWSTR* pszAreas)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 13, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwNumAreas, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pszAreas, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), dwNumAreas))); 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 IOPCEventServer_EnableConditionByArea_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwNumAreas;
- hr=widlUnmarshal (&dwNumAreas, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LPWSTR* pszAreas;
- hr=widlUnmarshal (&pszAreas, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->EnableConditionByArea (dwNumAreas, pszAreas);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_EnableConditionBySource_vxproxy (IOPCEventServer* pThis, DWORD dwNumSources, LPWSTR* pszSources)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 14, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwNumSources, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pszSources, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), dwNumSources))); 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 IOPCEventServer_EnableConditionBySource_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwNumSources;
- hr=widlUnmarshal (&dwNumSources, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LPWSTR* pszSources;
- hr=widlUnmarshal (&pszSources, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->EnableConditionBySource (dwNumSources, pszSources);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_DisableConditionByArea_vxproxy (IOPCEventServer* pThis, DWORD dwNumAreas, LPWSTR* pszAreas)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 15, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwNumAreas, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pszAreas, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), dwNumAreas))); 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 IOPCEventServer_DisableConditionByArea_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwNumAreas;
- hr=widlUnmarshal (&dwNumAreas, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LPWSTR* pszAreas;
- hr=widlUnmarshal (&pszAreas, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->DisableConditionByArea (dwNumAreas, pszAreas);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_DisableConditionBySource_vxproxy (IOPCEventServer* pThis, DWORD dwNumSources, LPWSTR* pszSources)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 16, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwNumSources, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pszSources, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), dwNumSources))); 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 IOPCEventServer_DisableConditionBySource_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwNumSources;
- hr=widlUnmarshal (&dwNumSources, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LPWSTR* pszSources;
- hr=widlUnmarshal (&pszSources, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->DisableConditionBySource (dwNumSources, pszSources);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventServer_AckCondition_vxproxy (IOPCEventServer* pThis, DWORD dwCount, LPWSTR szAcknowledgerID, LPWSTR szComment, LPWSTR* pszSource, LPWSTR* pszConditionName, FILETIME* pftActiveTime, DWORD* pdwCookie, HRESULT** ppErrors)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 17, 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 (&szAcknowledgerID, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&szComment, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pszSource, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pszConditionName, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pftActiveTime, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__FILETIME (ndrtypes), NDR_SIZEOF(FILETIME), dwCount))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwCookie, 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 (&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 IOPCEventServer_AckCondition_vxstub (IOPCEventServer* 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;
- LPWSTR szAcknowledgerID;
- hr=widlUnmarshal (&szAcknowledgerID, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- LPWSTR szComment;
- hr=widlUnmarshal (&szComment, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- LPWSTR* pszSource;
- hr=widlUnmarshal (&pszSource, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
- LPWSTR* pszConditionName;
- hr=widlUnmarshal (&pszConditionName, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
- FILETIME* pftActiveTime;
- hr=widlUnmarshal (&pftActiveTime, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__FILETIME (ndrtypes), NDR_SIZEOF(FILETIME)))); if (FAILED(hr)) return hr;
- DWORD* pdwCookie;
- hr=widlUnmarshal (&pdwCookie, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
- HRESULT* ppErrors_tmp;
- HRESULT** ppErrors = &ppErrors_tmp;
- hrMethod = pitf->AckCondition (dwCount, szAcknowledgerID, szComment, pszSource, pszConditionName, pftActiveTime, pdwCookie, 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 IOPCEventServer_CreateAreaBrowser_vxproxy (IOPCEventServer* pThis, REFIID riid, LPUNKNOWN* ppUnk)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 18, 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 IOPCEventServer_CreateAreaBrowser_vxstub (IOPCEventServer* 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->CreateAreaBrowser (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(IOPCEventServer) IOPCEventServer_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(&IOPCEventServer_GetStatus_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_CreateEventSubscription_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_QueryAvailableFilters_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_QueryEventCategories_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_QueryConditionNames_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_QuerySubConditionNames_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_QuerySourceConditions_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_QueryEventAttributes_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_TranslateToItemIDs_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_GetConditionState_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_EnableConditionByArea_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_EnableConditionBySource_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_DisableConditionByArea_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_DisableConditionBySource_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_AckCondition_vxproxy),
- COM_VTBL_METHOD(&IOPCEventServer_CreateAreaBrowser_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCEventServer [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCEventServer_GetStatus_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_CreateEventSubscription_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_QueryAvailableFilters_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_QueryEventCategories_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_QueryConditionNames_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_QuerySubConditionNames_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_QuerySourceConditions_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_QueryEventAttributes_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_TranslateToItemIDs_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_GetConditionState_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_EnableConditionByArea_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_EnableConditionBySource_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_DisableConditionByArea_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_DisableConditionBySource_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_AckCondition_vxstub,
- (PFN_ORPC_STUB) IOPCEventServer_CreateAreaBrowser_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCEventServer_vxstub_disptbl =
- {
- 19,
- stub_functbl_IOPCEventServer
- };
- VXDCOM_PS_AUTOREGISTER(IOPCEventServer);
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_SetFilter_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD dwEventType, DWORD dwNumCategories, DWORD* pdwEventCategories, DWORD dwLowSeverity, DWORD dwHighSeverity, DWORD dwNumAreas, LPWSTR* pszAreaList, DWORD dwNumSources, LPWSTR* pszSourceList)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwEventType, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwNumCategories, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwEventCategories, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), dwNumCategories))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwLowSeverity, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwHighSeverity, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwNumAreas, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pszAreaList, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), dwNumAreas))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwNumSources, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pszSourceList, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), dwNumSources))); 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 IOPCEventSubscriptionMgt_SetFilter_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwEventType;
- hr=widlUnmarshal (&dwEventType, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD dwNumCategories;
- hr=widlUnmarshal (&dwNumCategories, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD* pdwEventCategories;
- hr=widlUnmarshal (&pdwEventCategories, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
- DWORD dwLowSeverity;
- hr=widlUnmarshal (&dwLowSeverity, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD dwHighSeverity;
- hr=widlUnmarshal (&dwHighSeverity, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD dwNumAreas;
- hr=widlUnmarshal (&dwNumAreas, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LPWSTR* pszAreaList;
- hr=widlUnmarshal (&pszAreaList, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
- DWORD dwNumSources;
- hr=widlUnmarshal (&dwNumSources, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- LPWSTR* pszSourceList;
- hr=widlUnmarshal (&pszSourceList, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->SetFilter (dwEventType, dwNumCategories, pdwEventCategories, dwLowSeverity, dwHighSeverity, dwNumAreas, pszAreaList, dwNumSources, pszSourceList);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetFilter_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD* pdwEventType, DWORD* pdwNumCategories, DWORD** ppdwEventCategories, DWORD* pdwLowSeverity, DWORD* pdwHighSeverity, DWORD* pdwNumAreas, LPWSTR** ppszAreaList, DWORD* pdwNumSources, LPWSTR** ppszSourceList)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 4, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pdwEventType, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pdwNumCategories, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppdwEventCategories, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))))); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pdwLowSeverity, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pdwHighSeverity, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pdwNumAreas, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppszAreaList, 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 (&pdwNumSources, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&ppszSourceList, 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 (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetFilter_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- DWORD pdwEventType_tmp;
- DWORD* pdwEventType = &pdwEventType_tmp;
- DWORD pdwNumCategories_tmp;
- DWORD* pdwNumCategories = &pdwNumCategories_tmp;
- DWORD* ppdwEventCategories_tmp;
- DWORD** ppdwEventCategories = &ppdwEventCategories_tmp;
- DWORD pdwLowSeverity_tmp;
- DWORD* pdwLowSeverity = &pdwLowSeverity_tmp;
- DWORD pdwHighSeverity_tmp;
- DWORD* pdwHighSeverity = &pdwHighSeverity_tmp;
- DWORD pdwNumAreas_tmp;
- DWORD* pdwNumAreas = &pdwNumAreas_tmp;
- LPWSTR* ppszAreaList_tmp;
- LPWSTR** ppszAreaList = &ppszAreaList_tmp;
- DWORD pdwNumSources_tmp;
- DWORD* pdwNumSources = &pdwNumSources_tmp;
- LPWSTR* ppszSourceList_tmp;
- LPWSTR** ppszSourceList = &ppszSourceList_tmp;
- hrMethod = pitf->GetFilter (pdwEventType, pdwNumCategories, ppdwEventCategories, pdwLowSeverity, pdwHighSeverity, pdwNumAreas, ppszAreaList, pdwNumSources, ppszSourceList);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwEventType, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwNumCategories, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppdwEventCategories, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), *pdwNumCategories)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwLowSeverity, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwHighSeverity, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwNumAreas, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppszAreaList, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), *pdwNumAreas)))); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwNumSources, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppszSourceList, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR), *pdwNumSources)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppdwEventCategories)) {CoTaskMemFree ((*ppdwEventCategories));}if ((*ppszAreaList)) {{for (DWORD __ix=0; __ix < *pdwNumAreas; ++__ix) {if (((*ppszAreaList)[__ix])) {CoTaskMemFree (((*ppszAreaList)[__ix]));}}}CoTaskMemFree ((*ppszAreaList));}if ((*ppszSourceList)) {{for (DWORD __ix=0; __ix < *pdwNumSources; ++__ix) {if (((*ppszSourceList)[__ix])) {CoTaskMemFree (((*ppszSourceList)[__ix]));}}}CoTaskMemFree ((*ppszSourceList));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_SelectReturnedAttributes_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD dwEventCategory, DWORD dwCount, DWORD* dwAttributeIDs)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwAttributeIDs, 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 (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_SelectReturnedAttributes_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwEventCategory;
- hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD* dwAttributeIDs;
- hr=widlUnmarshal (&dwAttributeIDs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->SelectReturnedAttributes (dwEventCategory, dwCount, dwAttributeIDs);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetReturnedAttributes_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD dwEventCategory, DWORD* pdwCount, DWORD** ppdwAttributeIDs)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_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 (&ppdwAttributeIDs, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))))); if (FAILED(hr)) return hr;
- hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return hrMethod;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetReturnedAttributes_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- DWORD dwEventCategory;
- hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD pdwCount_tmp;
- DWORD* pdwCount = &pdwCount_tmp;
- DWORD* ppdwAttributeIDs_tmp;
- DWORD** ppdwAttributeIDs = &ppdwAttributeIDs_tmp;
- hrMethod = pitf->GetReturnedAttributes (dwEventCategory, pdwCount, ppdwAttributeIDs);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&ppdwAttributeIDs, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), *pdwCount)))); if (FAILED(hr)) return hr;
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- if ((*ppdwAttributeIDs)) {CoTaskMemFree ((*ppdwAttributeIDs));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_Refresh_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD dwConnection)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 7, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwConnection, 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 IOPCEventSubscriptionMgt_Refresh_vxstub (IOPCEventSubscriptionMgt* 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;
- hrMethod = pitf->Refresh (dwConnection);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_CancelRefresh_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD dwConnection)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 8, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&dwConnection, 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 IOPCEventSubscriptionMgt_CancelRefresh_vxstub (IOPCEventSubscriptionMgt* 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;
- hrMethod = pitf->CancelRefresh (dwConnection);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetState_vxproxy (IOPCEventSubscriptionMgt* pThis, BOOL* pbActive, DWORD* pdwBufferTime, DWORD* pdwMaxSize, OPCHANDLE* phClientSubscription)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 9, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pbActive, pus, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pdwBufferTime, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pdwMaxSize, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&phClientSubscription, 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 IOPCEventSubscriptionMgt_GetState_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- BOOL pbActive_tmp;
- BOOL* pbActive = &pbActive_tmp;
- DWORD pdwBufferTime_tmp;
- DWORD* pdwBufferTime = &pdwBufferTime_tmp;
- DWORD pdwMaxSize_tmp;
- DWORD* pdwMaxSize = &pdwMaxSize_tmp;
- OPCHANDLE phClientSubscription_tmp;
- OPCHANDLE* phClientSubscription = &phClientSubscription_tmp;
- hrMethod = pitf->GetState (pbActive, pdwBufferTime, pdwMaxSize, phClientSubscription);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pbActive, pms, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwBufferTime, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwMaxSize, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&phClientSubscription, 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 IOPCEventSubscriptionMgt_SetState_vxproxy (IOPCEventSubscriptionMgt* pThis, BOOL* pbActive, DWORD* pdwBufferTime, DWORD* pdwMaxSize, OPCHANDLE hClientSubscription, DWORD* pdwRevisedBufferTime, DWORD* pdwRevisedMaxSize)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 10, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pbActive, pms, ndrtypes.pointer_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwBufferTime, pms, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwMaxSize, pms, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&hClientSubscription, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr = msg.SendReceive (); if (FAILED (hr)) return hr;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- hr=widlUnmarshal (&pdwRevisedBufferTime, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlUnmarshal (&pdwRevisedMaxSize, 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 IOPCEventSubscriptionMgt_SetState_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- BOOL* pbActive;
- hr=widlUnmarshal (&pbActive, pus, ndrtypes.pointer_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
- DWORD* pdwBufferTime;
- hr=widlUnmarshal (&pdwBufferTime, pus, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- DWORD* pdwMaxSize;
- hr=widlUnmarshal (&pdwMaxSize, pus, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- OPCHANDLE hClientSubscription;
- hr=widlUnmarshal (&hClientSubscription, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- DWORD pdwRevisedBufferTime_tmp;
- DWORD* pdwRevisedBufferTime = &pdwRevisedBufferTime_tmp;
- DWORD pdwRevisedMaxSize_tmp;
- DWORD* pdwRevisedMaxSize = &pdwRevisedMaxSize_tmp;
- hrMethod = pitf->SetState (pbActive, pdwBufferTime, pdwMaxSize, hClientSubscription, pdwRevisedBufferTime, pdwRevisedMaxSize);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pdwRevisedBufferTime, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pdwRevisedMaxSize, 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;
- }
- COM_VTABLE(IOPCEventSubscriptionMgt) IOPCEventSubscriptionMgt_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(&IOPCEventSubscriptionMgt_SetFilter_vxproxy),
- COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_GetFilter_vxproxy),
- COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_SelectReturnedAttributes_vxproxy),
- COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_GetReturnedAttributes_vxproxy),
- COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_Refresh_vxproxy),
- COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_CancelRefresh_vxproxy),
- COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_GetState_vxproxy),
- COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_SetState_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCEventSubscriptionMgt [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_SetFilter_vxstub,
- (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_GetFilter_vxstub,
- (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_SelectReturnedAttributes_vxstub,
- (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_GetReturnedAttributes_vxstub,
- (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_Refresh_vxstub,
- (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_CancelRefresh_vxstub,
- (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_GetState_vxstub,
- (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_SetState_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCEventSubscriptionMgt_vxstub_disptbl =
- {
- 11,
- stub_functbl_IOPCEventSubscriptionMgt
- };
- VXDCOM_PS_AUTOREGISTER(IOPCEventSubscriptionMgt);
- HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_ChangeBrowsePosition_vxproxy (IOPCEventAreaBrowser* pThis, OPCAEBROWSEDIRECTION dwBrowseDirection, LPCWSTR szString)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventAreaBrowser, RpcMode::OBJECT, 3, 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 IOPCEventAreaBrowser_ChangeBrowsePosition_vxstub (IOPCEventAreaBrowser* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCAEBROWSEDIRECTION 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 IOPCEventAreaBrowser_BrowseOPCAreas_vxproxy (IOPCEventAreaBrowser* pThis, OPCAEBROWSETYPE dwBrowseFilterType, LPCWSTR szFilterCriteria, LPENUMSTRING* ppIEnumString)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventAreaBrowser, RpcMode::OBJECT, 4, 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 = 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 IOPCEventAreaBrowser_BrowseOPCAreas_vxstub (IOPCEventAreaBrowser* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCAEBROWSETYPE 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;
- LPENUMSTRING ppIEnumString_tmp;
- LPENUMSTRING* ppIEnumString = &ppIEnumString_tmp;
- hrMethod = pitf->BrowseOPCAreas (dwBrowseFilterType, szFilterCriteria, 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 IOPCEventAreaBrowser_GetQualifiedAreaName_vxproxy (IOPCEventAreaBrowser* pThis, LPCWSTR szAreaName, LPWSTR* pszQualifiedAreaName)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventAreaBrowser, RpcMode::OBJECT, 5, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szAreaName, 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 (&pszQualifiedAreaName, 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 IOPCEventAreaBrowser_GetQualifiedAreaName_vxstub (IOPCEventAreaBrowser* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPCWSTR szAreaName;
- hr=widlUnmarshal (&szAreaName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- LPWSTR pszQualifiedAreaName_tmp;
- LPWSTR* pszQualifiedAreaName = &pszQualifiedAreaName_tmp;
- hrMethod = pitf->GetQualifiedAreaName (szAreaName, pszQualifiedAreaName);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pszQualifiedAreaName, 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 ((*pszQualifiedAreaName)) {CoTaskMemFree ((*pszQualifiedAreaName));};
- return S_OK;
- }
- HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_GetQualifiedSourceName_vxproxy (IOPCEventAreaBrowser* pThis, LPCWSTR szSourceName, LPWSTR* pszQualifiedSourceName)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventAreaBrowser, RpcMode::OBJECT, 6, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&szSourceName, 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 (&pszQualifiedSourceName, 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 IOPCEventAreaBrowser_GetQualifiedSourceName_vxstub (IOPCEventAreaBrowser* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- LPCWSTR szSourceName;
- hr=widlUnmarshal (&szSourceName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
- LPWSTR pszQualifiedSourceName_tmp;
- LPWSTR* pszQualifiedSourceName = &pszQualifiedSourceName_tmp;
- hrMethod = pitf->GetQualifiedSourceName (szSourceName, pszQualifiedSourceName);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&pszQualifiedSourceName, 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 ((*pszQualifiedSourceName)) {CoTaskMemFree ((*pszQualifiedSourceName));};
- return S_OK;
- }
- COM_VTABLE(IOPCEventAreaBrowser) IOPCEventAreaBrowser_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(&IOPCEventAreaBrowser_ChangeBrowsePosition_vxproxy),
- COM_VTBL_METHOD(&IOPCEventAreaBrowser_BrowseOPCAreas_vxproxy),
- COM_VTBL_METHOD(&IOPCEventAreaBrowser_GetQualifiedAreaName_vxproxy),
- COM_VTBL_METHOD(&IOPCEventAreaBrowser_GetQualifiedSourceName_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCEventAreaBrowser [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCEventAreaBrowser_ChangeBrowsePosition_vxstub,
- (PFN_ORPC_STUB) IOPCEventAreaBrowser_BrowseOPCAreas_vxstub,
- (PFN_ORPC_STUB) IOPCEventAreaBrowser_GetQualifiedAreaName_vxstub,
- (PFN_ORPC_STUB) IOPCEventAreaBrowser_GetQualifiedSourceName_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCEventAreaBrowser_vxstub_disptbl =
- {
- 7,
- stub_functbl_IOPCEventAreaBrowser
- };
- VXDCOM_PS_AUTOREGISTER(IOPCEventAreaBrowser);
- HRESULT STDMETHODCALLTYPE IOPCEventSink_OnEvent_vxproxy (IOPCEventSink* pThis, OPCHANDLE hClientSubscription, BOOL bRefresh, BOOL bLastRefresh, DWORD dwCount, ONEVENTSTRUCT* pEvents)
- {
- RPC_PROXY_MSG msg (IID_IOPCEventSink, RpcMode::OBJECT, 3, pThis);
- NDRTYPES ndrtypes;
- HRESULT hrMethod;
- HRESULT hr;
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr=widlMarshal (&hClientSubscription, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&bRefresh, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&bLastRefresh, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- hr=widlMarshal (&pEvents, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagONEVENTSTRUCT (ndrtypes), NDR_SIZEOF(ONEVENTSTRUCT), 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 IOPCEventSink_OnEvent_vxstub (IOPCEventSink* pitf, RPC_STUB_MSG& msg)
- {
- NDRTYPES ndrtypes;
- HRESULT hr;
- HRESULT hrMethod;
- NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
- OPCHANDLE hClientSubscription;
- hr=widlUnmarshal (&hClientSubscription, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- BOOL bRefresh;
- hr=widlUnmarshal (&bRefresh, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- BOOL bLastRefresh;
- hr=widlUnmarshal (&bLastRefresh, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
- DWORD dwCount;
- hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
- ONEVENTSTRUCT* pEvents;
- hr=widlUnmarshal (&pEvents, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagONEVENTSTRUCT (ndrtypes), NDR_SIZEOF(ONEVENTSTRUCT)))); if (FAILED(hr)) return hr;
- hrMethod = pitf->OnEvent (hClientSubscription, bRefresh, bLastRefresh, dwCount, pEvents);
- NdrMarshalStream* pms = msg.marshalStreamGet ();
- hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
- if (FAILED(hr))
- return hr;
- return S_OK;
- }
- COM_VTABLE(IOPCEventSink) IOPCEventSink_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(&IOPCEventSink_OnEvent_vxproxy),
- };
- const PFN_ORPC_STUB stub_functbl_IOPCEventSink [] =
- {
- 0,0,0,
- (PFN_ORPC_STUB) IOPCEventSink_OnEvent_vxstub,
- };
- EXTERN_C const VXDCOM_STUB_DISPTBL IOPCEventSink_vxstub_disptbl =
- {
- 4,
- stub_functbl_IOPCEventSink
- };
- VXDCOM_PS_AUTOREGISTER(IOPCEventSink);