HrMonInit

The HrMonInit function initializes the collection of performance statistics for a gateway.

Quick Info

Header file: MONITOR.H
Library: MONITOR.LIB

HRESULT HrMonInit(
  DWORD dwFlags,          
  LPSTR lpszObjectClass,  
  LPSTR lpszObjectName,   
  DWORD dwObjectTitleOffset,  
  DWORD dwObjectDetailLevel,  
  LONG dwDefaultCounter,  
  DWORD ccdNumberOfCounters,  
  LPCOUNTERDEF lpcdCounters  
);
 

Parameters

dwFlags
Input parameter. Reserved for future use; must be zero.
lpszObjectClass
Input parameter. Points to a null-terminated string containing the name of the class of the monitored object. If this parameter is NULL, HrMonInit obtains the object class name from the Parameters\Object Class value in the object's Windows NT registry key. If the Parameters\Object Class value is not present in the object's registry key, HrMonInit uses the lpszObjectName parameter as the object class name.
lpszObjectName
Input parameter. A null-terminated string containing the name of the monitored gateway.
dwObjectTitleOffset
Input parameter. The index of the gateway specified by lpszObjectName in the Windows NT Registry database, where the dwObjectTitleOffset value for the first gateway in the registry database is 0 (zero).
dwObjectDetailLevel
Input parameter. The complexity of the object, as defined in the Win32 WINPERF.H header file:
PERF_DETAIL_NOVICE
Information for beginning users.
PERF_DETAIL_ADVANCED
Information for advanced users.
PERF_DETAIL_EXPERT
Information for expert users.
PERF_DETAIL_WIZARD
Information for system designers.
dwDefaultCounter
Input parameter. The index number of the counter structure in the lpcdCounters array, where the dwDefaultCounter value for the first structure is 0 (zero). HrMonInit places the focus and the cursor on this counter when the object is displayed in the Windows NT performance monitor.
ccdNumberofCounters
Input parameter. The number of counters in lpcdCounters.
lpcdCounters
Input parameter. Points to an array of COUNTERDEF structures. Each COUNTERDEF structure holds information about one of the counters defined for this gateway.

Return Values

See Return Values.

Remarks

HrMonInit is typically called at gateway startup.

HrMonInit resets all of the performance counters in the COUNTERDEF structure pointed to by lpcdCounters.

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

See Also

HrMonCollectAssociationStats, HrMonCollectMessageXferStats, HrMonCollectNDRStats, HrMonUninit