oledb32: Add support for IErrorRecords.
This commit is contained in:
parent
83c14c723c
commit
a32391ab6b
|
@ -1096,3 +1096,186 @@ HRESULT __RPC_STUB ISourcesRowset_GetSourcesRowset_Stub(ISourcesRowset* This, IU
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT CALLBACK IErrorRecords_GetRecordCount_Proxy(IErrorRecords* This, ULONG *records)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
IErrorInfo *error;
|
||||||
|
|
||||||
|
TRACE("(%p)->%p\n", This, records);
|
||||||
|
|
||||||
|
hr = IErrorRecords_RemoteGetRecordCount_Proxy(This, records, &error);
|
||||||
|
if(error)
|
||||||
|
{
|
||||||
|
SetErrorInfo(0, error);
|
||||||
|
IErrorInfo_Release(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT __RPC_STUB IErrorRecords_GetRecordCount_Stub(IErrorRecords* This, ULONG *pcRecords, IErrorInfo **ppErrorInfoRem)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)->%p %p\n", This, pcRecords, ppErrorInfoRem);
|
||||||
|
|
||||||
|
*ppErrorInfoRem = NULL;
|
||||||
|
hr = IErrorRecords_GetRecordCount(This, pcRecords);
|
||||||
|
if(FAILED(hr))
|
||||||
|
GetErrorInfo(0, ppErrorInfoRem);
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CALLBACK IErrorRecords_GetErrorParameters_Proxy(IErrorRecords* This, ULONG ulRecordNum, DISPPARAMS *pdispparams)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
IErrorInfo *error;
|
||||||
|
|
||||||
|
TRACE("(%p)->%d %p\n", This, ulRecordNum, pdispparams);
|
||||||
|
|
||||||
|
hr = IErrorRecords_RemoteGetErrorParameters_Proxy(This, ulRecordNum, pdispparams, &error);
|
||||||
|
if(error)
|
||||||
|
{
|
||||||
|
SetErrorInfo(0, error);
|
||||||
|
IErrorInfo_Release(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT __RPC_STUB IErrorRecords_GetErrorParameters_Stub(IErrorRecords* This, ULONG ulRecordNum, DISPPARAMS *pdispparams,
|
||||||
|
IErrorInfo **ppErrorInfoRem)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)->%d %p %p\n", This, ulRecordNum, pdispparams, ppErrorInfoRem);
|
||||||
|
|
||||||
|
*ppErrorInfoRem = NULL;
|
||||||
|
hr = IErrorRecords_GetErrorParameters(This, ulRecordNum, pdispparams);
|
||||||
|
if(FAILED(hr))
|
||||||
|
GetErrorInfo(0, ppErrorInfoRem);
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CALLBACK IErrorRecords_GetErrorInfo_Proxy(IErrorRecords* This, ULONG ulRecordNum, LCID lcid, IErrorInfo **ppErrorInfo)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
IErrorInfo *error;
|
||||||
|
|
||||||
|
TRACE("(%p)->%d %d %p\n", This, ulRecordNum, lcid, ppErrorInfo);
|
||||||
|
|
||||||
|
hr = IErrorRecords_RemoteGetErrorInfo_Proxy(This, ulRecordNum, lcid, ppErrorInfo, &error);
|
||||||
|
if(error)
|
||||||
|
{
|
||||||
|
SetErrorInfo(0, error);
|
||||||
|
IErrorInfo_Release(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT __RPC_STUB IErrorRecords_GetErrorInfo_Stub(IErrorRecords* This, ULONG ulRecordNum, LCID lcid,
|
||||||
|
IErrorInfo **ppErrorInfo, IErrorInfo **ppErrorInfoRem)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)->%d %d %p %p\n", This, ulRecordNum, lcid, ppErrorInfo, ppErrorInfoRem);
|
||||||
|
|
||||||
|
*ppErrorInfoRem = NULL;
|
||||||
|
hr = IErrorRecords_GetErrorInfo(This, ulRecordNum, lcid, ppErrorInfo);
|
||||||
|
if(FAILED(hr))
|
||||||
|
GetErrorInfo(0, ppErrorInfoRem);
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CALLBACK IErrorRecords_GetCustomErrorObject_Proxy(IErrorRecords* This, ULONG ulRecordNum, REFIID riid,
|
||||||
|
IUnknown **ppObject)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
IErrorInfo *error;
|
||||||
|
|
||||||
|
TRACE("(%p)->%d %s %p\n", This, ulRecordNum, debugstr_guid(riid), ppObject);
|
||||||
|
|
||||||
|
hr = IErrorRecords_RemoteGetCustomErrorObject_Proxy(This, ulRecordNum, riid, ppObject, &error);
|
||||||
|
if(error)
|
||||||
|
{
|
||||||
|
SetErrorInfo(0, error);
|
||||||
|
IErrorInfo_Release(error);
|
||||||
|
}
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT __RPC_STUB IErrorRecords_GetCustomErrorObject_Stub(IErrorRecords* This, ULONG ulRecordNum, REFIID riid,
|
||||||
|
IUnknown **ppObject, IErrorInfo **ppErrorInfoRem)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)->%d %s %p %p\n", This, ulRecordNum, debugstr_guid(riid), ppObject, ppErrorInfoRem);
|
||||||
|
|
||||||
|
*ppErrorInfoRem = NULL;
|
||||||
|
hr = IErrorRecords_GetCustomErrorObject(This, ulRecordNum, riid, ppObject);
|
||||||
|
if(FAILED(hr))
|
||||||
|
GetErrorInfo(0, ppErrorInfoRem);
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CALLBACK IErrorRecords_GetBasicErrorInfo_Proxy(IErrorRecords* This, ULONG ulRecordNum, ERRORINFO *pErrorInfo)
|
||||||
|
{
|
||||||
|
TRACE("(%p)->%d %p\n", This, ulRecordNum, pErrorInfo);
|
||||||
|
|
||||||
|
return IErrorRecords_GetBasicErrorInfo_Proxy(This, ulRecordNum, pErrorInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT __RPC_STUB IErrorRecords_GetBasicErrorInfo_Stub(IErrorRecords* This, ULONG ulRecordNum, ERRORINFO *pErrorInfo,
|
||||||
|
IErrorInfo **ppErrorInfoRem)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)->%d %p %p\n", This, ulRecordNum, pErrorInfo, ppErrorInfoRem);
|
||||||
|
|
||||||
|
*ppErrorInfoRem = NULL;
|
||||||
|
hr = IErrorRecords_GetBasicErrorInfo(This, ulRecordNum, pErrorInfo);
|
||||||
|
if(FAILED(hr))
|
||||||
|
GetErrorInfo(0, ppErrorInfoRem);
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CALLBACK IErrorRecords_AddErrorRecord_Proxy(IErrorRecords* This, ERRORINFO *pErrorInfo, DWORD dwLookupID,
|
||||||
|
DISPPARAMS *pdispparams, IUnknown *punkCustomError, DWORD dwDynamicErrorID)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
IErrorInfo *error;
|
||||||
|
|
||||||
|
TRACE("(%p)->%p %d %p %p %d\n", This, pErrorInfo, dwLookupID, pdispparams, punkCustomError, dwDynamicErrorID);
|
||||||
|
|
||||||
|
hr = IErrorRecords_RemoteAddErrorRecord_Proxy(This, pErrorInfo, dwLookupID, pdispparams, punkCustomError,
|
||||||
|
dwDynamicErrorID, &error);
|
||||||
|
if(error)
|
||||||
|
{
|
||||||
|
SetErrorInfo(0, error);
|
||||||
|
IErrorInfo_Release(error);
|
||||||
|
}
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT __RPC_STUB IErrorRecords_AddErrorRecord_Stub(IErrorRecords* This, ERRORINFO *pErrorInfo, DWORD dwLookupID,
|
||||||
|
DISPPARAMS *pdispparams, IUnknown *punkCustomError, DWORD dwDynamicErrorID, IErrorInfo **ppErrorInfoRem)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)->%p %d %p %p %d %p\n", This, pErrorInfo, dwLookupID, pdispparams, punkCustomError,
|
||||||
|
dwDynamicErrorID, ppErrorInfoRem);
|
||||||
|
|
||||||
|
*ppErrorInfoRem = NULL;
|
||||||
|
hr = IErrorRecords_AddErrorRecord(This, pErrorInfo, dwLookupID, pdispparams, punkCustomError, dwDynamicErrorID);
|
||||||
|
if(FAILED(hr))
|
||||||
|
GetErrorInfo(0, ppErrorInfoRem);
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
|
@ -288,6 +288,7 @@ SRCDIR_INCLUDES = \
|
||||||
dyngraph.idl \
|
dyngraph.idl \
|
||||||
errorrep.h \
|
errorrep.h \
|
||||||
errors.h \
|
errors.h \
|
||||||
|
errrec.idl \
|
||||||
evcode.h \
|
evcode.h \
|
||||||
evntprov.h \
|
evntprov.h \
|
||||||
evntrace.h \
|
evntrace.h \
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2013 Alistair Leslie-Hughes
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(0c733a67-2a1c-11ce-ade5-00aa0044773d),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IErrorRecords : IUnknown
|
||||||
|
{
|
||||||
|
|
||||||
|
cpp_quote("#define IDENTIFIER_SDK_MASK 0xF0000000")
|
||||||
|
cpp_quote("#define IDENTIFIER_SDK_ERROR 0x10000000")
|
||||||
|
|
||||||
|
typedef struct tagERRORINFO
|
||||||
|
{
|
||||||
|
HRESULT hrError;
|
||||||
|
DWORD dwMinor;
|
||||||
|
CLSID clsid;
|
||||||
|
IID iid;
|
||||||
|
DISPID dispid;
|
||||||
|
} ERRORINFO;
|
||||||
|
|
||||||
|
[local]
|
||||||
|
HRESULT AddErrorRecord([in] ERRORINFO * pErrorInfo, [in] DWORD dwLookupID, [in] DISPPARAMS * pdispparams,
|
||||||
|
[in] IUnknown * punkCustomError, [in] DWORD dwDynamicErrorID);
|
||||||
|
|
||||||
|
[call_as(AddErrorRecord)]
|
||||||
|
HRESULT RemoteAddErrorRecord([in] ERRORINFO * pErrorInfo, [in] DWORD dwLookupID, [in] DISPPARAMS * pdispparams,
|
||||||
|
[in] IUnknown * punkCustomError, [in] DWORD dwDynamicErrorID, [out] IErrorInfo ** ppErrorInfoRem);
|
||||||
|
|
||||||
|
[local]
|
||||||
|
HRESULT GetBasicErrorInfo([in] ULONG ulRecordNum, [out] ERRORINFO * pErrorInfo);
|
||||||
|
|
||||||
|
[call_as(GetBasicErrorInfo)]
|
||||||
|
HRESULT RemoteGetBasicErrorInfo([in] ULONG ulRecordNum, [out] ERRORINFO * pErrorInfo, [out] IErrorInfo **ppErrorInfoRem);
|
||||||
|
|
||||||
|
[local]
|
||||||
|
HRESULT GetCustomErrorObject([in] ULONG ulRecordNum, [in] REFIID riid, [out] IUnknown ** ppObject);
|
||||||
|
|
||||||
|
[call_as(GetCustomErrorObject)]
|
||||||
|
HRESULT RemoteGetCustomErrorObject([in] ULONG ulRecordNum, [in] REFIID riid, [out] IUnknown ** ppObject,
|
||||||
|
[out] IErrorInfo **ppErrorInfoRem);
|
||||||
|
|
||||||
|
[local]
|
||||||
|
HRESULT GetErrorInfo([in] ULONG ulRecordNum, [in] LCID lcid, [out] IErrorInfo **ppErrorInfo);
|
||||||
|
|
||||||
|
[call_as(GetErrorInfo)]
|
||||||
|
HRESULT RemoteGetErrorInfo([in] ULONG ulRecordNum, [in] LCID lcid, [out] IErrorInfo **ppErrorInfo,
|
||||||
|
[out] IErrorInfo **ppErrorInfoRem);
|
||||||
|
|
||||||
|
[local]
|
||||||
|
HRESULT GetErrorParameters([in] ULONG ulRecordNum, [out] DISPPARAMS * pdispparams);
|
||||||
|
|
||||||
|
[call_as(GetErrorParameters)]
|
||||||
|
HRESULT RemoteGetErrorParameters([in] ULONG ulRecordNum, [out] DISPPARAMS * pdispparams, [out] IErrorInfo ** ppErrorInfoRem);
|
||||||
|
|
||||||
|
[local]
|
||||||
|
HRESULT GetRecordCount([out] ULONG *records);
|
||||||
|
|
||||||
|
[call_as(GetRecordCount)]
|
||||||
|
HRESULT RemoteGetRecordCount([out] ULONG * pcRecords, [out] IErrorInfo **ppErrorInfoRem);
|
||||||
|
}
|
|
@ -66,6 +66,7 @@ typedef DWORD_PTR DBHASHVALUE;
|
||||||
#include "rowchg.idl"
|
#include "rowchg.idl"
|
||||||
#include "binres.idl"
|
#include "binres.idl"
|
||||||
#include "crtrow.idl"
|
#include "crtrow.idl"
|
||||||
|
#include "errrec.idl"
|
||||||
|
|
||||||
cpp_quote("#include <accctrl.h>")
|
cpp_quote("#include <accctrl.h>")
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,7 @@ my %private_idl_headers = (
|
||||||
"dbs.idl" => 1,
|
"dbs.idl" => 1,
|
||||||
"devenum.idl" => 1,
|
"devenum.idl" => 1,
|
||||||
"dyngraph.idl" => 1,
|
"dyngraph.idl" => 1,
|
||||||
|
"errrec.idl" => 1,
|
||||||
"opnrst.idl" => 1,
|
"opnrst.idl" => 1,
|
||||||
"row.idl" => 1,
|
"row.idl" => 1,
|
||||||
"rowchg.idl" => 1,
|
"rowchg.idl" => 1,
|
||||||
|
|
Loading…
Reference in New Issue