Platform SDK: Exchange Server

Setting the Server Heuristics Attribute

The Server object in the Microsoft Exchange Server directory has a Heuristics attribute. Bits on this attribute can be set to specify that gateways and connectors are installed or that replication is enabled. The Microsoft Exchange Server Administrator program uses the Heuristics attribute to determine which containers, property pages, and menu options to make available for clients.

Your gateway setup program must set the Gateway bit on the Heuristics attribute so that the Administrator program will display menu options and containers that relate to gateways and custom recipients.

To set the Gateway bit on the Heuristics attribute

  1. Retrieve the current Heuristics attribute on the Server object.
  2. Perform a bitwise OR operation with this attribute and the value 0x02.
  3. Set the result of the bitwise OR operation into the Server object’s Heuristics attribute.

To set the Gateway bit, call the HrSetGatewayBit function.

Note  When removing a gateway, do not clear the Gateway bit from the Heuristics attribute.