MailGetFolderNameEx

This function, an extension of MailGetFolderName, retrieves the name of a folder in the messages store and operates in a multiple-hierarchy folder environment.

At a Glance

Header file: Msgstor2.h
Platforms: H/PC 3.0
Windows CE versions: 2.10 and later

Syntax

BOOL MailGetFolderNameEx (HANDLE hMail, FID* pfId, int* piLen
LPWSTR szName);

Parameters

hMail
[in] Handle to the mail context. This handle is created by the MailOpen function.
pfId
[in] Pointer to the folder identifier. The identifier is set by the MailPutFolderEx function.
piLen
[in/out] Pointer to the length, in characters, of the szName buffer. If the string is longer than (piLen –1), the string is truncated.

After calling the function, the value pointed to by piLen is the actual number of characters needed for the string being passed back to szName plus a terminating null character.

szName
[in] Null-terminated string that contains the name of the mail folder that corresponds to the specified identification number. If set to NULL, piLen returns the length of the folder name, in characters.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error information, call the function MailError or MailErrorMsg.

Remarks

If the folder specified by szName does not exist, pfId returns the identifier of the next folder found. If no folders exist, pfId returns MAIL_FOLDER_NONE.

See Also

MailGetFolderIdEx