TransportInit

This function takes a pointer to a service handle and initializes internal data for the service.

At a Glance

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

Syntax

BOOL TransportInit (HANDLE *NewService, LPWSTR szCommonKey, LPWSTR szTransportKey,);

Parameters

NewService

[in] Service handle that is returned by TransportInit.

szCommonKey

[in] Null-terminates string that contains the top-level registry key—for example, HKEY_LOCAL_MACHINE\PMail.

szTransportKey

[in] Null-terminated string that contains the registry key for this transport—for example, HKEY_LOCAL_MACHINE\PMail\ServiceInfo\SAMPLE.

Return Values

TRUE indicates success. FALSE indicates failure; for example, NewService was not a valid pointer, or the heap allocation of the SERVICE structure failed.

Remarks

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

TransportInit allocates a local heap for a SERVICE structure and initializes several fields. TransportInit can perform initializations using values from the registry. This is the first function called after the service DLL is loaded.

To load and initialize an IMAP4 transport server without connecting, call TransportInit with the connectoid to “(none).” This technique does not work with a POP3 transport.

See Also

TransportRelease