The BuildDisplayTable function creates a display table from the property page data contained in one or more DTPAGE structures.
Header file: | MAPIUTIL.H |
Implemented by: | MAPI |
Called by: | Service providers |
STDAPI BuildDisplayTable(
LPALLOCATEBUFFER lpAllocateBuffer,
LPALLOCATEMORE lpAllocateMore,
LPFREEBUFFER lpFreeBuffer,
LPMALLOC lpMalloc,
HINSTANCE hInstance,
UINT cPages,
LPDTPAGE lpPage,
ULONG ulFlags,
LPMAPITABLE * lppTable,
LPTABLEDATA * lppTblData
);
MAPI uses the functions pointed to by lpAllocateBuffer, lpAllocateMore, and lpFreeBuffer for most memory allocation and deallocation, in particular to allocate memory for use by client applications when calling object interfaces such as IMAPIProp::GetProps and IMAPITable::QueryRows.
Everything possible is read from the dialog resource, including:
BuildDisplayTable overwrites anything passed in the input control structures with information from the dialog resource, which means the caller of BuildDisplayTable cannot dynamically specify page or control titles. Callers who need to do that can choose to have BuildDisplayTable return to them the table data object in lppTableData and change rows in it; but they might find it simpler to build the display table by hand in a table data object instead.
If lppTableData is not set to NULL, the provider is responsible for freeing the table data object when it is finished with the display table.