Public Types | |
enum | InstallResult { InstalledNoCounters = 0x00, Installed32bitCounters = 0x01, Installed64bitCounters = 0x10, InstalledAllCounters = 0x11 } |
Public Member Functions | |
bool | CanInstall () override |
Returns true if the calling thread has adequate permissions to install the counters. | |
void | Install (const JetByteTools::Core::_tstring &applicationName, const JetByteTools::Core::_tstring &counterDllPath, bool copyToSystemDirectory, const JetByteTools::Core::_tstring &symbolHeaderFile, const JetByteTools::Core::_tstring &iniFile, const JetByteTools::Core::_tstring &contextStrings, JetByteTools::Milliseconds openTimeout, JetByteTools::Milliseconds collectTimeout, const JetByteTools::Core::_tstring &schemaChecksum, CopyToSystemDirectoryRenameAndRetryHandler retryHandler=nullptr) override |
Installs performance DLL information into the system. The application name is the name of the application under HKLM\SYSTEM\CurrentControlSet\Services\, if the counters are part of a service then this should be the same as the service name. The counterDLLPath is the path to the performance extension dll that implements collection for the counters. If copyToSystemDirectory is true then the performance extension dll is copied to the system directory before being registered, if false then the dll is registered in the path supplied. The symbolHeaderFile is the path to the header file generated by calling CPerformanceDataSchemaFileExporter::ExportHeaderFile() on the schema. The iniFile is the path to the ini file generated by calling CPerformanceDataSchemaFileExporter::ExportIniFile() on the schema. The context strings are a REG_MULTI_SZ string which contains context information for the dll when it is loaded, the openTimeout and collectTimeout values allow you to adjust perfmon's timeouts for the dll; see here for more details of the previous three parameters. The schemaChecksum is typically a value generated by CPerformanceDataSchema::GetChecksum() and can be used to ensure that the counters that are registered match the schema that is compiled into the code. The dll is assumed to export the 'standard' dll entry points of 'PerfData_Open', 'PerfData_Collect' and 'PerfData_Close'. | |
void | Install (const JetByteTools::Core::_tstring &applicationName, const JetByteTools::Core::_tstring &counterDllPath, bool copyToSystemDirectory, const JetByteTools::Core::_tstring &symbolHeaderFile, const JetByteTools::Core::_tstring &iniFile, const JetByteTools::Core::_tstring &openFunctionName, const JetByteTools::Core::_tstring &collectFunctionName, const JetByteTools::Core::_tstring &closeFunctionName, const JetByteTools::Core::_tstring &contextStrings, JetByteTools::Milliseconds openTimeout, JetByteTools::Milliseconds collectTimeout, const JetByteTools::Core::_tstring &schemaChecksum, CopyToSystemDirectoryRenameAndRetryHandler retryHandler=nullptr) override |
Installs performance DLL information into the system. The application name is the name of the application under HKLM\SYSTEM\CurrentControlSet\Services\, if the counters are part of a service then this should be the same as the service name. The counterDLLPath is the path to the performance extension dll that implements collection for the counters. If copyToSystemDirectory is true then the performance extension dll is copied to the system directory before being registered, if false then the dll is registered in the path supplied. The symbolHeaderFile is the path to the header file generated by calling CPerformanceDataSchemaFileExporter::ExportHeaderFile() on the schema. The iniFile is the path to the ini file generated by calling CPerformanceDataSchemaFileExporter::ExportIniFile() on the schema. The openFunctionName, collectFunctionName and closeFunctionName are the names of the dll function entry points used, see here for more details. The context strings are a REG_MULTI_SZ string which contains context information for the dll when it is loaded, the openTimeout and collectTimeout values allow you to adjust perfmon's timeouts for the dll; see here for more details of the previous three parameters. The schemaChecksum is typically a value generated by CPerformanceDataSchema::GetChecksum() and can be used to ensure that the counters that are registered match the schema that is compiled into the code. | |
InstallResult | Install32and64bitDlls (const JetByteTools::Core::_tstring &applicationName, const JetByteTools::Core::_tstring &counterDllPath32, const JetByteTools::Core::_tstring &counterDllPath64, const JetByteTools::Core::_tstring &sideBySideCounterDllName, const JetByteTools::Core::_tstring &symbolHeaderFile, const JetByteTools::Core::_tstring &iniFile, const JetByteTools::Core::_tstring &contextStrings, JetByteTools::Milliseconds openTimeout, JetByteTools::Milliseconds collectTimeout, const JetByteTools::Core::_tstring &schemaChecksum, CopyToSystemDirectoryRenameAndRetryHandler retryHandler=nullptr) override |
Attempts to install 32-bit and a 64-bit counter dlls by copying them into SysWOW64 and System32 respectively, renames the dlls to a common name and then installs the performance DLL information into the system. Note that this will work on 32-bit or 64-bit systems and will do its best to install the counters that are appropriate for the system. On a 64-bit system both sets of counters will be installed and on a 32-bit system only the 32-bit counters will be installed. If one or both of the dlls specified doesn't exist then that dll is not installed, if both dlls do not exist then the installation into the registry is not completed The application name is the name of the application under HKLM\SYSTEM\CurrentControlSet\Services\, if the counters are part of a service then this should be the same as the service name. The counterDllPath32 and counterDllPath64 are the paths to the performance extension dlls that implement collection for the counters. Since both counter dlls must have the same name when registered, sideBySideCounterDllName is the name to use and both counter dlls are copied to the appropriate system directory and renamed to this name before registration. The symbolHeaderFile is the path to the header file generated by calling CPerformanceDataSchemaFileExporter::ExportHeaderFile() on the schema. The iniFile is the path to the ini file generated by calling CPerformanceDataSchemaFileExporter::ExportIniFile() on the schema. The context strings are a REG_MULTI_SZ string which contains context information for the dll when it is loaded, the openTimeout and collectTimeout values allow you to adjust perfmon's timeouts for the dll; see here for more details of the previous three parameters. The schemaChecksum is typically a value generated by CPerformanceDataSchema::GetChecksum() and can be used to ensure that the counters that are registered match the schema that is compiled into the code. The dll is assumed to export the 'standard' dll entry points of 'PerfData_Open', 'PerfData_Collect' and 'PerfData_Close'. | |
InstallResult | Install32and64bitDlls (const JetByteTools::Core::_tstring &applicationName, const JetByteTools::Core::_tstring &counterDllPath32, const JetByteTools::Core::_tstring &counterDllPath64, const JetByteTools::Core::_tstring &sideBySideCounterDllName, const JetByteTools::Core::_tstring &symbolHeaderFile, const JetByteTools::Core::_tstring &iniFile, const JetByteTools::Core::_tstring &openFunctionName, const JetByteTools::Core::_tstring &collectFunctionName, const JetByteTools::Core::_tstring &closeFunctionName, const JetByteTools::Core::_tstring &contextStrings, JetByteTools::Milliseconds openTimeout, JetByteTools::Milliseconds collectTimeout, const JetByteTools::Core::_tstring &schemaChecksum, CopyToSystemDirectoryRenameAndRetryHandler retryHandler=nullptr) override |
Attempts to install 32-bit and a 64-bit counter dlls by copying them into SysWOW64 and System32 respectively, renames the dlls to a common name and then installs the performance DLL information into the system. Note that this will work on 32-bit or 64-bit systems and will do its best to install the counters that are appropriate for the system. On a 64-bit system both sets of counters will be installed and on a 32-bit system only the 32-bit counters will be installed. If one or both of the dlls specified doesn't exist then that dll is not installed, if both dlls do not exist then the installation into the registry is not completed The application name is the name of the application under HKLM\SYSTEM\CurrentControlSet\Services\, if the counters are part of a service then this should be the same as the service name. The counterDllPath32 and counterDllPath64 are the paths to the performance extension dlls that implement collection for the counters. Since both counter dlls must have the same name when registered, sideBySideCounterDllName is the name to use and both counter dlls are copied to the appropriate system directory and renamed to this name before registration. The symbolHeaderFile is the path to the header file generated by calling CPerformanceDataSchemaFileExporter::ExportHeaderFile() on the schema. The iniFile is the path to the ini file generated by calling CPerformanceDataSchemaFileExporter::ExportIniFile() on the schema. The openFunctionName, collectFunctionName and closeFunctionName are the names of the dll function entry points used, see here for more details. The context strings are a REG_MULTI_SZ string which contains context information for the dll when it is loaded, the openTimeout and collectTimeout values allow you to adjust perfmon's timeouts for the dll; see here for more details of the previous three parameters. The schemaChecksum is typically a value generated by CPerformanceDataSchema::GetChecksum() and can be used to ensure that the counters that are registered match the schema that is compiled into the code. | |
DWORD | Uninstall (const JetByteTools::Core::_tstring &applicationName) override |
Removes performance DLL information from the system. The applicationName is the same name that you used in your call to install the counters. | |
void | ForceUninstall (const JetByteTools::Core::_tstring &applicationName) override |
Attempts to remove the performance DLL information from the system. The applicationName is the same name that you used in your call to install the counters. Does not fail if it can't remove the dll's from the system directory, still removes performance information from the registry... | |
bool | CountersAreInstalled (const JetByteTools::Core::_tstring &applicationName) override |
Returns true if counters for the application are installed. | |
void | DumpCounterConfiguration (const JetByteTools::Core::_tstring &applicationName) override |
DWORD | FirstCounterIndex (const JetByteTools::Core::_tstring &applicationName) override |
Returns the first counter index for the application. | |
JetByteTools::Core::_tstring | GetSchemaChecksum (const JetByteTools::Core::_tstring &applicationName) override |
JetByteTools::Core::_tstring | GetInstalledCounterDLLName (const JetByteTools::Core::_tstring &applicationName) override |
enum InstallResult [inherited] |
bool CanInstall | ( | ) | [override, virtual] |
Returns true if the calling thread has adequate permissions to install the counters.
Implements IInstallPerformanceMonitorCounters.
void Install | ( | const JetByteTools::Core::_tstring & | applicationName, | |
const JetByteTools::Core::_tstring & | counterDllPath, | |||
bool | copyToSystemDirectory, | |||
const JetByteTools::Core::_tstring & | symbolHeaderFile, | |||
const JetByteTools::Core::_tstring & | iniFile, | |||
const JetByteTools::Core::_tstring & | contextStrings, | |||
JetByteTools::Milliseconds | openTimeout, | |||
JetByteTools::Milliseconds | collectTimeout, | |||
const JetByteTools::Core::_tstring & | schemaChecksum, | |||
CopyToSystemDirectoryRenameAndRetryHandler | retryHandler = nullptr | |||
) | [override, virtual] |
Installs performance DLL information into the system. The application name is the name of the application under HKLM\SYSTEM\CurrentControlSet\Services\, if the counters are part of a service then this should be the same as the service name. The counterDLLPath is the path to the performance extension dll that implements collection for the counters. If copyToSystemDirectory is true then the performance extension dll is copied to the system directory before being registered, if false then the dll is registered in the path supplied. The symbolHeaderFile is the path to the header file generated by calling CPerformanceDataSchemaFileExporter::ExportHeaderFile() on the schema. The iniFile is the path to the ini file generated by calling CPerformanceDataSchemaFileExporter::ExportIniFile() on the schema. The context strings are a REG_MULTI_SZ string which contains context information for the dll when it is loaded, the openTimeout and collectTimeout values allow you to adjust perfmon's timeouts for the dll; see here for more details of the previous three parameters. The schemaChecksum is typically a value generated by CPerformanceDataSchema::GetChecksum() and can be used to ensure that the counters that are registered match the schema that is compiled into the code. The dll is assumed to export the 'standard' dll entry points of 'PerfData_Open', 'PerfData_Collect' and 'PerfData_Close'.
Implements IInstallPerformanceMonitorCounters.
void Install | ( | const JetByteTools::Core::_tstring & | applicationName, | |
const JetByteTools::Core::_tstring & | counterDllPath, | |||
bool | copyToSystemDirectory, | |||
const JetByteTools::Core::_tstring & | symbolHeaderFile, | |||
const JetByteTools::Core::_tstring & | iniFile, | |||
const JetByteTools::Core::_tstring & | openFunctionName, | |||
const JetByteTools::Core::_tstring & | collectFunctionName, | |||
const JetByteTools::Core::_tstring & | closeFunctionName, | |||
const JetByteTools::Core::_tstring & | contextStrings, | |||
JetByteTools::Milliseconds | openTimeout, | |||
JetByteTools::Milliseconds | collectTimeout, | |||
const JetByteTools::Core::_tstring & | schemaChecksum, | |||
CopyToSystemDirectoryRenameAndRetryHandler | retryHandler = nullptr | |||
) | [override, virtual] |
Installs performance DLL information into the system. The application name is the name of the application under HKLM\SYSTEM\CurrentControlSet\Services\, if the counters are part of a service then this should be the same as the service name. The counterDLLPath is the path to the performance extension dll that implements collection for the counters. If copyToSystemDirectory is true then the performance extension dll is copied to the system directory before being registered, if false then the dll is registered in the path supplied. The symbolHeaderFile is the path to the header file generated by calling CPerformanceDataSchemaFileExporter::ExportHeaderFile() on the schema. The iniFile is the path to the ini file generated by calling CPerformanceDataSchemaFileExporter::ExportIniFile() on the schema. The openFunctionName, collectFunctionName and closeFunctionName are the names of the dll function entry points used, see here for more details. The context strings are a REG_MULTI_SZ string which contains context information for the dll when it is loaded, the openTimeout and collectTimeout values allow you to adjust perfmon's timeouts for the dll; see here for more details of the previous three parameters. The schemaChecksum is typically a value generated by CPerformanceDataSchema::GetChecksum() and can be used to ensure that the counters that are registered match the schema that is compiled into the code.
Implements IInstallPerformanceMonitorCounters.
InstallResult Install32and64bitDlls | ( | const JetByteTools::Core::_tstring & | applicationName, | |
const JetByteTools::Core::_tstring & | counterDllPath32, | |||
const JetByteTools::Core::_tstring & | counterDllPath64, | |||
const JetByteTools::Core::_tstring & | sideBySideCounterDllName, | |||
const JetByteTools::Core::_tstring & | symbolHeaderFile, | |||
const JetByteTools::Core::_tstring & | iniFile, | |||
const JetByteTools::Core::_tstring & | contextStrings, | |||
JetByteTools::Milliseconds | openTimeout, | |||
JetByteTools::Milliseconds | collectTimeout, | |||
const JetByteTools::Core::_tstring & | schemaChecksum, | |||
CopyToSystemDirectoryRenameAndRetryHandler | retryHandler = nullptr | |||
) | [override, virtual] |
Attempts to install 32-bit and a 64-bit counter dlls by copying them into SysWOW64 and System32 respectively, renames the dlls to a common name and then installs the performance DLL information into the system. Note that this will work on 32-bit or 64-bit systems and will do its best to install the counters that are appropriate for the system. On a 64-bit system both sets of counters will be installed and on a 32-bit system only the 32-bit counters will be installed. If one or both of the dlls specified doesn't exist then that dll is not installed, if both dlls do not exist then the installation into the registry is not completed The application name is the name of the application under HKLM\SYSTEM\CurrentControlSet\Services\, if the counters are part of a service then this should be the same as the service name. The counterDllPath32 and counterDllPath64 are the paths to the performance extension dlls that implement collection for the counters. Since both counter dlls must have the same name when registered, sideBySideCounterDllName is the name to use and both counter dlls are copied to the appropriate system directory and renamed to this name before registration. The symbolHeaderFile is the path to the header file generated by calling CPerformanceDataSchemaFileExporter::ExportHeaderFile() on the schema. The iniFile is the path to the ini file generated by calling CPerformanceDataSchemaFileExporter::ExportIniFile() on the schema. The context strings are a REG_MULTI_SZ string which contains context information for the dll when it is loaded, the openTimeout and collectTimeout values allow you to adjust perfmon's timeouts for the dll; see here for more details of the previous three parameters. The schemaChecksum is typically a value generated by CPerformanceDataSchema::GetChecksum() and can be used to ensure that the counters that are registered match the schema that is compiled into the code. The dll is assumed to export the 'standard' dll entry points of 'PerfData_Open', 'PerfData_Collect' and 'PerfData_Close'.
Implements IInstallPerformanceMonitorCounters.
InstallResult Install32and64bitDlls | ( | const JetByteTools::Core::_tstring & | applicationName, | |
const JetByteTools::Core::_tstring & | counterDllPath32, | |||
const JetByteTools::Core::_tstring & | counterDllPath64, | |||
const JetByteTools::Core::_tstring & | sideBySideCounterDllName, | |||
const JetByteTools::Core::_tstring & | symbolHeaderFile, | |||
const JetByteTools::Core::_tstring & | iniFile, | |||
const JetByteTools::Core::_tstring & | openFunctionName, | |||
const JetByteTools::Core::_tstring & | collectFunctionName, | |||
const JetByteTools::Core::_tstring & | closeFunctionName, | |||
const JetByteTools::Core::_tstring & | contextStrings, | |||
JetByteTools::Milliseconds | openTimeout, | |||
JetByteTools::Milliseconds | collectTimeout, | |||
const JetByteTools::Core::_tstring & | schemaChecksum, | |||
CopyToSystemDirectoryRenameAndRetryHandler | retryHandler = nullptr | |||
) | [override, virtual] |
Attempts to install 32-bit and a 64-bit counter dlls by copying them into SysWOW64 and System32 respectively, renames the dlls to a common name and then installs the performance DLL information into the system. Note that this will work on 32-bit or 64-bit systems and will do its best to install the counters that are appropriate for the system. On a 64-bit system both sets of counters will be installed and on a 32-bit system only the 32-bit counters will be installed. If one or both of the dlls specified doesn't exist then that dll is not installed, if both dlls do not exist then the installation into the registry is not completed The application name is the name of the application under HKLM\SYSTEM\CurrentControlSet\Services\, if the counters are part of a service then this should be the same as the service name. The counterDllPath32 and counterDllPath64 are the paths to the performance extension dlls that implement collection for the counters. Since both counter dlls must have the same name when registered, sideBySideCounterDllName is the name to use and both counter dlls are copied to the appropriate system directory and renamed to this name before registration. The symbolHeaderFile is the path to the header file generated by calling CPerformanceDataSchemaFileExporter::ExportHeaderFile() on the schema. The iniFile is the path to the ini file generated by calling CPerformanceDataSchemaFileExporter::ExportIniFile() on the schema. The openFunctionName, collectFunctionName and closeFunctionName are the names of the dll function entry points used, see here for more details. The context strings are a REG_MULTI_SZ string which contains context information for the dll when it is loaded, the openTimeout and collectTimeout values allow you to adjust perfmon's timeouts for the dll; see here for more details of the previous three parameters. The schemaChecksum is typically a value generated by CPerformanceDataSchema::GetChecksum() and can be used to ensure that the counters that are registered match the schema that is compiled into the code.
Implements IInstallPerformanceMonitorCounters.
DWORD Uninstall | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [override, virtual] |
Removes performance DLL information from the system. The applicationName is the same name that you used in your call to install the counters.
Implements IInstallPerformanceMonitorCounters.
void ForceUninstall | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [override, virtual] |
Attempts to remove the performance DLL information from the system. The applicationName is the same name that you used in your call to install the counters. Does not fail if it can't remove the dll's from the system directory, still removes performance information from the registry...
Implements IInstallPerformanceMonitorCounters.
bool CountersAreInstalled | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [override, virtual] |
Returns true if counters for the application are installed.
Implements IInstallPerformanceMonitorCounters.
void DumpCounterConfiguration | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [override, virtual] |
Implements IInstallPerformanceMonitorCounters.
DWORD FirstCounterIndex | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [override, virtual] |
JetByteTools::Core::_tstring GetSchemaChecksum | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [override, virtual] |
Implements IInstallPerformanceMonitorCounters.
JetByteTools::Core::_tstring GetInstalledCounterDLLName | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [override, virtual] |
Implements IInstallPerformanceMonitorCounters.