Platform SDK: Performance Monitoring

Error Codes

The SystemMonitor object returns the status as an HRESULT. In addition, the GetValue and GetStatistics methods in the CounterItem object return status information the validity of the counter data as an argument.

The following is a list of all error codes that the System Monitor returns.

Error code: 0xC0001388
Definition: SMON_STATUS_DUPL_COUNTER_PATH
Description: Returned when you attempt to add a counter that already exists.
Message text: "Specified counter is already assigned to this control."

Error code: 0xC0001389
Definition: SMON_STATUS_NO_SYSMON_OBJECT
Description: Returned when the property settings do not contain a complete HTML object.
Message text: "The settings do not contain any complete System Monitor HTML objects."

Error code: 0xC000138A
Definition: SMON_STATUS_TOO_FEW_SAMPLES
Description: Returned when the specified log file contains fewer than two data samples.
Message text: "The specified log file contains fewer than two data samples."

Error code: 0xC000138B
Definition: SMON_STATUS_LOG_FILE_SIZE_LIMIT
Description: Returned when setting the LogFileName property and the size of the specified log file exceeds the size limits of the System Monitor control. The System Monitor attempts to load the new log file before unloading the currently selected log file. In that case, the user or program might choose to unload the current log file by specifying a null file name, then attempt to specify the new log file name again.
Message text: "The specified log file exceeds the size limits of the System Monitor control. If a log file is currently selected, select current activity as the data source in order to unload the current log file, then reselect the specified log file."

For a description of additional error codes returned by the System Monitor automation control, refer to Win32 Error Codes and Checking PDH Interface Return Values.