Share via


XLATDRIV: Translating Messages

XLATDRIV: Translating Messages

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release. The XLATDRIV sample application enables you to perform the following tasks:

  • Set up a conversion procedure in the gateway to translate messages.
  • Send messages to the gateway.
  • Open a text file to check that the messages you sent were translated correctly.

Before you run the XLATDRIV application, you must install the Sample Gateway. For installation information, see Installing the Exchange 2000 Sample Gateway.

Source code for IPM_IN and IPM_OUT is in the corresponding directories under Program Files\Exchange SDK\SDK\Samples\DBMsg\Exchange\E2K SGW. Source code for the remaining conversions is in the Program Files\Exchange SDK\SDK\Samples\DBMsg\Exchange\E2K SGW\Sample Apps\XlatConv directory. You can choose one or more conversion dynamic-link library (DLL) 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 Transport Neutral Encoding Format (TNEF) copy of the message as an embedded message.
TNEFENC.DLL Adds an attachment that contains an encoding of the entire content of the original message in TNEF.
TOUPPER.DLL Adds an attachment that contains 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.

Note  To run XLATDRIV, you must have a conversion point of SAMPLEGW.OUTBOUND for outbound conversion dynamic-link libraries (DLLs), and a conversion point of SAMPLEGW.INBOUND for inbound conversion DLLs.

To run XLATDRIV

  1. Copy the following DLLs from their \RELEASE or \DEBUG directories into a directory that is in your path: IPM_IN.DLL, IPM_OUT.DLL, TNEFDEC.DLL, TNEFENC.DLL, TOUPPER.DLL, and TRIVIAL.DLL. Microsoft® Windows® server operating systems 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. For more information about XLATINST, see The XLATINST Application.

    The following table lists the parameter values for XLATINST:

    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
  3. Start the Microsoft Exchange client. Sign on as a user and compose and send e-mail messages to one or two recipients on the gateway. These are the messages that XLATDRIV will translate.

  4. To start XLATDRIV, type XLATDRIV NOTSERV*<gateway>* at the command prompt, 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 MTS-IN directory of the gateway. For /DIRECTION = OUTBOUND, XLATDRIV reads messages from the MTS-OUT folder of the gateway and converts them into XLT*.TMP text files in either the current directory or the directory specified by the /LOCATION option. The default value of /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: This option specifies the directory into which to write or read the text files. If a value for /LOCATION is not provided, the current directory is used.

    /ENCODE: This option enables Transport Neutral Encoding Format (TNEF) encoding and decoding of messages. This option only works for outbound processing. The default is no TNEF encoding and decoding.

  5. Start the Exchange client or Microsoft Outlook® 97, Outlook 98, or Outlook 2000 again. Sign on as the 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 DLL it encounters in the Windows server Registry.

  6. To disable or enable a conversion you have loaded, run the Regedt32 program in the %windir%\SYSTEM32 directory. In the HKEY_LOCAL_MACHINE\Software\Classes key, in the conversion subkeys:

    To enable a conversion, in its conversion subkey, for the Point value, type SAMPLEGW.OUTBOUND for outbound conversion DLLs or SAMPLEGW.INBOUND for inbound conversion DLLs.

    To disable a conversion, in its conversion subkey, for its Point value, type zSAMPLEGW.OUTBOUND for outbound conversion DLLs or zSAMPLEGW.INBOUND for inbound conversion DLLs.

  7. To use a new conversion, start the Exchange client as a user, send more e-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.

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

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.