Platform SDK: Performance Monitoring |
The unlodctr utility removes the registry entries created by lodctr.
The command-line syntax for unlodctr is:
unlodctr Application_Name
The unlodctr utility looks up the First Counter and Last Counter values in the application's Performance key to determine the indexes of the counter objects to remove. Using these indexes, it makes the following changes to the Perflib key.
HKEY_LOCAL_MACHINE
\SOFTWARE
\Microsoft
\Windows NT
\CurrentVersion
\Perflib
Last Counter = updated if changed
Last Help = updated if changed
\009
Counter = application text removed
Help = application text removed
\supported language, other than U.S. English
Counter = application text removed
Help = application text removed
The unlodctr utility also removes the First Counter, First Help, Last Counter, and Last Help values from the application's Performance key.
Note The unloading function of unlodctr, UnloadPerfCounterTextStrings, is declared in Loadperf.h and exported from Loadperf.dll. This allows you to call this function directly from your uninstall program. The syntax for this function is as follows:
LONG UnloadPerfCounterTextStrings(
LPSTR lpCommandLine,
BOOL bQuietModeArg
);
where lpCommandLine is the name of your application and bQuietModeArg is a Boolean parameter that indicates whether to display output during the unloading of the counter text strings. If the function succeeds, the return value is ERROR_SUCCESS. If the function fails, the return value is a nonzero error code defined in Winerror.h.