Platform SDK: Exchange Server

Performance Monitor DLLs

You must supply a DLL with your gateway that reads performace data from the memory-mapped files created by each gateway instance and places it in the Windows NT Registry so that the Windows NT Performance Monitor can access it. This DLL services the memory-mapped files for all instances of the gateway.

A performance monitor DLL must open the memory mapped files when the Performance Monitor starts, collect performance data each time the Performance Monitor requests a sample, and close the memory-mapped files when the Performance Monitor stops. Performance monitor DLLs use a counter structure for transferring data into the Windows NT Registry.

Performance monitor DLLs must implement the following functions.

Function Purpose
OpenGatewayPerformanceData Opens the memory mapped files, creates a connection to the Windows NT application event log, and passes a copy of the counter structure to the registry.
CollectGatewayPerformanceData Updates the performance data in the registry with data from the memory mapped files. There are multiple memory-mapped files if there are multiple instances of a gateway. In that case, The DLL can merge them into one structure before passing it to the Performance Monitor.
CloseGatewayPerformanceData Closes the memory mapped files, frees memory used by the counter structure, and disconnects from the application event log.

For more information about Performance Monitor DLLs and creating these routines, see the Windows NT Server Device Driver Kit (DDK) and the code for the GWPERF sample performance monitor DLL.