Article ID: 224560 - Last Review: June 29, 2004 - Revision: 2.2

How To Add Message Tracking to the EDK Gateway

This article was previously published under Q224560
Expand all | Collapse all

SUMMARY

The Exchange Development Kit (EDK) sample gateway can be modified to log tracking information for messages processed. There are three functions that are included in the \Mssdk\Include\EDKTrack.lib that can be used to add tracking functionality.

Following are the functions:
  • HrTrackInitLog - This function opens the gateway event tracking module.
  • HrTrackUninitLog - This function closes the gateway event tracking module.
  • HrTrackWriteLog - This function logs a gateway tracking event.

MORE INFORMATION

The Platform SDK and Microsoft Developer Network (MSDN) include a sample console application TRACK that demonstrates how to use these functions to log tracking information to the file \Exchsrvr\Traking.log\Yyyymmdd.log. The sample is a standalone program that does not require a gateway to run. It does not actually track any messages. It does, however, demonstrate how to use these three functions to write tracking information to a file.

When you run the sample TRACK program, you will be required to enter in a valid event type. Valid event types are listed here and defined in the file \Mssdk\Include\RpcPub.h:

Collapse this tableExpand this table
Event typeEvent Description
1001Backbone message going to Microsoft Exchange Server
1002Backbone message going to a foreign system
1003Gateway message going to Microsoft Exchange Server
1004Gateway message going to a foreign system
1005Gateway Report message going to Microsoft Exchange Server
1006Gateway Report message going to a foreign system
1007Report of gateway activity


The following is an example of the log entered for a message sent from an Exchange User, "User1," to two EDK recipients, "EDKUser1" and "EDKUser2." The priority is 3, mts-id = 1111-11111, gateway name is SGW, remote system is "REMOTE", priority = 1, length is 20, cost = 3,subject mts-id = 2222-22222, and number of recipients = 2:
1111-11111 1004 1999.3.30 18:13:0 SGW REMOTE USER1 1 20 3 0 2222-22222 2 EDKUser1 EDKUser2

REFERENCES

Additional information can be found in the Microsoft Developer Network.

APPLIES TO
  • Microsoft Exchange Development Kit 5.5
  • Microsoft Exchange Server 2003 Software Development Kit
Keywords: 
kbfaq kbhowto kbmsg KB224560
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations