MailSetSort

The MailSetSort function sets the order in which mail messages will be retrieved by MailFirst/MailNext calls on the same handle.

Syntax

BOOL MailSetSort (HANDLE hMail, MAILSORTFIELD iSort, BOOL fAscending);

At a Glance

Header file: Msgstore.h
Platforms: H/PC
Versions: 2.0 and later

Parameters

hMail
Handle to the open mail context, as returned by the MailOpen function.
iSort
The field to sort by. See the MAILSORTFIELD.
fAscending
TRUE means the records will be sorted in ascending order on the specified key. FALSE means descending order.

Return Values

This function returns TRUE if the call is successful, or FALSE if there is an error.

Remarks

To get extended error information, call MailError or MailErrorMsg.