📄 opc_ae_ps.cpp
字号:
}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;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -