This function determines the number of pending messages in the mailbox and returns this count in the lpNumMsgs parameter.
At a Glance
Header file: | Smtp.h |
Windows CE versions: | 1.0 and later |
Syntax
BOOL TransportCount(HANDLE hService, LPWORD lpNumMsgs);
Parameters
hService
[in] Handle to a SERVICE structure.
lpNumMsgs
[in] Long pointer that receives the number of messages found in the mailbox.
Return Values
TRUE indicates success. FALSE indicates failure. To get extended error information, call TransportError or TransportErrorMsg.
Remarks
The transport service provider must implement the TransportCount function in a DLL registered as a mail service. The Inbox application can then load this DLL and call this function.
For the sample transport service, TransportCount searches the mail directory specified in the szMailDir member of the designated SERVICE structure and determines the number of message files present. It sets the values of the wNumMsgs and wHighNum members of the specified SERVICE structure accordingly. If lpNumMsgs is a valid pointer, it is set to the number of messages found. This value is also saved in the wNumMsgs member of the SERVICE structure.