Win32Error.cs 1.0 KB

123456789101112131415161718192021222324252627
  1. namespace DiskAccessLibrary
  2. {
  3. /// <summary>
  4. /// Win32 error codes:
  5. /// </summary>
  6. public enum Win32Error : uint
  7. {
  8. ERROR_SUCCESS = 0x00,
  9. ERROR_INVALID_FUNCTION = 0x01,
  10. ERROR_FILE_NOT_FOUND = 0x02,
  11. ERROR_ACCESS_DENIED = 0x05,
  12. ERROR_INVALID_DATA = 0x0D,
  13. ERROR_NOT_READY = 0x15,
  14. ERROR_SECTOR_NOT_FOUND = 0x1B,
  15. ERROR_CRC = 0x17, // This is the same error as STATUS_DEVICE_DATA_ERROR, and it means the disk has a bad block
  16. ERROR_SHARING_VIOLATION = 0x20,
  17. ERROR_INSUFFICIENT_BUFFER = 0x7A,
  18. ERROR_MORE_DATA = 0xEA, // buffer was not long enough
  19. ERROR_NO_MORE_ITEMS = 0x103,
  20. ERROR_MEDIA_CHANGED = 0x456,
  21. ERROR_NO_MEDIA_IN_DRIVE = 0x458,
  22. ERROR_IO_DEVICE = 0x45D, // Reading from disk region that has sectors with mismatching CRC may return this
  23. ERROR_DEVICE_NOT_CONNECTED = 0x48F,
  24. ERROR_NO_SYSTEM_RESOURCES = 0x5AA, // Occurs when we try to read too many bytes at once
  25. }
  26. }