PerfDeleteInstance function (perflib.h)
Deletes an instance of the counter set created by the PerfCreateInstance function. Providers use this function.
ULONG PerfDeleteInstance( HANDLE Provider, PPERF_COUNTERSET_INSTANCE InstanceBlock );
Windows Vista: The PerfStartProvider function returns the handle.
A PERF_COUNTERSET_INSTANCE structure that contains the instance of the counter set to delete.
If the function succeeds, it returns ERROR_SUCCESS.
If the function fails, the return value is a system error code.
If the provider process terminates abnormally, all allocated instances will be released.
The provider determines when it deletes an instance. If the counter data is more static, the provider can delete an instance at cleanup time. For example, the number of processors on a computer would be considered static, so a provider that provides counter data for processors could delete an instance for each processor on the computer at cleanup time. For counters that are more dynamic, such as disk or process counters, the providers would delete the instances in response to a USB device being removed or a process being terminated.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|