XLATDRIV: Translating Messages

The XLATDRIV sample application enables you to:

Before you run XLATDRIV, you must install the sample gateway as described in Installing the Sample_Gateway.

Source code for IPM_IN and IPM_OUT is in the corresponding directories under \BKOFFICE\SAMPLES\EXCHANGE. Source code for the remaining conversions is in the \BKOFFICE\SAMPLES\EXCHANGE\XLATCONV directory. You can choose a conversion from those described in the following table:

Conversion DLL Description
IPM_IN.DLL Translates a message from RFC 822 format to MAPI format.
IPM_OUT.DLL Translates a message from MAPI format to RFC 822 format.
TNEFDEC.DLL Decodes a TNEF copy of the message as an embedded message.
TNEFENC.DLL Adds an attachment containing an encoding of the entire content of the original message in TNEF format.
TOUPPER.DLL Adds an attachment containing the message text converted to uppercase.
TRIVIAL.DLL Adds an attachment with no changes.

Note Do not run multiple instances of XLATDRIV against the same gateway profile.

To run XLATDRIV, you must have a conversion point of SAMPLEGW.OUTBOUND for outbound conversion DLLs, and a conversion point of SAMPLEGW.INBOUND for inbound conversion DLLs.

    To build XLATDRIV
  1. Change to the directory containing the RPTDRIV source files:

    \BKOFFICE\SAMPLES\EXCHANGE\XLATDRIV directory.

  2. Type NMAKE.
    To run XLATDRIV
  1. From the \BKOFFICE\BIN directory, copy the following into a directory that is on your path:

    IPM_IN.DLL

    IPM_OUT.DLL

    TNEFDEC.DLL

    TNEFENC.DLL

    TOUPPER.DLL

    TRIVIAL.DLL

    Windows NT Server searches the directories listed in the path environment variable when attempting to locate a DLL, and searches directories in the path before it searches the current directory.

  2. Run XLATINST to install the conversion DLLs you need. The parameter values for XLATINST are shown in the following table.
Conversion DLL Values
IPM_IN.DLL Classes : REG_MULTI_SZ : ENVELOPE.IPM REPORT.IPM
Options : REG_SZ
Conversion Point : REG_SZ : SAMPLEGW.INBOUND
IPM_OUT.DLL Classes : REG_MULTI_SZ : ENVELOPE.IPM REPORT.IPM
Options : REG_SZ:
Conversion Point : REG_SZ : SAMPLEGW.OUTBOUND
TNEFDEC.DLL Classes : REG_MULTI_SZ : ENVELOPE.IPM
Options : REG_SZ :
Conversion Point : REG_SZ : SAMPLEGW.INBOUND
TNEFENC.DLL Classes : REG_MULTI_SZ : ENVELOPE.IPM
Options : REG_SZ :
Conversion Point : REG_SZ : SAMPLEGW.OUTBOUND
TOUPPER.DLL Classes : REG_MULTI_SZ : ENVELOPE.IPM
Options : REG_SZ :
Conversion Point : REG_SZ : SAMPLEGW.OUTBOUND
TRIVIAL.DLL Classes : REG_MULTI_SZ : ENVELOPE.IPM
Options : REG_SZ :
Conversion Point : REG_SZ : SAMPLEGW.OUTBOUND

  1. Start the Microsoft Exchange Client. Sign on as a user and compose and send mail messages to one or two recipients on the gateway. These are the messages that XLATDRIV will translate.
  2. To start XLATDRIV, change to the \BKOFFICE\BIN directory. At the command prompt, type XLATDRIV NOTSERV <gateway> where gateway is the name of the gateway's MAPI profile. To see all the options supported by XLATDRIV, type XLATDRIV NOTSERV <gateway> /?".

    XLATDRIV supports the following three options:

    /DIRECTION
    For /DIRECTION = INBOUND, XLATDRIV reads text files that were created with the Outbound conversion from the current directory and translates them into MAPI messages in the gateway's MTS-IN directory.

    For /DIRECTION = OUTBOUND, XLATDRIV reads messages from the gateway's MTS-OUT folder and converts them into XLT*.TMP text files in either the current directory or the directory specified by the /LOCATION option.

    The default for /DIRECTION is OUTBOUND.

    TNEFDEC.DLL only works with the /DIRECTION = INBOUND option. All other conversion DLLs in XLATCONV only work with the /DIRECTION = OUTBOUND option.

    /LOCATION
    Specifies the directory into which to write or read the text files. If it is not provided, the current directory is used.
    /ENCODE
    Enables TNEF encoding and decoding of messages. This option only works on outbound processing. The default is no TNEF encoding and decoding.
  3. Start the Microsoft Exchange Client again. Sign on as gateway. Access the directory where XLATDRIV placed the translated messages. Open the messages and check the translation. The message translation program uses the first conversion it encounters in the Windows NT Registry.
  4. To disable or enable a conversion you have loaded, run the Regedt32 program in the WINNT35\SYSTEM32 directory. In the HKEY_LOCAL_MACHINE\Software\Classes key, in the conversion subkeys:
  5. To use a new conversion, start the Microsoft Exchange Client as a user, send more mail to the gateway, and type:

    XLATDRIV NOTSERV <gateway> /DIRECTION=OUTBOUND

    You can also add more XLT*.TMP files to your current directory and type:

    XLATDRIV NOTSERV <gateway> /DIRECTION=INBOUND

    See Sample Gateway Message Format for the format of the XLT*.TMP text files.

IPM_OUT.DLL writes the first line of a textized message as X-Tnef-Attach:<TNEF data filename, if any>. Therefore, files with TNEF attachments have the first line "X-Tnef-Attach:MAPIMAIL.DAT", and files without TNEF attachments have the first line "X-Tnef-Attach:".

This way, IPM_IN.DLL can easily determine if an input file has TNEF data by examining the first line of the file.