The TransportView function processes and displays encoded data following the mail header information (that is, the message body) contained in the MsgPtr structure.
BOOL TransportView(HWND hwndParent, MailMsg *MsgPtr);
Header file: | Smtp.h |
Platforms: | H/PC |
Windows CE versions: | 1.0 and later |
Returns TRUE if successful or FALSE otherwise.
The TransportView 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 when the viewer tries to view a message of the supported types.
TransportView is called by the service application if the "Type:" field and value are present in the mail header. If the "Type:" field exists (see the pwcHeaders member of the MailMsg structure), then the value must specify a registry name that identifies the DLL that is to be loaded and used to process the encoded message data. For example, an application such as Inbox searches the registry key HKEY_LOCAL_MACHINE\PMail\MessageTypes. The value name under this key (that is, the value name for the "Type:" field in the message header) identifies the DLL that Inbox will dynamically load. Inbox loads the specified DLL and calls the TransportView function. After this function performs the desired processing on the body of the mail message and returns, Inbox frees the DLL.
If a service is added from Inbox, the DLL name must be registered under the above referenced registry key, and the DLL must contain the TransportView function. However, note that for a custom-written application, the registry path and viewer DLL can be defined as desired.
The following registry entry would register a DLL named Myviewer. So, when a mail message is opened by the user which contains a "Type: MyViewer" header, the transport loads MyViewer.dll and Inbox calls TransportView with the referenced mail message.
'HKEY_LOCAL_MACHINE'
[PMail]
[MessageTypes]
SZ: MyViewerName = MyViewer.dll