This function processes and displays encoded data following the mail header information (that is, the message body) contained in the MsgPtr structure.
At a Glance
Header file: | Smtp.h |
Windows CE versions: | 1.0 and later |
Syntax
BOOL TransportView(HWND hwndParent, MailMsg *MsgPtr);
Parameters
hService
[in] Handle to a SERVICE structure.
MsgPtr
[in] Pointer to a MailMsg structure that contains pointers to the message content along with other information about the message.
Return Values
TRUE indicates success. FALSE indicates failure.
Remarks
The transport service provider must implement the TransportView function in a DLL registered as a mail service. The Inbox application can then load this DLL and call this function.
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.
Example
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