HrMonCollectAssociationStats

The HrMonCollectAssociationStats function updates the statistic on the current number of gateway connections to the foreign system.

Quick Info

Header file: MONITOR.H
Library: MONITOR.LIB

HRESULT HrMonCollectAssociationStats(
  BOOL fSetNewTotal,  
  LONG cAssociations  
);
 

Parameters

fSetNewTotal
Input parameter. Whether the total number of connections or disconnections is reset to cAssociations:
TRUE
The current number of connections or disconnections is reset to cAssociations.
FALSE
The current number of connections or disconnections is summed with cAssociations.
cAssociations
Input parameter. The number of connections or disconnections. Connections are indicated with a positive number; disconnections are indicated with a negative number.

Note The number of current connections can never be less than zero. If you attempt to set the cAssociations parameter to a value that makes the current number of connections is less than zero, HrMonCollectAssociationStats fails, returning E_INVALIDARG.

Return Values

See Return Values.

Remarks

HrMonCollectAssociationStats is typically called each time a new connection is made or an existing connection is broken.

For more information on this function, see Monitor Sampling Functions and the HrMonCollectAssociationStats function in MONITOR.C under the MONITOR code sample in Code Samples folder.

See Also

HrMonCollectMessageXferStats, HrMonCollectNDRStats, HrMonInit, HrMonUninit