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

VxWorks

开发平台:

C/C++

  1. /* opc_ae_ps.cpp generated by WIDL Version 2.2.1 on 06-Dec-01 at 11:55:11 AM */
  2. #define __WIDL_PROXY_STUB 0x0200
  3. #include "dcomProxy.h"
  4. #include "opc_ae.h"
  5. #include <string.h>
  6. extern "C" int include_opc_ae () {return 0;}
  7. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  8. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  9. NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
  10. NdrTypeDesc StructDesc_tagONEVENTSTRUCT (NDRTYPES& ndrtypes)
  11.     {
  12.     NdrMemberInfo m [] =
  13.         {
  14.         NDR_MEMBER(tagONEVENTSTRUCT, wChangeMask, ndrtypes.short_t ()),
  15.         NDR_MEMBER(tagONEVENTSTRUCT, wNewState, ndrtypes.short_t ()),
  16.         NDR_MEMBER(tagONEVENTSTRUCT, szSource, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  17.         NDR_MEMBER(tagONEVENTSTRUCT, ftTime, StructDesc__FILETIME (ndrtypes)),
  18.         NDR_MEMBER(tagONEVENTSTRUCT, szMessage, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  19.         NDR_MEMBER(tagONEVENTSTRUCT, dwEventType, ndrtypes.ulong_t ()),
  20.         NDR_MEMBER(tagONEVENTSTRUCT, dwEventCategory, ndrtypes.ulong_t ()),
  21.         NDR_MEMBER(tagONEVENTSTRUCT, dwSeverity, ndrtypes.ulong_t ()),
  22.         NDR_MEMBER(tagONEVENTSTRUCT, szConditionName, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  23.         NDR_MEMBER(tagONEVENTSTRUCT, szSubconditionName, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  24.         NDR_MEMBER(tagONEVENTSTRUCT, wQuality, ndrtypes.short_t ()),
  25.         NDR_MEMBER(tagONEVENTSTRUCT, wReserved, ndrtypes.short_t ()),
  26.         NDR_MEMBER(tagONEVENTSTRUCT, bAckRequired, ndrtypes.int_t ()),
  27.         NDR_MEMBER(tagONEVENTSTRUCT, ftActiveTime, StructDesc__FILETIME (ndrtypes)),
  28.         NDR_MEMBER(tagONEVENTSTRUCT, dwCookie, ndrtypes.ulong_t ()),
  29.         NDR_MEMBER(tagONEVENTSTRUCT, dwNumEventAttrs, ndrtypes.ulong_t ()),
  30.         NDR_MEMBERX(tagONEVENTSTRUCT, pEventAttributes, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT))), 15),
  31.         NDR_MEMBER(tagONEVENTSTRUCT, szActorID, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  32.         };
  33.     return ndrtypes.struct_t (18, m, 15);
  34.     }
  35. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  36. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  37. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  38. NdrTypeDesc StructDesc_tagOPCEVENTSERVERSTATUS (NDRTYPES& ndrtypes)
  39.     {
  40.     NdrMemberInfo m [] =
  41.         {
  42.         NDR_MEMBER(tagOPCEVENTSERVERSTATUS, ftStartTime, StructDesc__FILETIME (ndrtypes)),
  43.         NDR_MEMBER(tagOPCEVENTSERVERSTATUS, ftCurrentTime, StructDesc__FILETIME (ndrtypes)),
  44.         NDR_MEMBER(tagOPCEVENTSERVERSTATUS, ftLastUpdateTime, StructDesc__FILETIME (ndrtypes)),
  45.         NDR_MEMBER(tagOPCEVENTSERVERSTATUS, dwServerState, ndrtypes.enum_t ()),
  46.         NDR_MEMBER(tagOPCEVENTSERVERSTATUS, wMajorVersion, ndrtypes.short_t ()),
  47.         NDR_MEMBER(tagOPCEVENTSERVERSTATUS, wMinorVersion, ndrtypes.short_t ()),
  48.         NDR_MEMBER(tagOPCEVENTSERVERSTATUS, wBuildNumber, ndrtypes.short_t ()),
  49.         NDR_MEMBER(tagOPCEVENTSERVERSTATUS, wReserved, ndrtypes.short_t ()),
  50.         NDR_MEMBER(tagOPCEVENTSERVERSTATUS, szVendorInfo, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  51.         };
  52.     return ndrtypes.struct_t (9, m);
  53.     }
  54. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  55. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  56. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  57. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  58. NdrTypeDesc StructDesc_tagVARIANT(NDRTYPES&);
  59. NdrTypeDesc StructDesc_tagOPCCONDITIONSTATE (NDRTYPES& ndrtypes)
  60.     {
  61.     NdrMemberInfo m [] =
  62.         {
  63.         NDR_MEMBER(tagOPCCONDITIONSTATE, wState, ndrtypes.short_t ()),
  64.         NDR_MEMBER(tagOPCCONDITIONSTATE, wReserved1, ndrtypes.short_t ()),
  65.         NDR_MEMBER(tagOPCCONDITIONSTATE, szActiveSubCondition, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  66.         NDR_MEMBER(tagOPCCONDITIONSTATE, szASCDefinition, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  67.         NDR_MEMBER(tagOPCCONDITIONSTATE, dwASCSeverity, ndrtypes.ulong_t ()),
  68.         NDR_MEMBER(tagOPCCONDITIONSTATE, szASCDescription, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  69.         NDR_MEMBER(tagOPCCONDITIONSTATE, wQuality, ndrtypes.short_t ()),
  70.         NDR_MEMBER(tagOPCCONDITIONSTATE, wReserved2, ndrtypes.short_t ()),
  71.         NDR_MEMBER(tagOPCCONDITIONSTATE, ftLastAckTime, StructDesc__FILETIME (ndrtypes)),
  72.         NDR_MEMBER(tagOPCCONDITIONSTATE, ftSubCondLastActive, StructDesc__FILETIME (ndrtypes)),
  73.         NDR_MEMBER(tagOPCCONDITIONSTATE, ftCondLastActive, StructDesc__FILETIME (ndrtypes)),
  74.         NDR_MEMBER(tagOPCCONDITIONSTATE, ftCondLastInactive, StructDesc__FILETIME (ndrtypes)),
  75.         NDR_MEMBER(tagOPCCONDITIONSTATE, szAcknowledgerID, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  76.         NDR_MEMBER(tagOPCCONDITIONSTATE, szComment, ndrtypes.pointer_t(ndrtypes.wstring_t ())),
  77.         NDR_MEMBER(tagOPCCONDITIONSTATE, dwNumSCs, ndrtypes.ulong_t ()),
  78.         NDR_MEMBERX(tagOPCCONDITIONSTATE, pszSCNames, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR))), 14),
  79.         NDR_MEMBERX(tagOPCCONDITIONSTATE, pszSCDefinitions, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR))), 14),
  80.         NDR_MEMBERX(tagOPCCONDITIONSTATE, pdwSCSeverities, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))), 14),
  81.         NDR_MEMBERX(tagOPCCONDITIONSTATE, pszSCDescriptions, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR))), 14),
  82.         NDR_MEMBER(tagOPCCONDITIONSTATE, dwNumEventAttrs, ndrtypes.ulong_t ()),
  83.         NDR_MEMBERX(tagOPCCONDITIONSTATE, pEventAttributes, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.variant_t (), NDR_SIZEOF(VARIANT))), 19),
  84.         NDR_MEMBERX(tagOPCCONDITIONSTATE, pErrors, ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT))), 19),
  85.         };
  86.     return ndrtypes.struct_t (22, m, 19);
  87.     }
  88. NdrTypeDesc StructDesc_tagOPCEVENTSERVERSTATUS(NDRTYPES&);
  89. NdrTypeDesc StructDesc__GUID(NDRTYPES&);
  90. NdrTypeDesc StructDesc__GUID(NDRTYPES&);
  91. NdrTypeDesc StructDesc_tagOPCCONDITIONSTATE(NDRTYPES&);
  92. NdrTypeDesc StructDesc__FILETIME(NDRTYPES&);
  93. NdrTypeDesc StructDesc__GUID(NDRTYPES&);
  94. NdrTypeDesc StructDesc_tagONEVENTSTRUCT(NDRTYPES&);
  95. HRESULT STDMETHODCALLTYPE IOPCEventServer_GetStatus_vxproxy (IOPCEventServer* pThis, OPCEVENTSERVERSTATUS** ppEventServerStatus)
  96.     {
  97.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 3, pThis);
  98.     NDRTYPES ndrtypes;
  99.     HRESULT hrMethod;
  100.     HRESULT hr;
  101.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  102.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  103.     hr=widlUnmarshal (&ppEventServerStatus, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCEVENTSERVERSTATUS (ndrtypes)))); if (FAILED(hr)) return hr;
  104.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  105.     if (FAILED(hr))
  106.         return hr;
  107.     return hrMethod;
  108.     }
  109. HRESULT STDMETHODCALLTYPE IOPCEventServer_GetStatus_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  110.     {
  111.     NDRTYPES ndrtypes;
  112.     HRESULT hr;
  113.     HRESULT hrMethod;
  114.     OPCEVENTSERVERSTATUS* ppEventServerStatus_tmp;
  115.     OPCEVENTSERVERSTATUS** ppEventServerStatus = &ppEventServerStatus_tmp;
  116.     hrMethod = pitf->GetStatus (ppEventServerStatus);
  117.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  118.     hr=widlMarshal (&ppEventServerStatus, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCEVENTSERVERSTATUS (ndrtypes)))); if (FAILED(hr)) return hr;
  119.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  120.     if (FAILED(hr))
  121.         return hr;
  122.     if ((*ppEventServerStatus)) {if ((*(*ppEventServerStatus)).szVendorInfo) {CoTaskMemFree ((*(*ppEventServerStatus)).szVendorInfo);}CoTaskMemFree ((*ppEventServerStatus));};
  123.     return S_OK;
  124.     }
  125. HRESULT STDMETHODCALLTYPE IOPCEventServer_CreateEventSubscription_vxproxy (IOPCEventServer* pThis, BOOL bActive, DWORD dwBufferTime, DWORD dwMaxSize, OPCHANDLE hClientSubscription, REFIID riid, LPUNKNOWN* ppUnk, DWORD* pdwRevisedBufferTime, DWORD* pdwRevisedMaxSize)
  126.     {
  127.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 4, pThis);
  128.     NDRTYPES ndrtypes;
  129.     HRESULT hrMethod;
  130.     HRESULT hr;
  131.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  132.     hr=widlMarshal (&bActive, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
  133.     hr=widlMarshal (&dwBufferTime, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  134.     hr=widlMarshal (&dwMaxSize, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  135.     hr=widlMarshal (&hClientSubscription, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  136.     hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
  137.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  138.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  139.     hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
  140.     hr=widlUnmarshal (&pdwRevisedBufferTime, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  141.     hr=widlUnmarshal (&pdwRevisedMaxSize, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  142.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  143.     if (FAILED(hr))
  144.         return hr;
  145.     return hrMethod;
  146.     }
  147. HRESULT STDMETHODCALLTYPE IOPCEventServer_CreateEventSubscription_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  148.     {
  149.     NDRTYPES ndrtypes;
  150.     HRESULT hr;
  151.     HRESULT hrMethod;
  152.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  153.     BOOL bActive;
  154.     hr=widlUnmarshal (&bActive, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
  155.     DWORD dwBufferTime;
  156.     hr=widlUnmarshal (&dwBufferTime, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  157.     DWORD dwMaxSize;
  158.     hr=widlUnmarshal (&dwMaxSize, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  159.     OPCHANDLE hClientSubscription;
  160.     hr=widlUnmarshal (&hClientSubscription, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  161.     IID riid;
  162.     hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
  163.     LPUNKNOWN ppUnk_tmp;
  164.     LPUNKNOWN* ppUnk = &ppUnk_tmp;
  165.     DWORD pdwRevisedBufferTime_tmp;
  166.     DWORD* pdwRevisedBufferTime = &pdwRevisedBufferTime_tmp;
  167.     DWORD pdwRevisedMaxSize_tmp;
  168.     DWORD* pdwRevisedMaxSize = &pdwRevisedMaxSize_tmp;
  169.     hrMethod = pitf->CreateEventSubscription (bActive, dwBufferTime, dwMaxSize, hClientSubscription, riid, ppUnk, pdwRevisedBufferTime, pdwRevisedMaxSize);
  170.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  171.     hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
  172.     hr=widlMarshal (&pdwRevisedBufferTime, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  173.     hr=widlMarshal (&pdwRevisedMaxSize, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  174.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  175.     if (FAILED(hr))
  176.         return hr;
  177.     if ((*ppUnk)) {((*ppUnk))->Release ();};
  178.     return S_OK;
  179.     }
  180. HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryAvailableFilters_vxproxy (IOPCEventServer* pThis, DWORD* pdwFilterMask)
  181.     {
  182.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 5, pThis);
  183.     NDRTYPES ndrtypes;
  184.     HRESULT hrMethod;
  185.     HRESULT hr;
  186.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  187.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  188.     hr=widlUnmarshal (&pdwFilterMask, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  189.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  190.     if (FAILED(hr))
  191.         return hr;
  192.     return hrMethod;
  193.     }
  194. HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryAvailableFilters_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  195.     {
  196.     NDRTYPES ndrtypes;
  197.     HRESULT hr;
  198.     HRESULT hrMethod;
  199.     DWORD pdwFilterMask_tmp;
  200.     DWORD* pdwFilterMask = &pdwFilterMask_tmp;
  201.     hrMethod = pitf->QueryAvailableFilters (pdwFilterMask);
  202.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  203.     hr=widlMarshal (&pdwFilterMask, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  204.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  205.     if (FAILED(hr))
  206.         return hr;
  207.     return S_OK;
  208.     }
  209. HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryEventCategories_vxproxy (IOPCEventServer* pThis, DWORD dwEventType, DWORD* pdwCount, DWORD** ppdwEventCategories, LPWSTR** ppszEventCategoryDescs)
  210.     {
  211.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 6, pThis);
  212.     NDRTYPES ndrtypes;
  213.     HRESULT hrMethod;
  214.     HRESULT hr;
  215.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  216.     hr=widlMarshal (&dwEventType, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  217.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  218.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  219.     hr=widlUnmarshal (&pdwCount, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  220.     hr=widlUnmarshal (&ppdwEventCategories, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))))); if (FAILED(hr)) return hr;
  221.     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;
  222.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  223.     if (FAILED(hr))
  224.         return hr;
  225.     return hrMethod;
  226.     }
  227. HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryEventCategories_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  228.     {
  229.     NDRTYPES ndrtypes;
  230.     HRESULT hr;
  231.     HRESULT hrMethod;
  232.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  233.     DWORD dwEventType;
  234.     hr=widlUnmarshal (&dwEventType, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  235.     DWORD pdwCount_tmp;
  236.     DWORD* pdwCount = &pdwCount_tmp;
  237.     DWORD* ppdwEventCategories_tmp;
  238.     DWORD** ppdwEventCategories = &ppdwEventCategories_tmp;
  239.     LPWSTR* ppszEventCategoryDescs_tmp;
  240.     LPWSTR** ppszEventCategoryDescs = &ppszEventCategoryDescs_tmp;
  241.     hrMethod = pitf->QueryEventCategories (dwEventType, pdwCount, ppdwEventCategories, ppszEventCategoryDescs);
  242.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  243.     hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  244.     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;
  245.     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;
  246.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  247.     if (FAILED(hr))
  248.         return hr;
  249.     if ((*ppdwEventCategories)) {CoTaskMemFree ((*ppdwEventCategories));}if ((*ppszEventCategoryDescs)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppszEventCategoryDescs)[__ix])) {CoTaskMemFree (((*ppszEventCategoryDescs)[__ix]));}}}CoTaskMemFree ((*ppszEventCategoryDescs));};
  250.     return S_OK;
  251.     }
  252. HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryConditionNames_vxproxy (IOPCEventServer* pThis, DWORD dwEventCategory, DWORD* pdwCount, LPWSTR** ppszConditionNames)
  253.     {
  254.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 7, pThis);
  255.     NDRTYPES ndrtypes;
  256.     HRESULT hrMethod;
  257.     HRESULT hr;
  258.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  259.     hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  260.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  261.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  262.     hr=widlUnmarshal (&pdwCount, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  263.     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;
  264.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  265.     if (FAILED(hr))
  266.         return hr;
  267.     return hrMethod;
  268.     }
  269. HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryConditionNames_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  270.     {
  271.     NDRTYPES ndrtypes;
  272.     HRESULT hr;
  273.     HRESULT hrMethod;
  274.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  275.     DWORD dwEventCategory;
  276.     hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  277.     DWORD pdwCount_tmp;
  278.     DWORD* pdwCount = &pdwCount_tmp;
  279.     LPWSTR* ppszConditionNames_tmp;
  280.     LPWSTR** ppszConditionNames = &ppszConditionNames_tmp;
  281.     hrMethod = pitf->QueryConditionNames (dwEventCategory, pdwCount, ppszConditionNames);
  282.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  283.     hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  284.     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;
  285.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  286.     if (FAILED(hr))
  287.         return hr;
  288.     if ((*ppszConditionNames)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppszConditionNames)[__ix])) {CoTaskMemFree (((*ppszConditionNames)[__ix]));}}}CoTaskMemFree ((*ppszConditionNames));};
  289.     return S_OK;
  290.     }
  291. HRESULT STDMETHODCALLTYPE IOPCEventServer_QuerySubConditionNames_vxproxy (IOPCEventServer* pThis, LPWSTR szConditionName, DWORD* pdwCount, LPWSTR** ppszSubConditionNames)
  292.     {
  293.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 8, pThis);
  294.     NDRTYPES ndrtypes;
  295.     HRESULT hrMethod;
  296.     HRESULT hr;
  297.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  298.     hr=widlMarshal (&szConditionName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  299.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  300.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  301.     hr=widlUnmarshal (&pdwCount, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  302.     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;
  303.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  304.     if (FAILED(hr))
  305.         return hr;
  306.     return hrMethod;
  307.     }
  308. HRESULT STDMETHODCALLTYPE IOPCEventServer_QuerySubConditionNames_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  309.     {
  310.     NDRTYPES ndrtypes;
  311.     HRESULT hr;
  312.     HRESULT hrMethod;
  313.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  314.     LPWSTR szConditionName;
  315.     hr=widlUnmarshal (&szConditionName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  316.     DWORD pdwCount_tmp;
  317.     DWORD* pdwCount = &pdwCount_tmp;
  318.     LPWSTR* ppszSubConditionNames_tmp;
  319.     LPWSTR** ppszSubConditionNames = &ppszSubConditionNames_tmp;
  320.     hrMethod = pitf->QuerySubConditionNames (szConditionName, pdwCount, ppszSubConditionNames);
  321.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  322.     hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  323.     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;
  324.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  325.     if (FAILED(hr))
  326.         return hr;
  327.     if ((*ppszSubConditionNames)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppszSubConditionNames)[__ix])) {CoTaskMemFree (((*ppszSubConditionNames)[__ix]));}}}CoTaskMemFree ((*ppszSubConditionNames));};
  328.     return S_OK;
  329.     }
  330. HRESULT STDMETHODCALLTYPE IOPCEventServer_QuerySourceConditions_vxproxy (IOPCEventServer* pThis, LPWSTR szSource, DWORD* pdwCount, LPWSTR** ppszConditionNames)
  331.     {
  332.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 9, pThis);
  333.     NDRTYPES ndrtypes;
  334.     HRESULT hrMethod;
  335.     HRESULT hr;
  336.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  337.     hr=widlMarshal (&szSource, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  338.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  339.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  340.     hr=widlUnmarshal (&pdwCount, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  341.     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;
  342.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  343.     if (FAILED(hr))
  344.         return hr;
  345.     return hrMethod;
  346.     }
  347. HRESULT STDMETHODCALLTYPE IOPCEventServer_QuerySourceConditions_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  348.     {
  349.     NDRTYPES ndrtypes;
  350.     HRESULT hr;
  351.     HRESULT hrMethod;
  352.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  353.     LPWSTR szSource;
  354.     hr=widlUnmarshal (&szSource, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  355.     DWORD pdwCount_tmp;
  356.     DWORD* pdwCount = &pdwCount_tmp;
  357.     LPWSTR* ppszConditionNames_tmp;
  358.     LPWSTR** ppszConditionNames = &ppszConditionNames_tmp;
  359.     hrMethod = pitf->QuerySourceConditions (szSource, pdwCount, ppszConditionNames);
  360.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  361.     hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  362.     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;
  363.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  364.     if (FAILED(hr))
  365.         return hr;
  366.     if ((*ppszConditionNames)) {{for (DWORD __ix=0; __ix < *pdwCount; ++__ix) {if (((*ppszConditionNames)[__ix])) {CoTaskMemFree (((*ppszConditionNames)[__ix]));}}}CoTaskMemFree ((*ppszConditionNames));};
  367.     return S_OK;
  368.     }
  369. HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryEventAttributes_vxproxy (IOPCEventServer* pThis, DWORD dwEventCategory, DWORD* pdwCount, DWORD** ppdwAttrIDs, LPWSTR** ppszAttrDescs, VARTYPE** ppvtAttrTypes)
  370.     {
  371.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 10, pThis);
  372.     NDRTYPES ndrtypes;
  373.     HRESULT hrMethod;
  374.     HRESULT hr;
  375.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  376.     hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  377.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  378.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  379.     hr=widlUnmarshal (&pdwCount, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  380.     hr=widlUnmarshal (&ppdwAttrIDs, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))))); if (FAILED(hr)) return hr;
  381.     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;
  382.     hr=widlUnmarshal (&ppvtAttrTypes, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ushort_t (), NDR_SIZEOF(VARTYPE))))); if (FAILED(hr)) return hr;
  383.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  384.     if (FAILED(hr))
  385.         return hr;
  386.     return hrMethod;
  387.     }
  388. HRESULT STDMETHODCALLTYPE IOPCEventServer_QueryEventAttributes_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  389.     {
  390.     NDRTYPES ndrtypes;
  391.     HRESULT hr;
  392.     HRESULT hrMethod;
  393.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  394.     DWORD dwEventCategory;
  395.     hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  396.     DWORD pdwCount_tmp;
  397.     DWORD* pdwCount = &pdwCount_tmp;
  398.     DWORD* ppdwAttrIDs_tmp;
  399.     DWORD** ppdwAttrIDs = &ppdwAttrIDs_tmp;
  400.     LPWSTR* ppszAttrDescs_tmp;
  401.     LPWSTR** ppszAttrDescs = &ppszAttrDescs_tmp;
  402.     VARTYPE* ppvtAttrTypes_tmp;
  403.     VARTYPE** ppvtAttrTypes = &ppvtAttrTypes_tmp;
  404.     hrMethod = pitf->QueryEventAttributes (dwEventCategory, pdwCount, ppdwAttrIDs, ppszAttrDescs, ppvtAttrTypes);
  405.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  406.     hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  407.     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;
  408.     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;
  409.     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;
  410.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  411.     if (FAILED(hr))
  412.         return hr;
  413.     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));};
  414.     return S_OK;
  415.     }
  416. 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)
  417.     {
  418.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 11, pThis);
  419.     NDRTYPES ndrtypes;
  420.     HRESULT hrMethod;
  421.     HRESULT hr;
  422.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  423.     hr=widlMarshal (&szSource, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  424.     hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  425.     hr=widlMarshal (&szConditionName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  426.     hr=widlMarshal (&szSubconditionName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  427.     hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  428.     hr=widlMarshal (&pdwAssocAttrIDs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), dwCount))); if (FAILED(hr)) return hr;
  429.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  430.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  431.     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;
  432.     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;
  433.     hr=widlUnmarshal (&ppCLSIDs, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(StructDesc__GUID (ndrtypes), NDR_SIZEOF(CLSID))))); if (FAILED(hr)) return hr;
  434.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  435.     if (FAILED(hr))
  436.         return hr;
  437.     return hrMethod;
  438.     }
  439. HRESULT STDMETHODCALLTYPE IOPCEventServer_TranslateToItemIDs_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  440.     {
  441.     NDRTYPES ndrtypes;
  442.     HRESULT hr;
  443.     HRESULT hrMethod;
  444.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  445.     LPWSTR szSource;
  446.     hr=widlUnmarshal (&szSource, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  447.     DWORD dwEventCategory;
  448.     hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  449.     LPWSTR szConditionName;
  450.     hr=widlUnmarshal (&szConditionName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  451.     LPWSTR szSubconditionName;
  452.     hr=widlUnmarshal (&szSubconditionName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  453.     DWORD dwCount;
  454.     hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  455.     DWORD* pdwAssocAttrIDs;
  456.     hr=widlUnmarshal (&pdwAssocAttrIDs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
  457.     LPWSTR* ppszAttrItemIDs_tmp;
  458.     LPWSTR** ppszAttrItemIDs = &ppszAttrItemIDs_tmp;
  459.     LPWSTR* ppszNodeNames_tmp;
  460.     LPWSTR** ppszNodeNames = &ppszNodeNames_tmp;
  461.     CLSID* ppCLSIDs_tmp;
  462.     CLSID** ppCLSIDs = &ppCLSIDs_tmp;
  463.     hrMethod = pitf->TranslateToItemIDs (szSource, dwEventCategory, szConditionName, szSubconditionName, dwCount, pdwAssocAttrIDs, ppszAttrItemIDs, ppszNodeNames, ppCLSIDs);
  464.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  465.     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;
  466.     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;
  467.     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;
  468.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  469.     if (FAILED(hr))
  470.         return hr;
  471.     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));};
  472.     return S_OK;
  473.     }
  474. HRESULT STDMETHODCALLTYPE IOPCEventServer_GetConditionState_vxproxy (IOPCEventServer* pThis, LPWSTR szSource, LPWSTR szConditionName, DWORD dwNumEventAttrs, DWORD* pdwAttributeIDs, OPCCONDITIONSTATE** ppConditionState)
  475.     {
  476.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 12, pThis);
  477.     NDRTYPES ndrtypes;
  478.     HRESULT hrMethod;
  479.     HRESULT hr;
  480.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  481.     hr=widlMarshal (&szSource, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  482.     hr=widlMarshal (&szConditionName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  483.     hr=widlMarshal (&dwNumEventAttrs, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  484.     hr=widlMarshal (&pdwAttributeIDs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), dwNumEventAttrs))); if (FAILED(hr)) return hr;
  485.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  486.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  487.     hr=widlUnmarshal (&ppConditionState, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCCONDITIONSTATE (ndrtypes)))); if (FAILED(hr)) return hr;
  488.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  489.     if (FAILED(hr))
  490.         return hr;
  491.     return hrMethod;
  492.     }
  493. HRESULT STDMETHODCALLTYPE IOPCEventServer_GetConditionState_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  494.     {
  495.     NDRTYPES ndrtypes;
  496.     HRESULT hr;
  497.     HRESULT hrMethod;
  498.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  499.     LPWSTR szSource;
  500.     hr=widlUnmarshal (&szSource, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  501.     LPWSTR szConditionName;
  502.     hr=widlUnmarshal (&szConditionName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  503.     DWORD dwNumEventAttrs;
  504.     hr=widlUnmarshal (&dwNumEventAttrs, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  505.     DWORD* pdwAttributeIDs;
  506.     hr=widlUnmarshal (&pdwAttributeIDs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
  507.     OPCCONDITIONSTATE* ppConditionState_tmp;
  508.     OPCCONDITIONSTATE** ppConditionState = &ppConditionState_tmp;
  509.     hrMethod = pitf->GetConditionState (szSource, szConditionName, dwNumEventAttrs, pdwAttributeIDs, ppConditionState);
  510.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  511.     hr=widlMarshal (&ppConditionState, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCCONDITIONSTATE (ndrtypes)))); if (FAILED(hr)) return hr;
  512.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  513.     if (FAILED(hr))
  514.         return hr;
  515.     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));};
  516.     return S_OK;
  517.     }
  518. HRESULT STDMETHODCALLTYPE IOPCEventServer_EnableConditionByArea_vxproxy (IOPCEventServer* pThis, DWORD dwNumAreas, LPWSTR* pszAreas)
  519.     {
  520.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 13, pThis);
  521.     NDRTYPES ndrtypes;
  522.     HRESULT hrMethod;
  523.     HRESULT hr;
  524.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  525.     hr=widlMarshal (&dwNumAreas, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  526.     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;
  527.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  528.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  529.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  530.     if (FAILED(hr))
  531.         return hr;
  532.     return hrMethod;
  533.     }
  534. HRESULT STDMETHODCALLTYPE IOPCEventServer_EnableConditionByArea_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  535.     {
  536.     NDRTYPES ndrtypes;
  537.     HRESULT hr;
  538.     HRESULT hrMethod;
  539.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  540.     DWORD dwNumAreas;
  541.     hr=widlUnmarshal (&dwNumAreas, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  542.     LPWSTR* pszAreas;
  543.     hr=widlUnmarshal (&pszAreas, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
  544.     hrMethod = pitf->EnableConditionByArea (dwNumAreas, pszAreas);
  545.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  546.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  547.     if (FAILED(hr))
  548.         return hr;
  549.     return S_OK;
  550.     }
  551. HRESULT STDMETHODCALLTYPE IOPCEventServer_EnableConditionBySource_vxproxy (IOPCEventServer* pThis, DWORD dwNumSources, LPWSTR* pszSources)
  552.     {
  553.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 14, pThis);
  554.     NDRTYPES ndrtypes;
  555.     HRESULT hrMethod;
  556.     HRESULT hr;
  557.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  558.     hr=widlMarshal (&dwNumSources, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  559.     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;
  560.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  561.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  562.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  563.     if (FAILED(hr))
  564.         return hr;
  565.     return hrMethod;
  566.     }
  567. HRESULT STDMETHODCALLTYPE IOPCEventServer_EnableConditionBySource_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  568.     {
  569.     NDRTYPES ndrtypes;
  570.     HRESULT hr;
  571.     HRESULT hrMethod;
  572.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  573.     DWORD dwNumSources;
  574.     hr=widlUnmarshal (&dwNumSources, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  575.     LPWSTR* pszSources;
  576.     hr=widlUnmarshal (&pszSources, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
  577.     hrMethod = pitf->EnableConditionBySource (dwNumSources, pszSources);
  578.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  579.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  580.     if (FAILED(hr))
  581.         return hr;
  582.     return S_OK;
  583.     }
  584. HRESULT STDMETHODCALLTYPE IOPCEventServer_DisableConditionByArea_vxproxy (IOPCEventServer* pThis, DWORD dwNumAreas, LPWSTR* pszAreas)
  585.     {
  586.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 15, pThis);
  587.     NDRTYPES ndrtypes;
  588.     HRESULT hrMethod;
  589.     HRESULT hr;
  590.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  591.     hr=widlMarshal (&dwNumAreas, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  592.     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;
  593.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  594.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  595.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  596.     if (FAILED(hr))
  597.         return hr;
  598.     return hrMethod;
  599.     }
  600. HRESULT STDMETHODCALLTYPE IOPCEventServer_DisableConditionByArea_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  601.     {
  602.     NDRTYPES ndrtypes;
  603.     HRESULT hr;
  604.     HRESULT hrMethod;
  605.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  606.     DWORD dwNumAreas;
  607.     hr=widlUnmarshal (&dwNumAreas, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  608.     LPWSTR* pszAreas;
  609.     hr=widlUnmarshal (&pszAreas, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
  610.     hrMethod = pitf->DisableConditionByArea (dwNumAreas, pszAreas);
  611.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  612.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  613.     if (FAILED(hr))
  614.         return hr;
  615.     return S_OK;
  616.     }
  617. HRESULT STDMETHODCALLTYPE IOPCEventServer_DisableConditionBySource_vxproxy (IOPCEventServer* pThis, DWORD dwNumSources, LPWSTR* pszSources)
  618.     {
  619.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 16, pThis);
  620.     NDRTYPES ndrtypes;
  621.     HRESULT hrMethod;
  622.     HRESULT hr;
  623.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  624.     hr=widlMarshal (&dwNumSources, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  625.     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;
  626.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  627.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  628.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  629.     if (FAILED(hr))
  630.         return hr;
  631.     return hrMethod;
  632.     }
  633. HRESULT STDMETHODCALLTYPE IOPCEventServer_DisableConditionBySource_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  634.     {
  635.     NDRTYPES ndrtypes;
  636.     HRESULT hr;
  637.     HRESULT hrMethod;
  638.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  639.     DWORD dwNumSources;
  640.     hr=widlUnmarshal (&dwNumSources, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  641.     LPWSTR* pszSources;
  642.     hr=widlUnmarshal (&pszSources, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
  643.     hrMethod = pitf->DisableConditionBySource (dwNumSources, pszSources);
  644.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  645.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  646.     if (FAILED(hr))
  647.         return hr;
  648.     return S_OK;
  649.     }
  650. HRESULT STDMETHODCALLTYPE IOPCEventServer_AckCondition_vxproxy (IOPCEventServer* pThis, DWORD dwCount, LPWSTR szAcknowledgerID, LPWSTR szComment, LPWSTR* pszSource, LPWSTR* pszConditionName, FILETIME* pftActiveTime, DWORD* pdwCookie, HRESULT** ppErrors)
  651.     {
  652.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 17, pThis);
  653.     NDRTYPES ndrtypes;
  654.     HRESULT hrMethod;
  655.     HRESULT hr;
  656.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  657.     hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  658.     hr=widlMarshal (&szAcknowledgerID, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  659.     hr=widlMarshal (&szComment, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  660.     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;
  661.     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;
  662.     hr=widlMarshal (&pftActiveTime, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__FILETIME (ndrtypes), NDR_SIZEOF(FILETIME), dwCount))); if (FAILED(hr)) return hr;
  663.     hr=widlMarshal (&pdwCookie, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), dwCount))); if (FAILED(hr)) return hr;
  664.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  665.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  666.     hr=widlUnmarshal (&ppErrors, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.long_t (), NDR_SIZEOF(HRESULT))))); if (FAILED(hr)) return hr;
  667.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  668.     if (FAILED(hr))
  669.         return hr;
  670.     return hrMethod;
  671.     }
  672. HRESULT STDMETHODCALLTYPE IOPCEventServer_AckCondition_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  673.     {
  674.     NDRTYPES ndrtypes;
  675.     HRESULT hr;
  676.     HRESULT hrMethod;
  677.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  678.     DWORD dwCount;
  679.     hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  680.     LPWSTR szAcknowledgerID;
  681.     hr=widlUnmarshal (&szAcknowledgerID, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  682.     LPWSTR szComment;
  683.     hr=widlUnmarshal (&szComment, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  684.     LPWSTR* pszSource;
  685.     hr=widlUnmarshal (&pszSource, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
  686.     LPWSTR* pszConditionName;
  687.     hr=widlUnmarshal (&pszConditionName, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
  688.     FILETIME* pftActiveTime;
  689.     hr=widlUnmarshal (&pftActiveTime, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc__FILETIME (ndrtypes), NDR_SIZEOF(FILETIME)))); if (FAILED(hr)) return hr;
  690.     DWORD* pdwCookie;
  691.     hr=widlUnmarshal (&pdwCookie, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
  692.     HRESULT* ppErrors_tmp;
  693.     HRESULT** ppErrors = &ppErrors_tmp;
  694.     hrMethod = pitf->AckCondition (dwCount, szAcknowledgerID, szComment, pszSource, pszConditionName, pftActiveTime, pdwCookie, ppErrors);
  695.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  696.     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;
  697.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  698.     if (FAILED(hr))
  699.         return hr;
  700.     if ((*ppErrors)) {CoTaskMemFree ((*ppErrors));};
  701.     return S_OK;
  702.     }
  703. HRESULT STDMETHODCALLTYPE IOPCEventServer_CreateAreaBrowser_vxproxy (IOPCEventServer* pThis, REFIID riid, LPUNKNOWN* ppUnk)
  704.     {
  705.     RPC_PROXY_MSG msg (IID_IOPCEventServer, RpcMode::OBJECT, 18, pThis);
  706.     NDRTYPES ndrtypes;
  707.     HRESULT hrMethod;
  708.     HRESULT hr;
  709.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  710.     hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
  711.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  712.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  713.     hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
  714.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  715.     if (FAILED(hr))
  716.         return hr;
  717.     return hrMethod;
  718.     }
  719. HRESULT STDMETHODCALLTYPE IOPCEventServer_CreateAreaBrowser_vxstub (IOPCEventServer* pitf, RPC_STUB_MSG& msg)
  720.     {
  721.     NDRTYPES ndrtypes;
  722.     HRESULT hr;
  723.     HRESULT hrMethod;
  724.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  725.     IID riid;
  726.     hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;
  727.     LPUNKNOWN ppUnk_tmp;
  728.     LPUNKNOWN* ppUnk = &ppUnk_tmp;
  729.     hrMethod = pitf->CreateAreaBrowser (riid, ppUnk);
  730.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  731.     hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;
  732.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  733.     if (FAILED(hr))
  734.         return hr;
  735.     if ((*ppUnk)) {((*ppUnk))->Release ();};
  736.     return S_OK;
  737.     }
  738. COM_VTABLE(IOPCEventServer) IOPCEventServer_vxproxy_vtbl = {
  739.     COM_VTBL_HEADER
  740.     COM_VTBL_METHOD(&IUnknown_QueryInterface_vxproxy),
  741.     COM_VTBL_METHOD(&IUnknown_AddRef_vxproxy),
  742.     COM_VTBL_METHOD(&IUnknown_Release_vxproxy),
  743.     COM_VTBL_METHOD(&IOPCEventServer_GetStatus_vxproxy),
  744.     COM_VTBL_METHOD(&IOPCEventServer_CreateEventSubscription_vxproxy),
  745.     COM_VTBL_METHOD(&IOPCEventServer_QueryAvailableFilters_vxproxy),
  746.     COM_VTBL_METHOD(&IOPCEventServer_QueryEventCategories_vxproxy),
  747.     COM_VTBL_METHOD(&IOPCEventServer_QueryConditionNames_vxproxy),
  748.     COM_VTBL_METHOD(&IOPCEventServer_QuerySubConditionNames_vxproxy),
  749.     COM_VTBL_METHOD(&IOPCEventServer_QuerySourceConditions_vxproxy),
  750.     COM_VTBL_METHOD(&IOPCEventServer_QueryEventAttributes_vxproxy),
  751.     COM_VTBL_METHOD(&IOPCEventServer_TranslateToItemIDs_vxproxy),
  752.     COM_VTBL_METHOD(&IOPCEventServer_GetConditionState_vxproxy),
  753.     COM_VTBL_METHOD(&IOPCEventServer_EnableConditionByArea_vxproxy),
  754.     COM_VTBL_METHOD(&IOPCEventServer_EnableConditionBySource_vxproxy),
  755.     COM_VTBL_METHOD(&IOPCEventServer_DisableConditionByArea_vxproxy),
  756.     COM_VTBL_METHOD(&IOPCEventServer_DisableConditionBySource_vxproxy),
  757.     COM_VTBL_METHOD(&IOPCEventServer_AckCondition_vxproxy),
  758.     COM_VTBL_METHOD(&IOPCEventServer_CreateAreaBrowser_vxproxy),
  759.     };
  760. const PFN_ORPC_STUB stub_functbl_IOPCEventServer [] =
  761.     {
  762.     0,0,0,
  763.     (PFN_ORPC_STUB) IOPCEventServer_GetStatus_vxstub,
  764.     (PFN_ORPC_STUB) IOPCEventServer_CreateEventSubscription_vxstub,
  765.     (PFN_ORPC_STUB) IOPCEventServer_QueryAvailableFilters_vxstub,
  766.     (PFN_ORPC_STUB) IOPCEventServer_QueryEventCategories_vxstub,
  767.     (PFN_ORPC_STUB) IOPCEventServer_QueryConditionNames_vxstub,
  768.     (PFN_ORPC_STUB) IOPCEventServer_QuerySubConditionNames_vxstub,
  769.     (PFN_ORPC_STUB) IOPCEventServer_QuerySourceConditions_vxstub,
  770.     (PFN_ORPC_STUB) IOPCEventServer_QueryEventAttributes_vxstub,
  771.     (PFN_ORPC_STUB) IOPCEventServer_TranslateToItemIDs_vxstub,
  772.     (PFN_ORPC_STUB) IOPCEventServer_GetConditionState_vxstub,
  773.     (PFN_ORPC_STUB) IOPCEventServer_EnableConditionByArea_vxstub,
  774.     (PFN_ORPC_STUB) IOPCEventServer_EnableConditionBySource_vxstub,
  775.     (PFN_ORPC_STUB) IOPCEventServer_DisableConditionByArea_vxstub,
  776.     (PFN_ORPC_STUB) IOPCEventServer_DisableConditionBySource_vxstub,
  777.     (PFN_ORPC_STUB) IOPCEventServer_AckCondition_vxstub,
  778.     (PFN_ORPC_STUB) IOPCEventServer_CreateAreaBrowser_vxstub,
  779.     };
  780. EXTERN_C const VXDCOM_STUB_DISPTBL IOPCEventServer_vxstub_disptbl =
  781.     {
  782.     19,
  783.     stub_functbl_IOPCEventServer
  784.     };
  785. VXDCOM_PS_AUTOREGISTER(IOPCEventServer);
  786. 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)
  787.     {
  788.     RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 3, pThis);
  789.     NDRTYPES ndrtypes;
  790.     HRESULT hrMethod;
  791.     HRESULT hr;
  792.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  793.     hr=widlMarshal (&dwEventType, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  794.     hr=widlMarshal (&dwNumCategories, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  795.     hr=widlMarshal (&pdwEventCategories, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), dwNumCategories))); if (FAILED(hr)) return hr;
  796.     hr=widlMarshal (&dwLowSeverity, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  797.     hr=widlMarshal (&dwHighSeverity, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  798.     hr=widlMarshal (&dwNumAreas, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  799.     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;
  800.     hr=widlMarshal (&dwNumSources, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  801.     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;
  802.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  803.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  804.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  805.     if (FAILED(hr))
  806.         return hr;
  807.     return hrMethod;
  808.     }
  809. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_SetFilter_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
  810.     {
  811.     NDRTYPES ndrtypes;
  812.     HRESULT hr;
  813.     HRESULT hrMethod;
  814.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  815.     DWORD dwEventType;
  816.     hr=widlUnmarshal (&dwEventType, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  817.     DWORD dwNumCategories;
  818.     hr=widlUnmarshal (&dwNumCategories, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  819.     DWORD* pdwEventCategories;
  820.     hr=widlUnmarshal (&pdwEventCategories, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
  821.     DWORD dwLowSeverity;
  822.     hr=widlUnmarshal (&dwLowSeverity, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  823.     DWORD dwHighSeverity;
  824.     hr=widlUnmarshal (&dwHighSeverity, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  825.     DWORD dwNumAreas;
  826.     hr=widlUnmarshal (&dwNumAreas, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  827.     LPWSTR* pszAreaList;
  828.     hr=widlUnmarshal (&pszAreaList, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
  829.     DWORD dwNumSources;
  830.     hr=widlUnmarshal (&dwNumSources, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  831.     LPWSTR* pszSourceList;
  832.     hr=widlUnmarshal (&pszSourceList, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()), NDR_SIZEOF(LPWSTR)))); if (FAILED(hr)) return hr;
  833.     hrMethod = pitf->SetFilter (dwEventType, dwNumCategories, pdwEventCategories, dwLowSeverity, dwHighSeverity, dwNumAreas, pszAreaList, dwNumSources, pszSourceList);
  834.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  835.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  836.     if (FAILED(hr))
  837.         return hr;
  838.     return S_OK;
  839.     }
  840. 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)
  841.     {
  842.     RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 4, pThis);
  843.     NDRTYPES ndrtypes;
  844.     HRESULT hrMethod;
  845.     HRESULT hr;
  846.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  847.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  848.     hr=widlUnmarshal (&pdwEventType, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  849.     hr=widlUnmarshal (&pdwNumCategories, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  850.     hr=widlUnmarshal (&ppdwEventCategories, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))))); if (FAILED(hr)) return hr;
  851.     hr=widlUnmarshal (&pdwLowSeverity, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  852.     hr=widlUnmarshal (&pdwHighSeverity, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  853.     hr=widlUnmarshal (&pdwNumAreas, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  854.     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;
  855.     hr=widlUnmarshal (&pdwNumSources, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  856.     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;
  857.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  858.     if (FAILED(hr))
  859.         return hr;
  860.     return hrMethod;
  861.     }
  862. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetFilter_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
  863.     {
  864.     NDRTYPES ndrtypes;
  865.     HRESULT hr;
  866.     HRESULT hrMethod;
  867.     DWORD pdwEventType_tmp;
  868.     DWORD* pdwEventType = &pdwEventType_tmp;
  869.     DWORD pdwNumCategories_tmp;
  870.     DWORD* pdwNumCategories = &pdwNumCategories_tmp;
  871.     DWORD* ppdwEventCategories_tmp;
  872.     DWORD** ppdwEventCategories = &ppdwEventCategories_tmp;
  873.     DWORD pdwLowSeverity_tmp;
  874.     DWORD* pdwLowSeverity = &pdwLowSeverity_tmp;
  875.     DWORD pdwHighSeverity_tmp;
  876.     DWORD* pdwHighSeverity = &pdwHighSeverity_tmp;
  877.     DWORD pdwNumAreas_tmp;
  878.     DWORD* pdwNumAreas = &pdwNumAreas_tmp;
  879.     LPWSTR* ppszAreaList_tmp;
  880.     LPWSTR** ppszAreaList = &ppszAreaList_tmp;
  881.     DWORD pdwNumSources_tmp;
  882.     DWORD* pdwNumSources = &pdwNumSources_tmp;
  883.     LPWSTR* ppszSourceList_tmp;
  884.     LPWSTR** ppszSourceList = &ppszSourceList_tmp;
  885.     hrMethod = pitf->GetFilter (pdwEventType, pdwNumCategories, ppdwEventCategories, pdwLowSeverity, pdwHighSeverity, pdwNumAreas, ppszAreaList, pdwNumSources, ppszSourceList);
  886.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  887.     hr=widlMarshal (&pdwEventType, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  888.     hr=widlMarshal (&pdwNumCategories, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  889.     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;
  890.     hr=widlMarshal (&pdwLowSeverity, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  891.     hr=widlMarshal (&pdwHighSeverity, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  892.     hr=widlMarshal (&pdwNumAreas, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  893.     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;
  894.     hr=widlMarshal (&pdwNumSources, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  895.     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;
  896.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  897.     if (FAILED(hr))
  898.         return hr;
  899.     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));};
  900.     return S_OK;
  901.     }
  902. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_SelectReturnedAttributes_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD dwEventCategory, DWORD dwCount, DWORD* dwAttributeIDs)
  903.     {
  904.     RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 5, pThis);
  905.     NDRTYPES ndrtypes;
  906.     HRESULT hrMethod;
  907.     HRESULT hr;
  908.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  909.     hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  910.     hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  911.     hr=widlMarshal (&dwAttributeIDs, pms, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD), dwCount))); if (FAILED(hr)) return hr;
  912.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  913.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  914.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  915.     if (FAILED(hr))
  916.         return hr;
  917.     return hrMethod;
  918.     }
  919. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_SelectReturnedAttributes_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
  920.     {
  921.     NDRTYPES ndrtypes;
  922.     HRESULT hr;
  923.     HRESULT hrMethod;
  924.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  925.     DWORD dwEventCategory;
  926.     hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  927.     DWORD dwCount;
  928.     hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  929.     DWORD* dwAttributeIDs;
  930.     hr=widlUnmarshal (&dwAttributeIDs, pus, ndrtypes.refptr_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD)))); if (FAILED(hr)) return hr;
  931.     hrMethod = pitf->SelectReturnedAttributes (dwEventCategory, dwCount, dwAttributeIDs);
  932.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  933.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  934.     if (FAILED(hr))
  935.         return hr;
  936.     return S_OK;
  937.     }
  938. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetReturnedAttributes_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD dwEventCategory, DWORD* pdwCount, DWORD** ppdwAttributeIDs)
  939.     {
  940.     RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 6, pThis);
  941.     NDRTYPES ndrtypes;
  942.     HRESULT hrMethod;
  943.     HRESULT hr;
  944.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  945.     hr=widlMarshal (&dwEventCategory, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  946.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  947.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  948.     hr=widlUnmarshal (&pdwCount, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  949.     hr=widlUnmarshal (&ppdwAttributeIDs, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.carray_t(ndrtypes.ulong_t (), NDR_SIZEOF(DWORD))))); if (FAILED(hr)) return hr;
  950.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  951.     if (FAILED(hr))
  952.         return hr;
  953.     return hrMethod;
  954.     }
  955. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetReturnedAttributes_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
  956.     {
  957.     NDRTYPES ndrtypes;
  958.     HRESULT hr;
  959.     HRESULT hrMethod;
  960.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  961.     DWORD dwEventCategory;
  962.     hr=widlUnmarshal (&dwEventCategory, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  963.     DWORD pdwCount_tmp;
  964.     DWORD* pdwCount = &pdwCount_tmp;
  965.     DWORD* ppdwAttributeIDs_tmp;
  966.     DWORD** ppdwAttributeIDs = &ppdwAttributeIDs_tmp;
  967.     hrMethod = pitf->GetReturnedAttributes (dwEventCategory, pdwCount, ppdwAttributeIDs);
  968.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  969.     hr=widlMarshal (&pdwCount, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  970.     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;
  971.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  972.     if (FAILED(hr))
  973.         return hr;
  974.     if ((*ppdwAttributeIDs)) {CoTaskMemFree ((*ppdwAttributeIDs));};
  975.     return S_OK;
  976.     }
  977. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_Refresh_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD dwConnection)
  978.     {
  979.     RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 7, pThis);
  980.     NDRTYPES ndrtypes;
  981.     HRESULT hrMethod;
  982.     HRESULT hr;
  983.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  984.     hr=widlMarshal (&dwConnection, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  985.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  986.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  987.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  988.     if (FAILED(hr))
  989.         return hr;
  990.     return hrMethod;
  991.     }
  992. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_Refresh_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
  993.     {
  994.     NDRTYPES ndrtypes;
  995.     HRESULT hr;
  996.     HRESULT hrMethod;
  997.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  998.     DWORD dwConnection;
  999.     hr=widlUnmarshal (&dwConnection, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  1000.     hrMethod = pitf->Refresh (dwConnection);
  1001.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1002.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  1003.     if (FAILED(hr))
  1004.         return hr;
  1005.     return S_OK;
  1006.     }
  1007. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_CancelRefresh_vxproxy (IOPCEventSubscriptionMgt* pThis, DWORD dwConnection)
  1008.     {
  1009.     RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 8, pThis);
  1010.     NDRTYPES ndrtypes;
  1011.     HRESULT hrMethod;
  1012.     HRESULT hr;
  1013.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1014.     hr=widlMarshal (&dwConnection, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  1015.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  1016.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1017.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  1018.     if (FAILED(hr))
  1019.         return hr;
  1020.     return hrMethod;
  1021.     }
  1022. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_CancelRefresh_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
  1023.     {
  1024.     NDRTYPES ndrtypes;
  1025.     HRESULT hr;
  1026.     HRESULT hrMethod;
  1027.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1028.     DWORD dwConnection;
  1029.     hr=widlUnmarshal (&dwConnection, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  1030.     hrMethod = pitf->CancelRefresh (dwConnection);
  1031.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1032.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  1033.     if (FAILED(hr))
  1034.         return hr;
  1035.     return S_OK;
  1036.     }
  1037. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetState_vxproxy (IOPCEventSubscriptionMgt* pThis, BOOL* pbActive, DWORD* pdwBufferTime, DWORD* pdwMaxSize, OPCHANDLE* phClientSubscription)
  1038.     {
  1039.     RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 9, pThis);
  1040.     NDRTYPES ndrtypes;
  1041.     HRESULT hrMethod;
  1042.     HRESULT hr;
  1043.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  1044.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1045.     hr=widlUnmarshal (&pbActive, pus, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
  1046.     hr=widlUnmarshal (&pdwBufferTime, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1047.     hr=widlUnmarshal (&pdwMaxSize, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1048.     hr=widlUnmarshal (&phClientSubscription, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1049.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  1050.     if (FAILED(hr))
  1051.         return hr;
  1052.     return hrMethod;
  1053.     }
  1054. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_GetState_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
  1055.     {
  1056.     NDRTYPES ndrtypes;
  1057.     HRESULT hr;
  1058.     HRESULT hrMethod;
  1059.     BOOL pbActive_tmp;
  1060.     BOOL* pbActive = &pbActive_tmp;
  1061.     DWORD pdwBufferTime_tmp;
  1062.     DWORD* pdwBufferTime = &pdwBufferTime_tmp;
  1063.     DWORD pdwMaxSize_tmp;
  1064.     DWORD* pdwMaxSize = &pdwMaxSize_tmp;
  1065.     OPCHANDLE phClientSubscription_tmp;
  1066.     OPCHANDLE* phClientSubscription = &phClientSubscription_tmp;
  1067.     hrMethod = pitf->GetState (pbActive, pdwBufferTime, pdwMaxSize, phClientSubscription);
  1068.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1069.     hr=widlMarshal (&pbActive, pms, ndrtypes.refptr_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
  1070.     hr=widlMarshal (&pdwBufferTime, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1071.     hr=widlMarshal (&pdwMaxSize, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1072.     hr=widlMarshal (&phClientSubscription, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1073.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  1074.     if (FAILED(hr))
  1075.         return hr;
  1076.     return S_OK;
  1077.     }
  1078. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_SetState_vxproxy (IOPCEventSubscriptionMgt* pThis, BOOL* pbActive, DWORD* pdwBufferTime, DWORD* pdwMaxSize, OPCHANDLE hClientSubscription, DWORD* pdwRevisedBufferTime, DWORD* pdwRevisedMaxSize)
  1079.     {
  1080.     RPC_PROXY_MSG msg (IID_IOPCEventSubscriptionMgt, RpcMode::OBJECT, 10, pThis);
  1081.     NDRTYPES ndrtypes;
  1082.     HRESULT hrMethod;
  1083.     HRESULT hr;
  1084.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1085.     hr=widlMarshal (&pbActive, pms, ndrtypes.pointer_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
  1086.     hr=widlMarshal (&pdwBufferTime, pms, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1087.     hr=widlMarshal (&pdwMaxSize, pms, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1088.     hr=widlMarshal (&hClientSubscription, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  1089.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  1090.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1091.     hr=widlUnmarshal (&pdwRevisedBufferTime, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1092.     hr=widlUnmarshal (&pdwRevisedMaxSize, pus, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1093.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  1094.     if (FAILED(hr))
  1095.         return hr;
  1096.     return hrMethod;
  1097.     }
  1098. HRESULT STDMETHODCALLTYPE IOPCEventSubscriptionMgt_SetState_vxstub (IOPCEventSubscriptionMgt* pitf, RPC_STUB_MSG& msg)
  1099.     {
  1100.     NDRTYPES ndrtypes;
  1101.     HRESULT hr;
  1102.     HRESULT hrMethod;
  1103.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1104.     BOOL* pbActive;
  1105.     hr=widlUnmarshal (&pbActive, pus, ndrtypes.pointer_t(ndrtypes.int_t ())); if (FAILED(hr)) return hr;
  1106.     DWORD* pdwBufferTime;
  1107.     hr=widlUnmarshal (&pdwBufferTime, pus, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1108.     DWORD* pdwMaxSize;
  1109.     hr=widlUnmarshal (&pdwMaxSize, pus, ndrtypes.pointer_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1110.     OPCHANDLE hClientSubscription;
  1111.     hr=widlUnmarshal (&hClientSubscription, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  1112.     DWORD pdwRevisedBufferTime_tmp;
  1113.     DWORD* pdwRevisedBufferTime = &pdwRevisedBufferTime_tmp;
  1114.     DWORD pdwRevisedMaxSize_tmp;
  1115.     DWORD* pdwRevisedMaxSize = &pdwRevisedMaxSize_tmp;
  1116.     hrMethod = pitf->SetState (pbActive, pdwBufferTime, pdwMaxSize, hClientSubscription, pdwRevisedBufferTime, pdwRevisedMaxSize);
  1117.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1118.     hr=widlMarshal (&pdwRevisedBufferTime, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1119.     hr=widlMarshal (&pdwRevisedMaxSize, pms, ndrtypes.refptr_t(ndrtypes.ulong_t ())); if (FAILED(hr)) return hr;
  1120.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  1121.     if (FAILED(hr))
  1122.         return hr;
  1123.     return S_OK;
  1124.     }
  1125. COM_VTABLE(IOPCEventSubscriptionMgt) IOPCEventSubscriptionMgt_vxproxy_vtbl = {
  1126.     COM_VTBL_HEADER
  1127.     COM_VTBL_METHOD(&IUnknown_QueryInterface_vxproxy),
  1128.     COM_VTBL_METHOD(&IUnknown_AddRef_vxproxy),
  1129.     COM_VTBL_METHOD(&IUnknown_Release_vxproxy),
  1130.     COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_SetFilter_vxproxy),
  1131.     COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_GetFilter_vxproxy),
  1132.     COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_SelectReturnedAttributes_vxproxy),
  1133.     COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_GetReturnedAttributes_vxproxy),
  1134.     COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_Refresh_vxproxy),
  1135.     COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_CancelRefresh_vxproxy),
  1136.     COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_GetState_vxproxy),
  1137.     COM_VTBL_METHOD(&IOPCEventSubscriptionMgt_SetState_vxproxy),
  1138.     };
  1139. const PFN_ORPC_STUB stub_functbl_IOPCEventSubscriptionMgt [] =
  1140.     {
  1141.     0,0,0,
  1142.     (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_SetFilter_vxstub,
  1143.     (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_GetFilter_vxstub,
  1144.     (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_SelectReturnedAttributes_vxstub,
  1145.     (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_GetReturnedAttributes_vxstub,
  1146.     (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_Refresh_vxstub,
  1147.     (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_CancelRefresh_vxstub,
  1148.     (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_GetState_vxstub,
  1149.     (PFN_ORPC_STUB) IOPCEventSubscriptionMgt_SetState_vxstub,
  1150.     };
  1151. EXTERN_C const VXDCOM_STUB_DISPTBL IOPCEventSubscriptionMgt_vxstub_disptbl =
  1152.     {
  1153.     11,
  1154.     stub_functbl_IOPCEventSubscriptionMgt
  1155.     };
  1156. VXDCOM_PS_AUTOREGISTER(IOPCEventSubscriptionMgt);
  1157. HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_ChangeBrowsePosition_vxproxy (IOPCEventAreaBrowser* pThis, OPCAEBROWSEDIRECTION dwBrowseDirection, LPCWSTR szString)
  1158.     {
  1159.     RPC_PROXY_MSG msg (IID_IOPCEventAreaBrowser, RpcMode::OBJECT, 3, pThis);
  1160.     NDRTYPES ndrtypes;
  1161.     HRESULT hrMethod;
  1162.     HRESULT hr;
  1163.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1164.     hr=widlMarshal (&dwBrowseDirection, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
  1165.     hr=widlMarshal (&szString, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  1166.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  1167.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1168.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  1169.     if (FAILED(hr))
  1170.         return hr;
  1171.     return hrMethod;
  1172.     }
  1173. HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_ChangeBrowsePosition_vxstub (IOPCEventAreaBrowser* pitf, RPC_STUB_MSG& msg)
  1174.     {
  1175.     NDRTYPES ndrtypes;
  1176.     HRESULT hr;
  1177.     HRESULT hrMethod;
  1178.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1179.     OPCAEBROWSEDIRECTION dwBrowseDirection;
  1180.     hr=widlUnmarshal (&dwBrowseDirection, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
  1181.     LPCWSTR szString;
  1182.     hr=widlUnmarshal (&szString, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  1183.     hrMethod = pitf->ChangeBrowsePosition (dwBrowseDirection, szString);
  1184.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1185.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  1186.     if (FAILED(hr))
  1187.         return hr;
  1188.     return S_OK;
  1189.     }
  1190. HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_BrowseOPCAreas_vxproxy (IOPCEventAreaBrowser* pThis, OPCAEBROWSETYPE dwBrowseFilterType, LPCWSTR szFilterCriteria, LPENUMSTRING* ppIEnumString)
  1191.     {
  1192.     RPC_PROXY_MSG msg (IID_IOPCEventAreaBrowser, RpcMode::OBJECT, 4, pThis);
  1193.     NDRTYPES ndrtypes;
  1194.     HRESULT hrMethod;
  1195.     HRESULT hr;
  1196.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1197.     hr=widlMarshal (&dwBrowseFilterType, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
  1198.     hr=widlMarshal (&szFilterCriteria, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  1199.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  1200.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1201.     hr=widlUnmarshal (&ppIEnumString, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IEnumString))); if (FAILED(hr)) return hr;
  1202.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  1203.     if (FAILED(hr))
  1204.         return hr;
  1205.     return hrMethod;
  1206.     }
  1207. HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_BrowseOPCAreas_vxstub (IOPCEventAreaBrowser* pitf, RPC_STUB_MSG& msg)
  1208.     {
  1209.     NDRTYPES ndrtypes;
  1210.     HRESULT hr;
  1211.     HRESULT hrMethod;
  1212.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1213.     OPCAEBROWSETYPE dwBrowseFilterType;
  1214.     hr=widlUnmarshal (&dwBrowseFilterType, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;
  1215.     LPCWSTR szFilterCriteria;
  1216.     hr=widlUnmarshal (&szFilterCriteria, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  1217.     LPENUMSTRING ppIEnumString_tmp;
  1218.     LPENUMSTRING* ppIEnumString = &ppIEnumString_tmp;
  1219.     hrMethod = pitf->BrowseOPCAreas (dwBrowseFilterType, szFilterCriteria, ppIEnumString);
  1220.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1221.     hr=widlMarshal (&ppIEnumString, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IEnumString))); if (FAILED(hr)) return hr;
  1222.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  1223.     if (FAILED(hr))
  1224.         return hr;
  1225.     if ((*ppIEnumString)) {((*ppIEnumString))->Release ();};
  1226.     return S_OK;
  1227.     }
  1228. HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_GetQualifiedAreaName_vxproxy (IOPCEventAreaBrowser* pThis, LPCWSTR szAreaName, LPWSTR* pszQualifiedAreaName)
  1229.     {
  1230.     RPC_PROXY_MSG msg (IID_IOPCEventAreaBrowser, RpcMode::OBJECT, 5, pThis);
  1231.     NDRTYPES ndrtypes;
  1232.     HRESULT hrMethod;
  1233.     HRESULT hr;
  1234.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1235.     hr=widlMarshal (&szAreaName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  1236.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  1237.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1238.     hr=widlUnmarshal (&pszQualifiedAreaName, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
  1239.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  1240.     if (FAILED(hr))
  1241.         return hr;
  1242.     return hrMethod;
  1243.     }
  1244. HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_GetQualifiedAreaName_vxstub (IOPCEventAreaBrowser* pitf, RPC_STUB_MSG& msg)
  1245.     {
  1246.     NDRTYPES ndrtypes;
  1247.     HRESULT hr;
  1248.     HRESULT hrMethod;
  1249.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1250.     LPCWSTR szAreaName;
  1251.     hr=widlUnmarshal (&szAreaName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  1252.     LPWSTR pszQualifiedAreaName_tmp;
  1253.     LPWSTR* pszQualifiedAreaName = &pszQualifiedAreaName_tmp;
  1254.     hrMethod = pitf->GetQualifiedAreaName (szAreaName, pszQualifiedAreaName);
  1255.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1256.     hr=widlMarshal (&pszQualifiedAreaName, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
  1257.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  1258.     if (FAILED(hr))
  1259.         return hr;
  1260.     if ((*pszQualifiedAreaName)) {CoTaskMemFree ((*pszQualifiedAreaName));};
  1261.     return S_OK;
  1262.     }
  1263. HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_GetQualifiedSourceName_vxproxy (IOPCEventAreaBrowser* pThis, LPCWSTR szSourceName, LPWSTR* pszQualifiedSourceName)
  1264.     {
  1265.     RPC_PROXY_MSG msg (IID_IOPCEventAreaBrowser, RpcMode::OBJECT, 6, pThis);
  1266.     NDRTYPES ndrtypes;
  1267.     HRESULT hrMethod;
  1268.     HRESULT hr;
  1269.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1270.     hr=widlMarshal (&szSourceName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  1271.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  1272.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1273.     hr=widlUnmarshal (&pszQualifiedSourceName, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
  1274.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  1275.     if (FAILED(hr))
  1276.         return hr;
  1277.     return hrMethod;
  1278.     }
  1279. HRESULT STDMETHODCALLTYPE IOPCEventAreaBrowser_GetQualifiedSourceName_vxstub (IOPCEventAreaBrowser* pitf, RPC_STUB_MSG& msg)
  1280.     {
  1281.     NDRTYPES ndrtypes;
  1282.     HRESULT hr;
  1283.     HRESULT hrMethod;
  1284.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1285.     LPCWSTR szSourceName;
  1286.     hr=widlUnmarshal (&szSourceName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;
  1287.     LPWSTR pszQualifiedSourceName_tmp;
  1288.     LPWSTR* pszQualifiedSourceName = &pszQualifiedSourceName_tmp;
  1289.     hrMethod = pitf->GetQualifiedSourceName (szSourceName, pszQualifiedSourceName);
  1290.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1291.     hr=widlMarshal (&pszQualifiedSourceName, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;
  1292.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  1293.     if (FAILED(hr))
  1294.         return hr;
  1295.     if ((*pszQualifiedSourceName)) {CoTaskMemFree ((*pszQualifiedSourceName));};
  1296.     return S_OK;
  1297.     }
  1298. COM_VTABLE(IOPCEventAreaBrowser) IOPCEventAreaBrowser_vxproxy_vtbl = {
  1299.     COM_VTBL_HEADER
  1300.     COM_VTBL_METHOD(&IUnknown_QueryInterface_vxproxy),
  1301.     COM_VTBL_METHOD(&IUnknown_AddRef_vxproxy),
  1302.     COM_VTBL_METHOD(&IUnknown_Release_vxproxy),
  1303.     COM_VTBL_METHOD(&IOPCEventAreaBrowser_ChangeBrowsePosition_vxproxy),
  1304.     COM_VTBL_METHOD(&IOPCEventAreaBrowser_BrowseOPCAreas_vxproxy),
  1305.     COM_VTBL_METHOD(&IOPCEventAreaBrowser_GetQualifiedAreaName_vxproxy),
  1306.     COM_VTBL_METHOD(&IOPCEventAreaBrowser_GetQualifiedSourceName_vxproxy),
  1307.     };
  1308. const PFN_ORPC_STUB stub_functbl_IOPCEventAreaBrowser [] =
  1309.     {
  1310.     0,0,0,
  1311.     (PFN_ORPC_STUB) IOPCEventAreaBrowser_ChangeBrowsePosition_vxstub,
  1312.     (PFN_ORPC_STUB) IOPCEventAreaBrowser_BrowseOPCAreas_vxstub,
  1313.     (PFN_ORPC_STUB) IOPCEventAreaBrowser_GetQualifiedAreaName_vxstub,
  1314.     (PFN_ORPC_STUB) IOPCEventAreaBrowser_GetQualifiedSourceName_vxstub,
  1315.     };
  1316. EXTERN_C const VXDCOM_STUB_DISPTBL IOPCEventAreaBrowser_vxstub_disptbl =
  1317.     {
  1318.     7,
  1319.     stub_functbl_IOPCEventAreaBrowser
  1320.     };
  1321. VXDCOM_PS_AUTOREGISTER(IOPCEventAreaBrowser);
  1322. HRESULT STDMETHODCALLTYPE IOPCEventSink_OnEvent_vxproxy (IOPCEventSink* pThis, OPCHANDLE hClientSubscription, BOOL bRefresh, BOOL bLastRefresh, DWORD dwCount, ONEVENTSTRUCT* pEvents)
  1323.     {
  1324.     RPC_PROXY_MSG msg (IID_IOPCEventSink, RpcMode::OBJECT, 3, pThis);
  1325.     NDRTYPES ndrtypes;
  1326.     HRESULT hrMethod;
  1327.     HRESULT hr;
  1328.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1329.     hr=widlMarshal (&hClientSubscription, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  1330.     hr=widlMarshal (&bRefresh, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
  1331.     hr=widlMarshal (&bLastRefresh, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
  1332.     hr=widlMarshal (&dwCount, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  1333.     hr=widlMarshal (&pEvents, pms, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagONEVENTSTRUCT (ndrtypes), NDR_SIZEOF(ONEVENTSTRUCT), dwCount))); if (FAILED(hr)) return hr;
  1334.     hr = msg.SendReceive (); if (FAILED (hr)) return hr;
  1335.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1336.     hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());
  1337.     if (FAILED(hr))
  1338.         return hr;
  1339.     return hrMethod;
  1340.     }
  1341. HRESULT STDMETHODCALLTYPE IOPCEventSink_OnEvent_vxstub (IOPCEventSink* pitf, RPC_STUB_MSG& msg)
  1342.     {
  1343.     NDRTYPES ndrtypes;
  1344.     HRESULT hr;
  1345.     HRESULT hrMethod;
  1346.     NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();
  1347.     OPCHANDLE hClientSubscription;
  1348.     hr=widlUnmarshal (&hClientSubscription, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  1349.     BOOL bRefresh;
  1350.     hr=widlUnmarshal (&bRefresh, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
  1351.     BOOL bLastRefresh;
  1352.     hr=widlUnmarshal (&bLastRefresh, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;
  1353.     DWORD dwCount;
  1354.     hr=widlUnmarshal (&dwCount, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;
  1355.     ONEVENTSTRUCT* pEvents;
  1356.     hr=widlUnmarshal (&pEvents, pus, ndrtypes.refptr_t(ndrtypes.carray_t(StructDesc_tagONEVENTSTRUCT (ndrtypes), NDR_SIZEOF(ONEVENTSTRUCT)))); if (FAILED(hr)) return hr;
  1357.     hrMethod = pitf->OnEvent (hClientSubscription, bRefresh, bLastRefresh, dwCount, pEvents);
  1358.     NdrMarshalStream* pms = msg.marshalStreamGet ();
  1359.     hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());
  1360.     if (FAILED(hr))
  1361.         return hr;
  1362.     return S_OK;
  1363.     }
  1364. COM_VTABLE(IOPCEventSink) IOPCEventSink_vxproxy_vtbl = {
  1365.     COM_VTBL_HEADER
  1366.     COM_VTBL_METHOD(&IUnknown_QueryInterface_vxproxy),
  1367.     COM_VTBL_METHOD(&IUnknown_AddRef_vxproxy),
  1368.     COM_VTBL_METHOD(&IUnknown_Release_vxproxy),
  1369.     COM_VTBL_METHOD(&IOPCEventSink_OnEvent_vxproxy),
  1370.     };
  1371. const PFN_ORPC_STUB stub_functbl_IOPCEventSink [] =
  1372.     {
  1373.     0,0,0,
  1374.     (PFN_ORPC_STUB) IOPCEventSink_OnEvent_vxstub,
  1375.     };
  1376. EXTERN_C const VXDCOM_STUB_DISPTBL IOPCEventSink_vxstub_disptbl =
  1377.     {
  1378.     4,
  1379.     stub_functbl_IOPCEventSink
  1380.     };
  1381. VXDCOM_PS_AUTOREGISTER(IOPCEventSink);