IMAPITable::QueryColumns

The IMAPITable::QueryColumns method returns a list of columns for the table.

Quick Info

See IMAPITable : IUnknown.

HRESULT QueryColumns(
  ULONG ulFlags,                        
  LPSPropTagArray FAR * lpPropTagArray  
);
 

Parameters

ulFlags
[in] Bitmask of flags that indicates which column set should be returned. The following flag can be set:
TBL_ALL_COLUMNS
The table should return all available columns.
lpPropTagArray
[out] Pointer to an SPropTagArray structure containing the property tags for the column set.

Return Values

S_OK
The column set was successfully returned.
MAPI_E_BUSY
Another operation is in progress that prevents the column set retrieval operation from starting. Either the operation in progress should be allowed to complete or it should be stopped.

Remarks

The IMAPITable::QueryColumns method can be called to retrieve:

Notes to Callers

If you do not set the TBL_ALL_COLUMNS flag, IMAPITable::QueryColumns returns either a table's default or current column set, depending on whether the table has been affected by a call to IMAPITable::SetColumns. SetColumns changes the order and selection of columns in a table's column set.

If you set the TBL_ALL_COLUMNS flag, QueryColumns returns all of the columns that are capable of being in the table's column set.

Free the memory for the property tag array pointed to by the lpPropTagArray parameter by calling the MAPIFreeBuffer function.

See Also

IMAPITable::SetColumns, MAPIFreeBuffer, SPropTagArray