TransportInit

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

Syntax

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

At a Glance

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

Parameters

NewService
Service handle that is returned by TransportInit.
szCommonKey
Top-level registry key — for example, HKEY_LOCAL_MACHINE\PMail\ServiceLibs.
szTransportKey
Registry key for this transport — for example, HKEY_LOCAL_MACHINE\PMail\ServiceLibs\SAMPLE.

Return Values

FALSE
The initialization failed. For example, NewService was not a valid pointer, or the heap allocation of the SERVICE structure failed.
TRUE
Success.

Remarks

The TransportInit 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 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.

See Also

TransportRelease