Defines

SMART Return Codes
[SMART APIs]

Defines

#define SMART_STATUS_SUCCESS   0
 No error. Function completed and returned successfully.
#define SMART_ERR_DEVICE_ID_DNE   -1000
 The device ID passed in does not exist. Please use GetSmartDeviceIDFirst and GetSmartDeviceIDNext to get the device ID.
#define SMART_ERR_DEVICE_ID_NOT_SMART   -1001
 Disk does not support S.M.A.R.T. Older disk that does not support S.M.A.R.T. will get this error.
#define SMART_ERR_DEVICE_OPEN   -1002
#define SMART_ERR_DRIVE_NUMBER_INVALID   -1100
 Valid drive numbers are from 0 ("A:\") to 25 ("Z:\"). Any number not in this range will yield this error.
#define SMART_ERR_DRIVE_NUMBER_DNE   -1101
 Drive number does not exist. This means there is not physical device that has this drive number.
#define SMART_ERR_DRIVE_NUMBER_NOT_FIXED   -1102
 Drive number is not a fixed drive. Floppies and CDROMs are not fixed drives and will get this error.
#define SMART_ERR_BUFFER_INVALID   -2000
 Buffer provided points to NULL.
#define SMART_ERR_BUFFER_TOO_SMALL   -2001
 Buffer provided is too small to hold all the data.
#define SMART_ERR_BUFFER_FAILED_ALLOCATE   -2002
 Failed to allocate buffer in function.
#define SMART_ERR_SMART_DEVICE_ID_EMPTY   -3001
 There is no S.M.A.R.T. device ID in the list.
#define SMART_ERR_SMART_DEVICE_ID_EOL   -3002
 We have reached the end of list for the S.M.A.R.T. device ID(s).
#define SMART_ERR_SMART_ATTR_ID_EMPTY   -4001
 There is no S.M.A.R.T. attribute for the drive.
#define SMART_ERR_SMART_ATTR_ID_EOL   -4002
 We have reached the end of list for the S.M.A.R.T. attribute(s) for the drive.
#define SMART_ERR_SMART_ATTR_ID_INVALID   -4003
 Smart attribute ID is invalid. Attribute ID cannot be zero.
#define SMART_WARN_SMART_ATTR_ID_UNKNOWN   -4004
 Smart attribute ID unrecognized by DLL. Possibly a new attribute implemented by certain hard disk manufacturer. The attribute value will still be valid. However, you will get "Unknown Attribute" if you try and get its description string. This is a warning rather than an error.
#define SMART_ERR_FOPEN_FAIL   -5001
 Fail to open file for reading and writing. This happens when the Windows API fopen() returned an error.
#define SMART_ERR_FWRITE_FAIL   -5002
 Fail to write to file. This happens when the number of characters written using the Windows API fwrite() is less than what we intended to write.
#define SMART_ERR_FREAD_FAIL   -5003
 Fail to read file. This happens when the Windows API fread() returned an error.
#define SMART_ERR_ACCESS_RW   -5101
 No read/write permission for file.
#define SMART_ERR_ACCESS_RO   -5102
 No read permission for file.
#define SMART_ERR_FSEEK_FAIL   -5201
 Fail to seek to a location in file. This happens when the Windows API fseek() returned an error.
#define SMART_ERR_GET_PHY_CAPACITY   -6001
 Fail to get device capacity.
#define SMART_ERR_BUILD_DRIVES_INFO_NO_ACCESS   -7001
 No access rights when trying to get info for drive.
#define SMART_ERR_NO_ADMIN_RIGHTS   -7002
 No access rights to gather drive information. In Windows Server and Vista, your application needs to "Run as administrator".
#define SMART_ERR_DLL_NOT_INIT   -10001
 Occur when you try and use SmartDisk DLL’s APIs without first calling SmartDisk Init.
#define SMART_ERR_DLL_INIT_MEMORY_ALLOC_FAIL   -10002
 SmartDisk Init failed to allocate memory.
#define SMART_ERR_FUNCTION_NOT_SUPPORTED   -10003
 This function is not supported in Windows 98/Me.
#define SMART_ERR_EMPTY_STRING   -10004
 Empty string returned from SmartDll GetXXX functions.
#define SMART_ERR_TEC_NO_ATTRIBUTES   -20001
 There are no S.M.A.R.T. attributes to record for the chosen drive number.
#define SMART_ERR_TEC_SIGNATURE_HEAD   -20002
 The TEC file does not have "SMDL" in the first 4 bytes of the file stream.
#define SMART_ERR_TEC_SIGNATURE_TAIL   -20003
 The TEC file does not have ""LDMS" in the last 4 bytes of the file stream.
#define SMART_ERR_TEC_FILE_DNE   -20004
 The TEC file for the drive number does not exist.
#define SMART_WARN_TEC_NOT_ENOUGH_DATA   -20005
 There are not enough TEC data to predict TEC. We need to have at least 3 sets of data.
#define SMART_WARN_TEC_ATTR_ID_NA   -20006
 For given attribute ID, threshold value is 0. It means we have no threshold value to work with to predict TEC.
#define SMART_WARN_TEC_UNABLE_TO_PREDICT   -20007
 No changes in attribute values have been detected, making it impossible to predict TEC.
#define SMART_ERR_UNEXPECTED   -30001

Define Documentation

#define SMART_STATUS_SUCCESS   0

No error. Function completed and returned successfully.

#define SMART_ERR_DEVICE_ID_DNE   -1000

The device ID passed in does not exist. Please use GetSmartDeviceIDFirst and GetSmartDeviceIDNext to get the device ID.

#define SMART_ERR_DEVICE_ID_NOT_SMART   -1001

Disk does not support S.M.A.R.T. Older disk that does not support S.M.A.R.T. will get this error.

#define SMART_ERR_DEVICE_OPEN   -1002
#define SMART_ERR_DRIVE_NUMBER_INVALID   -1100

Valid drive numbers are from 0 ("A:\") to 25 ("Z:\"). Any number not in this range will yield this error.

#define SMART_ERR_DRIVE_NUMBER_DNE   -1101

Drive number does not exist. This means there is not physical device that has this drive number.

#define SMART_ERR_DRIVE_NUMBER_NOT_FIXED   -1102

Drive number is not a fixed drive. Floppies and CDROMs are not fixed drives and will get this error.

#define SMART_ERR_BUFFER_INVALID   -2000

Buffer provided points to NULL.

#define SMART_ERR_BUFFER_TOO_SMALL   -2001

Buffer provided is too small to hold all the data.

#define SMART_ERR_BUFFER_FAILED_ALLOCATE   -2002

Failed to allocate buffer in function.

#define SMART_ERR_SMART_DEVICE_ID_EMPTY   -3001

There is no S.M.A.R.T. device ID in the list.

#define SMART_ERR_SMART_DEVICE_ID_EOL   -3002

We have reached the end of list for the S.M.A.R.T. device ID(s).

#define SMART_ERR_SMART_ATTR_ID_EMPTY   -4001

There is no S.M.A.R.T. attribute for the drive.

#define SMART_ERR_SMART_ATTR_ID_EOL   -4002

We have reached the end of list for the S.M.A.R.T. attribute(s) for the drive.

#define SMART_ERR_SMART_ATTR_ID_INVALID   -4003

Smart attribute ID is invalid. Attribute ID cannot be zero.

#define SMART_WARN_SMART_ATTR_ID_UNKNOWN   -4004

Smart attribute ID unrecognized by DLL. Possibly a new attribute implemented by certain hard disk manufacturer. The attribute value will still be valid. However, you will get "Unknown Attribute" if you try and get its description string. This is a warning rather than an error.

#define SMART_ERR_FOPEN_FAIL   -5001

Fail to open file for reading and writing. This happens when the Windows API fopen() returned an error.

#define SMART_ERR_FWRITE_FAIL   -5002

Fail to write to file. This happens when the number of characters written using the Windows API fwrite() is less than what we intended to write.

#define SMART_ERR_FREAD_FAIL   -5003

Fail to read file. This happens when the Windows API fread() returned an error.

#define SMART_ERR_ACCESS_RW   -5101

No read/write permission for file.

#define SMART_ERR_ACCESS_RO   -5102

No read permission for file.

#define SMART_ERR_FSEEK_FAIL   -5201

Fail to seek to a location in file. This happens when the Windows API fseek() returned an error.

#define SMART_ERR_GET_PHY_CAPACITY   -6001

Fail to get device capacity.

#define SMART_ERR_BUILD_DRIVES_INFO_NO_ACCESS   -7001

No access rights when trying to get info for drive.

#define SMART_ERR_NO_ADMIN_RIGHTS   -7002

No access rights to gather drive information. In Windows Server and Vista, your application needs to "Run as administrator".

#define SMART_ERR_DLL_NOT_INIT   -10001

Occur when you try and use SmartDisk DLL’s APIs without first calling SmartDisk Init.

#define SMART_ERR_DLL_INIT_MEMORY_ALLOC_FAIL   -10002

SmartDisk Init failed to allocate memory.

#define SMART_ERR_FUNCTION_NOT_SUPPORTED   -10003

This function is not supported in Windows 98/Me.

#define SMART_ERR_EMPTY_STRING   -10004

Empty string returned from SmartDll GetXXX functions.

#define SMART_ERR_TEC_NO_ATTRIBUTES   -20001

There are no S.M.A.R.T. attributes to record for the chosen drive number.

#define SMART_ERR_TEC_SIGNATURE_HEAD   -20002

The TEC file does not have "SMDL" in the first 4 bytes of the file stream.

#define SMART_ERR_TEC_SIGNATURE_TAIL   -20003

The TEC file does not have ""LDMS" in the last 4 bytes of the file stream.

#define SMART_ERR_TEC_FILE_DNE   -20004

The TEC file for the drive number does not exist.

#define SMART_WARN_TEC_NOT_ENOUGH_DATA   -20005

There are not enough TEC data to predict TEC. We need to have at least 3 sets of data.

#define SMART_WARN_TEC_ATTR_ID_NA   -20006

For given attribute ID, threshold value is 0. It means we have no threshold value to work with to predict TEC.

#define SMART_WARN_TEC_UNABLE_TO_PREDICT   -20007

No changes in attribute values have been detected, making it impossible to predict TEC.

#define SMART_ERR_UNEXPECTED   -30001
 All Data Structures Files Functions Variables Enumerations Enumerator Defines