CreateTable 

The CreateTable function creates structures and an object handle for an ITableDataOOTYH1 interface that can be used to create table views.

Quick Info

Header file:

MAPIUTIL.H

Implemented by:

MAPI

Called by:

Client applications and service providers

 

SCODE CreateTable(

    LPCIID lpInterface,

 

    ALLOCATEBUFFER FAR * lpAllocateBuffer,

 

    ALLOCATEMORE FAR * lpAllocateMore,

 

    FREEBUFFER FAR * lpFreeBuffer,

 

    LPVOID lpvReserved,

 

    ULONG ulTableType,

 

    ULONG ulPropTagIndexColumn,

 

    LPSPropTagArray lpSPropTagArrayColumns,

 

    LPTABLEDATA FAR * lppTableData

 

   );

 

 

Parameters

lpInterface

[in] Pointer to an interface identifier (IID) for the table data object. Passing NULL in the lpInterface parameter indicates that the table data object returned in the lppTableData parameter is cast to the standard interface for a table data object; the valid interface identifier is IID_IMAPITableData.

lpAllocateBuffer

[in] Pointer to the MAPIAllocateBuffer1MW3BAZ function, to be used to allocate memory.

lpAllocateMore

[in] Pointer to the MAPIAllocateMoreB1SGX_ function, to be used to allocate additional memory where required.

lpFreeBuffer

[in] Pointer to the MAPIFreeBuffer16U06F function, to be used to free memory.

lpvReserved

Reserved; must be zero.

ulTableType

[in] A table type that is available to a client application or service provider as part of the IMAPITable::GetStatus2IBA0JB return data on its table views. Possible values are:

TBLTYPE_DYNAMIC

The table's contents are dynamic and can change as the underlying data changes.

TBLTYPE_KEYSET

The rows within the table are fixed, but the values within these rows are dynamic and can change as the underlying data changes.

TBLTYPE_SNAPSHOT

The table is static and the contents do not change when the underlying data changes.

ulPropTagIndexColumn

[in] Index number of the column for use when changing table data.

lpSPropTagArrayColumns

[in] Pointer to an SPropTagArray.LHV0L structure containing an array of property tags indicating the properties required in the table for which the object holds data.

lppTableData

[out] Pointer to a pointer to the returned table data object.

 

Return Values

S_OK

The call succeeded and has returned the expected value or values.

 

Remarks

The lpAllocateBuffer, lpAllocateMore, and lpFreeBuffer input parameters point to the MAPIAllocateBuffer1MW3BAZ, MAPIAllocateMoreB1SGX_, and MAPIFreeBuffer16U06F functions, respectively. If a client application calls the CreateTable function, it passes in these parameters pointers to the functions named as listed. If a service provider calls CreateTable, it passes the pointers to these functions that it received in its initialization call or retrieved with a call to the IMAPISupport::GetMemAllocRoutinesLH2.5I method.

See Also

IMAPITable : IUnknown3YHK_52