The HrGetFolderMetrics function retrieves folder statistics.
Header file: | STATS.H |
Library: | STATS.LIB |
HRESULT HrGetFolderMetrics(
HFLDMTRC hFolderMetric,
FILETIME * pftNow,
DWORD fMetric,
DWORD * pcMessages,
FILETIME * pftLongestWait,
FILETIME * pftTotalWait
);
See Return Values.
Three statistics are available:
One, two, or all three calculations can be requested in the same call.
The statistics require different amounts of overhead to calculate. Calculating the number of messages in a folder is the least expensive statistic. Calculating the total of the wait durations is the most expensive. To optimize performance, request only the statistics you need.
All parameters in the call are mandatory, even if fewer than three calculations are requested. For example, if you do not request the number of messages calculation, you must still provide a value for pcMessages.
For more information on this function, see Folder Snapshot Functions in the Gateway Programmer's Reference.
CloseFolderMetrics, HrOpenFolderMetrics