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

#include "idlmulti.h"

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

interface IColumnsInfo2 : IColumnsInfo
{
#ifdef _WIN64  //Use casting by ULONG in attribute size_is under 64-bit environment.
[local]
HRESULT GetRestrictedColumnInfo(
	[in] DBORDINAL cColumnIDMasks,
	[in, size_is((ULONG)cColumnIDMasks), annotation("__in_ecount(cColumnIDMasks)")] const DBID rgColumnIDMasks[],
	[in] DWORD dwFlags,
	[in, out, annotation("__out")] DBORDINAL * pcColumns,
	[out, size_is(,(ULONG)*pcColumns), annotation("__deref_out_ecount(*pcColumns)")] 	DBID ** prgColumnIDs,
	[out, size_is(,(ULONG)*pcColumns), annotation("__deref_out_ecount(*pcColumns)")] 	DBCOLUMNINFO ** prgColumnInfo,
	[out, annotation("__deref_opt_out_z")] OLECHAR ** ppStringsBuffer
	);

#ifndef NO_REMOTE
[call_as(GetRestrictedColumnInfo)]
HRESULT RemoteGetRestrictedColumnInfo(
	[in] DBORDINAL cColumnIDMasks,
	[in, unique, size_is((ULONG)cColumnIDMasks)] const DBID * rgColumnIDMasks,
	[in] DWORD dwFlags,
	[in, out] DBORDINAL * pcColumns,
	[in, out, unique, size_is(,(ULONG)*pcColumns)] DBID ** prgColumnIDs,
	[in, out, unique, size_is(,(ULONG)*pcColumns)] DBCOLUMNINFO ** prgColumnInfo,
	[out, size_is(,(ULONG)*pcColumns)] DBBYTEOFFSET ** prgNameOffsets,
	[out, size_is(,(ULONG)*pcColumns)] DBBYTEOFFSET ** prgcolumnidOffsets,
	[in, out] DBLENGTH * pcbStringsBuffer,
	[in, out, unique, size_is(,(ULONG)*pcbStringsBuffer)] OLECHAR ** ppStringsBuffer
	);
#endif

#else  //No casting by ULONG for 32-bit.

[local]
HRESULT GetRestrictedColumnInfo(
	[in] DBORDINAL cColumnIDMasks,
	[in, size_is(cColumnIDMasks), annotation("__in_ecount(cColumnIDMasks)")] const DBID rgColumnIDMasks[],
	[in] DWORD dwFlags,
	[in, out, annotation("__out")] DBORDINAL * pcColumns,
	[out, size_is(,*pcColumns), annotation("__deref_out_ecount(*pcColumns)")] 	DBID ** prgColumnIDs,
	[out, size_is(,*pcColumns) , annotation("__deref_out_ecount(*pcColumns)")]	DBCOLUMNINFO ** prgColumnInfo,
	[out, annotation("__deref_opt_out_z")] OLECHAR ** ppStringsBuffer
	);

#ifndef NO_REMOTE
[call_as(GetRestrictedColumnInfo)]
HRESULT RemoteGetRestrictedColumnInfo(
	[in] DBORDINAL cColumnIDMasks,
	[in, unique, size_is(cColumnIDMasks)] const DBID * rgColumnIDMasks,
	[in] DWORD dwFlags,
	[in, out] DBORDINAL * pcColumns,
	[in, out, unique, size_is(,*pcColumns)] DBID ** prgColumnIDs,
	[in, out, unique, size_is(,*pcColumns)] DBCOLUMNINFO ** prgColumnInfo,
	[out, size_is(,*pcColumns)] DBBYTEOFFSET ** prgNameOffsets,
	[out, size_is(,*pcColumns)] DBBYTEOFFSET ** prgcolumnidOffsets,
	[in, out] DBLENGTH * pcbStringsBuffer,
	[in, out, unique, size_is(,*pcbStringsBuffer)] OLECHAR ** ppStringsBuffer
	);
#endif

#endif
}

