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

#include "idlmulti.h"
//

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


interface IIndexDefinition : IUnknown {

#ifdef _WIN64  //Use casting by ULONG in attribute size_is under 64-bit environment.

	[local]
	HRESULT CreateIndex(
		[in, annotation("__in")] 		DBID * pTableID,
		[in, annotation("__in_opt")] 	DBID * pIndexID,
		[in] DBORDINAL cIndexColumnDescs,
		[in, size_is((ULONG)cIndexColumnDescs), annotation("__in_ecount(cIndexColumnDescs)")]
			const DBINDEXCOLUMNDESC rgIndexColumnDescs[],
		[in] ULONG cPropertySets,
		[in, out, size_is(cPropertySets), annotation("__inout_ecount(cPropertySets)")]
			DBPROPSET rgPropertySets[],
		[out, annotation("__deref_opt_out")] DBID ** ppIndexID
	);

#ifndef NO_REMOTE

	[call_as(CreateIndex)]
	HRESULT RemoteCreateIndex(
		[in] DBID * pTableID,
		[in, unique] DBID * pIndexID,
		[in] DBORDINAL cIndexColumnDescs,
		[in, size_is((ULONG)cIndexColumnDescs)] const DBINDEXCOLUMNDESC *rgIndexColumnDescs,
		[in] ULONG cPropertySets,
		[in, unique, size_is(cPropertySets)] DBPROPSET *rgPropertySets,
		[in, out, unique] DBID ** ppIndexID,
		[in] ULONG cTotalProps,
		[out, size_is(cTotalProps)] DBPROPSTATUS *rgPropStatus,
		[out] IErrorInfo ** ppErrorInfoRem
	);

#endif

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

	[local]
	HRESULT CreateIndex(
		[in, annotation("__in")] DBID * pTableID,
		[in, annotation("__in_opt")] DBID * pIndexID,
		[in] DBORDINAL cIndexColumnDescs,
		[in, size_is(cIndexColumnDescs), annotation("__in_ecount(cIndexColumnDescs)")]
			const DBINDEXCOLUMNDESC rgIndexColumnDescs[],
		[in] ULONG cPropertySets,
		[in, out, size_is(cPropertySets), annotation("__inout_ecount(cPropertySets)")]
			DBPROPSET rgPropertySets[],
		[out, annotation("__deref_opt_out_opt")] DBID ** ppIndexID
	);

#ifndef NO_REMOTE

	[call_as(CreateIndex)]
	HRESULT RemoteCreateIndex(
		[in] DBID * pTableID,
		[in, unique] DBID * pIndexID,
		[in] DBORDINAL cIndexColumnDescs,
		[in, size_is(cIndexColumnDescs)] const DBINDEXCOLUMNDESC *rgIndexColumnDescs,
		[in] ULONG cPropertySets,
		[in, unique, size_is(cPropertySets)] DBPROPSET *rgPropertySets,
		[in, out, unique] DBID ** ppIndexID,
		[in] ULONG cTotalProps,
		[out, size_is(cTotalProps)] DBPROPSTATUS *rgPropStatus,
		[out] IErrorInfo ** ppErrorInfoRem
	);

#endif

#endif

	[local]
	HRESULT DropIndex(
		[in, unique, annotation("__in")] 		DBID * pTableID,
		[in, unique, annotation("__in_opt")] 	DBID * pIndexID
	);

	[call_as(DropIndex)]
	HRESULT RemoteDropIndex(
		[in, unique] DBID * pTableID,
		[in, unique] DBID * pIndexID,
		[out] IErrorInfo ** ppErrorInfoRem
	);

}

