//-----------------------------------------------------------------------------
// File:			errrec.idl
//
// Copyright:		Copyright (c) Microsoft Corporation          
//
// Contents: 		OLE DB interface definition
//
// Comments: 		
//
//-----------------------------------------------------------------------------

#include "idlmulti.h"
//

    REMOTED_INTERFACE(0c733a67-2a1c-11ce-ade5-00aa0044773d)


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, annotation("__in")] ERRORINFO * pErrorInfo,
		[in] DWORD dwLookupID,
		[in, annotation("__in_opt")] DISPPARAMS * pdispparams,
		[in, annotation("__in_opt")] 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, annotation("__out")] ERRORINFO * pErrorInfo
	);

	[call_as(GetBasicErrorInfo)]
	HRESULT RemoteGetBasicErrorInfo(
		[in] ULONG ulRecordNum,
		[out] ERRORINFO * pErrorInfo,
		[out] IErrorInfo ** ppErrorInfoRem
	);

	[local]
	HRESULT GetCustomErrorObject(
		[in] ULONG ulRecordNum,
		[in, annotation("__in")] REFIID riid,
		[out, iid_is(riid), annotation("__deref_out_opt")] IUnknown ** ppObject
	);

	[call_as(GetCustomErrorObject)]
	HRESULT RemoteGetCustomErrorObject(
		[in] ULONG ulRecordNum,
		[in] REFIID riid,
		[out, iid_is(riid)] IUnknown ** ppObject,
		[out] IErrorInfo ** ppErrorInfoRem
	);

	[local]
	HRESULT GetErrorInfo(
		[in] ULONG ulRecordNum,
		[in] LCID lcid,
		[out, annotation("__deref_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, annotation("__out")] DISPPARAMS * pdispparams
	);

	[call_as(GetErrorParameters)]
	HRESULT RemoteGetErrorParameters(
		[in] ULONG ulRecordNum,
		[out] DISPPARAMS * pdispparams,
		[out] IErrorInfo ** ppErrorInfoRem
	);

	[local]
	HRESULT GetRecordCount(
		[out, annotation("__out")] ULONG * pcRecords
	);

	[call_as(GetRecordCount)]
	HRESULT RemoteGetRecordCount(
		[out] ULONG * pcRecords,
		[out] IErrorInfo ** ppErrorInfoRem
	);

}

