⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opcda_ps.cpp

📁 VXWORKS源代码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
    hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    return hrMethod;    }HRESULT STDMETHODCALLTYPE IOPCServer_GetErrorString_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)    {    NDRTYPES	ndrtypes;    HRESULT	hr;    HRESULT	hrMethod;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    HRESULT dwError;    hr=widlUnmarshal (&dwError, pus, ndrtypes.long_t ()); if (FAILED(hr)) return hr;    LCID dwLocale;    hr=widlUnmarshal (&dwLocale, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;    LPWSTR ppString_tmp;    LPWSTR* ppString = &ppString_tmp;    hrMethod = pitf->GetErrorString (dwError, dwLocale, ppString);    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&ppString, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(ndrtypes.wstring_t ()))); if (FAILED(hr)) return hr;    hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    if ((*ppString)) {CoTaskMemFree ((*ppString));};    return S_OK;    }HRESULT STDMETHODCALLTYPE IOPCServer_GetGroupByName_vxproxy (IOPCServer* pThis, LPCWSTR szName, REFIID riid, LPUNKNOWN* ppUnk)    {    RPC_PROXY_MSG	msg (IID_IOPCServer, RpcMode::OBJECT, 5, pThis);    NDRTYPES		ndrtypes;    HRESULT		hrMethod;    HRESULT		hr;    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&szName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;    hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;    hr = msg.SendReceive (); if (FAILED (hr)) return hr;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;    hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    return hrMethod;    }HRESULT STDMETHODCALLTYPE IOPCServer_GetGroupByName_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)    {    NDRTYPES	ndrtypes;    HRESULT	hr;    HRESULT	hrMethod;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    LPCWSTR szName;    hr=widlUnmarshal (&szName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;    IID riid;    hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;    LPUNKNOWN ppUnk_tmp;    LPUNKNOWN* ppUnk = &ppUnk_tmp;    hrMethod = pitf->GetGroupByName (szName, riid, ppUnk);    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;    hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    if ((*ppUnk)) {((*ppUnk))->Release ();};    return S_OK;    }HRESULT STDMETHODCALLTYPE IOPCServer_GetStatus_vxproxy (IOPCServer* pThis, OPCSERVERSTATUS** ppServerStatus)    {    RPC_PROXY_MSG	msg (IID_IOPCServer, RpcMode::OBJECT, 6, pThis);    NDRTYPES		ndrtypes;    HRESULT		hrMethod;    HRESULT		hr;    hr = msg.SendReceive (); if (FAILED (hr)) return hr;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    hr=widlUnmarshal (&ppServerStatus, pus, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCSERVERSTATUS (ndrtypes)))); if (FAILED(hr)) return hr;    hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    return hrMethod;    }HRESULT STDMETHODCALLTYPE IOPCServer_GetStatus_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)    {    NDRTYPES	ndrtypes;    HRESULT	hr;    HRESULT	hrMethod;    OPCSERVERSTATUS* ppServerStatus_tmp;    OPCSERVERSTATUS** ppServerStatus = &ppServerStatus_tmp;    hrMethod = pitf->GetStatus (ppServerStatus);    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&ppServerStatus, pms, ndrtypes.refptr_t(ndrtypes.pointer_t(StructDesc_tagOPCSERVERSTATUS (ndrtypes)))); if (FAILED(hr)) return hr;    hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    if ((*ppServerStatus)) {if ((*(*ppServerStatus)).szVendorInfo) {CoTaskMemFree ((*(*ppServerStatus)).szVendorInfo);}CoTaskMemFree ((*ppServerStatus));};    return S_OK;    }HRESULT STDMETHODCALLTYPE IOPCServer_RemoveGroup_vxproxy (IOPCServer* pThis, OPCHANDLE hServerGroup, BOOL bForce)    {    RPC_PROXY_MSG	msg (IID_IOPCServer, RpcMode::OBJECT, 7, pThis);    NDRTYPES		ndrtypes;    HRESULT		hrMethod;    HRESULT		hr;    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&hServerGroup, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;    hr=widlMarshal (&bForce, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;    hr = msg.SendReceive (); if (FAILED (hr)) return hr;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    return hrMethod;    }HRESULT STDMETHODCALLTYPE IOPCServer_RemoveGroup_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)    {    NDRTYPES	ndrtypes;    HRESULT	hr;    HRESULT	hrMethod;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    OPCHANDLE hServerGroup;    hr=widlUnmarshal (&hServerGroup, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;    BOOL bForce;    hr=widlUnmarshal (&bForce, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;    hrMethod = pitf->RemoveGroup (hServerGroup, bForce);    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    return S_OK;    }HRESULT STDMETHODCALLTYPE IOPCServer_CreateGroupEnumerator_vxproxy (IOPCServer* pThis, OPCENUMSCOPE dwScope, REFIID riid, LPUNKNOWN* ppUnk)    {    RPC_PROXY_MSG	msg (IID_IOPCServer, RpcMode::OBJECT, 8, pThis);    NDRTYPES		ndrtypes;    HRESULT		hrMethod;    HRESULT		hr;    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&dwScope, pms, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;    hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;    hr = msg.SendReceive (); if (FAILED (hr)) return hr;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;    hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    return hrMethod;    }HRESULT STDMETHODCALLTYPE IOPCServer_CreateGroupEnumerator_vxstub (IOPCServer* pitf, RPC_STUB_MSG& msg)    {    NDRTYPES	ndrtypes;    HRESULT	hr;    HRESULT	hrMethod;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    OPCENUMSCOPE dwScope;    hr=widlUnmarshal (&dwScope, pus, ndrtypes.enum_t ()); if (FAILED(hr)) return hr;    IID riid;    hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;    LPUNKNOWN ppUnk_tmp;    LPUNKNOWN* ppUnk = &ppUnk_tmp;    hrMethod = pitf->CreateGroupEnumerator (dwScope, riid, ppUnk);    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;    hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    if ((*ppUnk)) {((*ppUnk))->Release ();};    return S_OK;    }COM_VTABLE(IOPCServer) IOPCServer_vxproxy_vtbl = {    COM_VTBL_HEADER    COM_VTBL_METHOD(&IUnknown_QueryInterface_vxproxy),    COM_VTBL_METHOD(&IUnknown_AddRef_vxproxy),    COM_VTBL_METHOD(&IUnknown_Release_vxproxy),    COM_VTBL_METHOD(&IOPCServer_AddGroup_vxproxy),    COM_VTBL_METHOD(&IOPCServer_GetErrorString_vxproxy),    COM_VTBL_METHOD(&IOPCServer_GetGroupByName_vxproxy),    COM_VTBL_METHOD(&IOPCServer_GetStatus_vxproxy),    COM_VTBL_METHOD(&IOPCServer_RemoveGroup_vxproxy),    COM_VTBL_METHOD(&IOPCServer_CreateGroupEnumerator_vxproxy),    };const PFN_ORPC_STUB stub_functbl_IOPCServer [] =    {    0,0,0,    (PFN_ORPC_STUB) IOPCServer_AddGroup_vxstub,    (PFN_ORPC_STUB) IOPCServer_GetErrorString_vxstub,    (PFN_ORPC_STUB) IOPCServer_GetGroupByName_vxstub,    (PFN_ORPC_STUB) IOPCServer_GetStatus_vxstub,    (PFN_ORPC_STUB) IOPCServer_RemoveGroup_vxstub,    (PFN_ORPC_STUB) IOPCServer_CreateGroupEnumerator_vxstub,    };EXTERN_C const VXDCOM_STUB_DISPTBL IOPCServer_vxstub_disptbl =    {    9,    stub_functbl_IOPCServer    };VXDCOM_PS_AUTOREGISTER(IOPCServer);HRESULT STDMETHODCALLTYPE IOPCServerPublicGroups_GetPublicGroupByName_vxproxy (IOPCServerPublicGroups* pThis, LPCWSTR szName, REFIID riid, LPUNKNOWN* ppUnk)    {    RPC_PROXY_MSG	msg (IID_IOPCServerPublicGroups, RpcMode::OBJECT, 3, pThis);    NDRTYPES		ndrtypes;    HRESULT		hrMethod;    HRESULT		hr;    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&szName, pms, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;    hr=widlMarshal (&riid, pms, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;    hr = msg.SendReceive (); if (FAILED (hr)) return hr;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    hr=widlUnmarshal (&ppUnk, pus, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;    hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    return hrMethod;    }HRESULT STDMETHODCALLTYPE IOPCServerPublicGroups_GetPublicGroupByName_vxstub (IOPCServerPublicGroups* pitf, RPC_STUB_MSG& msg)    {    NDRTYPES	ndrtypes;    HRESULT	hr;    HRESULT	hrMethod;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    LPCWSTR szName;    hr=widlUnmarshal (&szName, pus, ndrtypes.refptr_t(ndrtypes.wstring_t ())); if (FAILED(hr)) return hr;    IID riid;    hr=widlUnmarshal (&riid, pus, StructDesc__GUID (ndrtypes)); if (FAILED(hr)) return hr;    LPUNKNOWN ppUnk_tmp;    LPUNKNOWN* ppUnk = &ppUnk_tmp;    hrMethod = pitf->GetPublicGroupByName (szName, riid, ppUnk);    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&ppUnk, pms, ndrtypes.refptr_t(ndrtypes.interfaceptr_t (IID_IUnknown))); if (FAILED(hr)) return hr;    hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    if ((*ppUnk)) {((*ppUnk))->Release ();};    return S_OK;    }HRESULT STDMETHODCALLTYPE IOPCServerPublicGroups_RemovePublicGroup_vxproxy (IOPCServerPublicGroups* pThis, OPCHANDLE hServerGroup, BOOL bForce)    {    RPC_PROXY_MSG	msg (IID_IOPCServerPublicGroups, RpcMode::OBJECT, 4, pThis);    NDRTYPES		ndrtypes;    HRESULT		hrMethod;    HRESULT		hr;    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr=widlMarshal (&hServerGroup, pms, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;    hr=widlMarshal (&bForce, pms, ndrtypes.int_t ()); if (FAILED(hr)) return hr;    hr = msg.SendReceive (); if (FAILED (hr)) return hr;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    hr = widlUnmarshal (&hrMethod, pus, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    return hrMethod;    }HRESULT STDMETHODCALLTYPE IOPCServerPublicGroups_RemovePublicGroup_vxstub (IOPCServerPublicGroups* pitf, RPC_STUB_MSG& msg)    {    NDRTYPES	ndrtypes;    HRESULT	hr;    HRESULT	hrMethod;    NdrUnmarshalStream* pus = msg.unmarshalStreamGet ();    OPCHANDLE hServerGroup;    hr=widlUnmarshal (&hServerGroup, pus, ndrtypes.ulong_t ()); if (FAILED(hr)) return hr;    BOOL bForce;    hr=widlUnmarshal (&bForce, pus, ndrtypes.int_t ()); if (FAILED(hr)) return hr;    hrMethod = pitf->RemovePublicGroup (hServerGroup, bForce);    NdrMarshalStream* pms = msg.marshalStreamGet ();    hr = widlMarshal (&hrMethod, pms, ndrtypes.hresult_t());    if (FAILED(hr))        return hr;    return S_OK;    }COM_VTABLE(IOPCServerPublicGroups) IOPCServerPublicGroups_vxproxy_vtbl = {    COM_VTBL_HEADER    COM_VTBL_METHOD(&IUnknown_QueryInterface_vxproxy),

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -