Last modified: July 23, 2011

Applies to: Outlook

Creates structures and an object handle for an ITableData object which can be used to create table contents.

Header file:


Implemented by:


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


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


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


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


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


[in] Reserved; must be zero.


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


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


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


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


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


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


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


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

The lpAllocateBuffer, lpAllocateMore, and lpFreeBuffer input parameters point to the MAPIAllocateBuffer, MAPIAllocateMore, and MAPIFreeBuffer functions, respectively. A client application calling CreateTable passes in pointers to the MAPI functions just named; a service provider passes the pointers to these functions that it received in its initialization call or retrieved with a call to the IMAPISupport::GetMemAllocRoutines method.