TransportError

The TransportError function returns a transport defined error code for the last mail error that occurred.

Syntax

int TransportError(HANDLE hService);

At a Glance

Header file: Smtp.h
Platforms: H/PC
Windows CE versions: 1.0 and later

Parameters

hService
Handle to a SERVICE structure.

Return Values

The sample TransportError routine returns an integer error number for the last error that occurred. If no error has occurred, TransportError must return TRANS_ERR_NONE (with associated error string "No error", returned by TransportErrorMsg). Note that this is required for every transport service's implementation of TransportError.

Other custom error values can be defined by the transport service. For example, the sample transport service defines the following values:

TRANS_ERR_NO_SVC_DIR
"Service directory unavailable."
TRANS_ERR_HANDLE_NOT_ALLOC
"Could not allocate memory for service handle."
TRANS_ERR_CANT_OPEN
"Could not create message file."
TRANS_ERR_CANT_SEND
"Could not open mail message."
TRANS_ERR_INV_MSG_ID
"Invalid message ID specified."
TRANS_ERR_NO_MSG_BUF
"Could not allocate message buffer."
TRANS_ERR_READ
"There was an error reading the message."

Remarks

The TransportError function must be implemented by the transport service provider in a registered DLL. The Inbox application can load this DLL and call this function.

See Also

TransportErrorMsg