SystemMonitor.BatchingLock method

Locks the System Monitor to prevent it from sampling counter data from the newly added counter or log file.

Syntax

SystemMonitor.BatchingLock( _
  ByVal lock As Boolean, _
  ByVal batchReason As SysmonBatchReason _
)

Parameters

lock [in]

Set to True to lock the System Monitor to prevent it from sampling counter data from the newly added counter or log file. Set to False to remove the lock.

batchReason [in]

Identifies the source of the data that you are locking. Use the same reason value when locking and unlocking the resource. For possible values, see the SysmonBatchReason enumeration.

Return value

This method does not return a value.

Remarks

You must call this method twice, once to lock the source (True) and once to unlock the source (False).

You can place only one lock. For example, if you set the lock for SysmonBatchAddFiles and then make a second call using SysmonBatchAddCounters as the reason, the second call removes the lock placed by the first call.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
DLL
Sysmon.ocx

See also

SystemMonitor