The TransportCount function determines the number of pending messages in the mailbox and returns this count in the lpNumMsgs parameter.
BOOL TransportCount(HANDLE hService, LPWORD lpNumMsgs);
Header file: | Smtp.h |
Platforms: | H/PC |
Windows CE versions: | 1.0 and later |
Returns TRUE if successful or FALSE otherwise. To get extended error information, call TransportError or TransportErrorMsg.
The TransportCount function must be implemented by the transport service provider in a DLL registered as a mail service. The Inbox application can load this DLL and call TransportCount.
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.