TransportError

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

At a Glance

Header file: Smtp.h
Windows CE versions: 1.0 and later

Syntax

int TransportError(HANDLE hService);

Parameters

hService

[in] 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 identifier specified.

TRANS_ERR_NO_MSG_BUF

Could not allocate message buffer.

TRANS_ERR_READ

There was an error reading the message.

Remarks

The transport service provider must implement the TransportError function in a DLL registered as a mail service. The Inbox application can then load this DLL and call this function.

See Also

TransportErrorMsg