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

#include "idlmulti.h"
//

#if( OLEDBVER >= 0x0200 )    
    REMOTED_INTERFACE(0c733aab-2a1c-11ce-ade5-00aa0044773d)
#else
    LOCAL_INTERFACE(0c733aab-2a1c-11ce-ade5-00aa0044773d)
#endif


interface ITableDefinitionWithConstraints : ITableCreation
	{
		HRESULT AddConstraint
			(
			[in]	DBID *					pTableID,
			[in]	DBCONSTRAINTDESC *		pConstraintDesc
			);

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

		HRESULT CreateTableWithConstraints
			(
			[in] IUnknown * pUnkOuter,
			[in] DBID *	pTableID,
			[in] DBORDINAL cColumnDescs,
			[in, size_is((ULONG)cColumnDescs), out] DBCOLUMNDESC rgColumnDescs[],
			[in] ULONG cConstraintDescs,
			[in, size_is(cConstraintDescs)] DBCONSTRAINTDESC rgConstraintDescs[],
			[in] REFIID riid,
			[in] ULONG cPropertySets,
			[in, size_is(cPropertySets), out] DBPROPSET rgPropertySets[],
			[out] DBID ** ppTableID,
			[out] IUnknown ** ppRowset
			);

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

		HRESULT CreateTableWithConstraints
			(
			[in] IUnknown * pUnkOuter,
			[in] DBID *	pTableID,
			[in] DBORDINAL cColumnDescs,
			[in, size_is(cColumnDescs), out] DBCOLUMNDESC rgColumnDescs[],
			[in] ULONG cConstraintDescs,
			[in, size_is(cConstraintDescs)] DBCONSTRAINTDESC rgConstraintDescs[],
			[in] REFIID riid,
			[in] ULONG cPropertySets,
			[in, size_is(cPropertySets), out] DBPROPSET rgPropertySets[],
			[out] DBID ** ppTableID,
			[out] IUnknown ** ppRowset
			);

#endif

		HRESULT DropConstraint
			(
			[in] DBID * pTableID,
			[in] DBID * pConstraintID
			);
	}

