HrAddColumnsEx 

The HrAddColumnsEx function adds or moves columns to the beginning of an existing table.

Quick Info

Header file:

MAPIUTIL.H

Implemented by:

MAPI

Called by:

Client applications and service providers

 

HRESULT HrAddColumnsEx(

    LPMAPITABLE lptbl,

 

    LPSPropTagArray lpproptagColumnsNew,

 

    LPALLOCATEBUFFER lpAllocateBuffer,

 

    LPFREEBUFFER lpFreeBuffer,

 

    void (FAR * lpfnFilterColumns) (LPSPropTagArray ptaga)

 

   );

 

 

Parameters

lptbl

[in] Pointer to the MAPI table affected.

lpproptagColumnsNew 

[in] Pointer to an SPropTagArray.LHV0L structure containing the array of property tags for the properties to be added or moved to the beginning of the table.

lpAllocateBuffer

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

lpFreeBuffer

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

lpfnFilterColumns

[in] Pointer to a callback function furnished by the caller. If the lpfnFilterColumns parameter is set to NULL, no callback is made.

ptaga

(Input parameter to the callback function pointed to by lpfnFilterColumns) Pointer to an SPropTagArray.LHV0L structure containing the array of new property tags for the columns moved within or added to the table.

 

Return Values

S_OK

The call succeeded and the specified columns were moved or added.

 

Remarks

The HrAddColumnsEx function allows the caller to furnish a callback function to filter the original property tags. For example, the caller might want to convert strings from property type PT_UNICODE to PT_STRING8. HrAddColumnsEx first adds or moves the specified columns, then calls the callback function if one is furnished, and finally calls IMAPITable::SetColumns3Y7Z_GF. The callback function can change data within the property tag array but cannot add new tags.

The properties passed to HrAddColumnsEx using the lpproptagColumnsNew parameter become the first properties listed on subsequent calls to the IMAPITable::QueryRowsKPHHB method. If any table properties are undefined when QueryRows is called, they are returned with property type PT_NULL and property identifier zero.

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

See Also

IMAPITable::QueryColumns2CQT2TO