Public Types | |
enum | InstallResult { InstalledNoCounters = 0x00, Installed32bitCounters = 0x01, Installed64bitCounters = 0x10, InstalledAllCounters = 0x11 } |
Public Member Functions | |
virtual bool | CanInstall ()=0 |
Returns true if the calling thread has adequate permissions to install the counters. | |
virtual 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)=0 |
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'. | |
virtual 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)=0 |
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. | |
virtual 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)=0 |
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'. | |
virtual 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)=0 |
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. | |
virtual DWORD | Uninstall (const JetByteTools::Core::_tstring &applicationName)=0 |
Removes performance DLL information from the system. The applicationName is the same name that you used in your call to install the counters. | |
virtual void | ForceUninstall (const JetByteTools::Core::_tstring &applicationName)=0 |
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... | |
virtual bool | CountersAreInstalled (const JetByteTools::Core::_tstring &applicationName)=0 |
Returns true if counters for the application are installed. | |
virtual void | DumpCounterConfiguration (const JetByteTools::Core::_tstring &applicationName)=0 |
virtual DWORD | FirstCounterIndex (const JetByteTools::Core::_tstring &applicationName)=0 |
Returns the first counter index for the application. | |
virtual JetByteTools::Core::_tstring | GetSchemaChecksum (const JetByteTools::Core::_tstring &applicationName)=0 |
virtual JetByteTools::Core::_tstring | GetInstalledCounterDLLName (const JetByteTools::Core::_tstring &applicationName)=0 |
Protected Member Functions | |
virtual | ~IInstallPerformanceMonitorCounters () |
We never delete instances of this interface; you must manage the lifetime of the class that implements it. |
enum InstallResult |
virtual ~IInstallPerformanceMonitorCounters | ( | ) | [protected, virtual] |
We never delete instances of this interface; you must manage the lifetime of the class that implements it.
virtual bool CanInstall | ( | ) | [pure virtual] |
Returns true if the calling thread has adequate permissions to install the counters.
Implemented in CPerformanceCounterInstaller.
virtual 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 | |||
) | [pure 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'.
Implemented in CPerformanceCounterInstaller.
virtual 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 | |||
) | [pure 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.
Implemented in CPerformanceCounterInstaller.
virtual 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 | |||
) | [pure 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'.
Implemented in CPerformanceCounterInstaller.
virtual 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 | |||
) | [pure 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.
Implemented in CPerformanceCounterInstaller.
virtual DWORD Uninstall | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [pure virtual] |
Removes performance DLL information from the system. The applicationName is the same name that you used in your call to install the counters.
Implemented in CPerformanceCounterInstaller.
virtual void ForceUninstall | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [pure 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...
Implemented in CPerformanceCounterInstaller.
virtual bool CountersAreInstalled | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [pure virtual] |
Returns true if counters for the application are installed.
Implemented in CPerformanceCounterInstaller.
virtual void DumpCounterConfiguration | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [pure virtual] |
Implemented in CPerformanceCounterInstaller.
virtual DWORD FirstCounterIndex | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [pure virtual] |
virtual JetByteTools::Core::_tstring GetSchemaChecksum | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [pure virtual] |
Implemented in CPerformanceCounterInstaller.
virtual JetByteTools::Core::_tstring GetInstalledCounterDLLName | ( | const JetByteTools::Core::_tstring & | applicationName | ) | [pure virtual] |
Implemented in CPerformanceCounterInstaller.