Platform SDK: Exchange Server

Address Entry Template Binary Data

You create an address entry template by creating a binary file that describes the data entry fields in the address entry dialog box. This data file is used by the Microsoft Exchange Server address book provider to create the dialog box that users use to create new addresses of your gateway’s address type. The Microsoft Exchange Server SDK provides the TEMPLATE.EXE utility, which converts a text file describing dialog box controls into the binary file.

The text file input for TEMPLATE.EXE must be written in Unicode. You can use the Windows NT Server Notepad utility to enter the text file and save it in Unicode format. Save the file with a .WTX extension to distinguish it from ANSI .TXT files.

The Unicode text file has nine fields for each dialog box control, separated by commas, as shown in the following table.

Unicode Text File Fields for Address Entry Template

Field Type Description
1 Integer X position of control.
2 Integer X length of control.
3 Integer Y position of control.
4 Integer Y height of control.
5 Integer Type of control. Valid entries are:
DTCT_BUTTON – Creates a command button.
DTCT_CHECKBOX – Creates a check box.
DTCT_EDIT – Creates an edit field for user input.
DTCT_GROUPBOX – Creates a group box.
DTCT_LABEL – Creates a text label.
DTCT_LBX – Creates a list box.
DTCT_MVLISTBOX – Creates a multivalued list box.
DTCT_PAGE – Introduces a new page in the property sheet.
6 Integer Control flags. These are used only for DTCT_EDIT entries.

Valid entries can be a combination of the following:
0x00000001 – Creates a multiline edit control.
0x00000002 – Allows edit control to be edited.
0x00000004 – Requires edit from the user upon OK.
0x00000010 – Displays an asterisk (*) as user types in the edit control, such as for a password.

To combine these flags, bitwise OR them and enter the result in this field.

7 Integer Property tag that controls are mapped to. This value will be used by the address generation code to access field information entered by the user.

Valid entries are:
0x3001001E – PR_DISPLAY_NAME (display name of custom recipient).
0x6800001E – 0xFFFE001E – Custom string properties.

Note that the low-order bits for the custom string property are always 001E, which indicates that the property is a string.

8 Integer For DTCT_EDIT fields, the maximum length of input.
9 Text Label text for control. This can be text or an asterisk. NOTE: If you place a space between the last comma separator and this entry, the edit control will be created as read-only.

For example, the PROFS address type includes the Display Name, the Host Node Identifier, and the Host User Identifier. The following file illustrates a Unicode text file describing a PROFS address template.

0, 0, 0, 0, DTCT_PAGE, 0x00000000, 0x00000000, 0,PROFS Address
12, 50, 20, 8, DTCT_LABEL, 0x00000000, 0x00000000, 0,Display Name:
75, 141, 18, 12, DTCT_EDIT, 0x00000006, 0x3001001E, 256,*
12, 51, 43, 8, DTCT_LABEL, 0x00000000, 0x00000000, 0,Host Node ID:
75, 141, 41, 12, DTCT_EDIT, 0x00000006, 0x6800001E, 32,*
12, 51, 56, 8, DTCT_LABEL, 0x00000000, 0x00000000, 0,Host User ID:
75, 141, 54, 12, DTCT_EDIT, 0x00000006, 0x6801001E, 32,*
 

TEMPLATE.EXE takes the .WTX file as input and produces a binary file that is used as an attribute for the Address-Entry-Template object. Typically the output file has the same name as the input file, but has a .BLT extension. To convert the example PROFSADT.WTX to PROFSADT.BLT, enter the command

TEMPLATE PROFSADT.WTX PROFSADT.BLT