1c2c66affSColin Finck /* 2c2c66affSColin Finck * PROJECT: Mke2fs 3c2c66affSColin Finck * FILE: Disk.c 4c2c66affSColin Finck * PROGRAMMER: Matt Wu <mattwu@163.com> 5c2c66affSColin Finck * HOMEPAGE: http://ext2.yeah.net 6c2c66affSColin Finck */ 7c2c66affSColin Finck 8c2c66affSColin Finck /* INCLUDES **************************************************************/ 9c2c66affSColin Finck 10c2c66affSColin Finck #include "Mke2fs.h" 11c2c66affSColin Finck 12c2c66affSColin Finck #include <ndk/iofuncs.h> 13c2c66affSColin Finck #include <ndk/obfuncs.h> 14c2c66affSColin Finck #include <debug.h> 15c2c66affSColin Finck 16c2c66affSColin Finck /* FUNCTIONS *************************************************************/ 17c2c66affSColin Finck 18c2c66affSColin Finck PCCH 19c2c66affSColin Finck Ext2StatusToString ( IN NTSTATUS Status ) 20c2c66affSColin Finck { 21c2c66affSColin Finck switch (Status) 22c2c66affSColin Finck { 23c2c66affSColin Finck case 0x00000000: return "STATUS_SUCCESS"; 24c2c66affSColin Finck case 0x00000001: return "STATUS_WAIT_1"; 25c2c66affSColin Finck case 0x00000002: return "STATUS_WAIT_2"; 26c2c66affSColin Finck case 0x00000003: return "STATUS_WAIT_3"; 27c2c66affSColin Finck case 0x0000003F: return "STATUS_WAIT_63"; 28c2c66affSColin Finck case 0x00000080: return "STATUS_ABANDONED_WAIT_0"; 29c2c66affSColin Finck case 0x000000BF: return "STATUS_ABANDONED_WAIT_63"; 30c2c66affSColin Finck case 0x000000C0: return "STATUS_USER_APC"; 31c2c66affSColin Finck case 0x00000100: return "STATUS_KERNEL_APC"; 32c2c66affSColin Finck case 0x00000101: return "STATUS_ALERTED"; 33c2c66affSColin Finck case 0x00000102: return "STATUS_TIMEOUT"; 34c2c66affSColin Finck case 0x00000103: return "STATUS_PENDING"; 35c2c66affSColin Finck case 0x00000104: return "STATUS_REPARSE"; 36c2c66affSColin Finck case 0x00000105: return "STATUS_MORE_ENTRIES"; 37c2c66affSColin Finck case 0x00000106: return "STATUS_NOT_ALL_ASSIGNED"; 38c2c66affSColin Finck case 0x00000107: return "STATUS_SOME_NOT_MAPPED"; 39c2c66affSColin Finck case 0x00000108: return "STATUS_OPLOCK_BREAK_IN_PROGRESS"; 40c2c66affSColin Finck case 0x00000109: return "STATUS_VOLUME_MOUNTED"; 41c2c66affSColin Finck case 0x0000010A: return "STATUS_RXACT_COMMITTED"; 42c2c66affSColin Finck case 0x0000010B: return "STATUS_NOTIFY_CLEANUP"; 43c2c66affSColin Finck case 0x0000010C: return "STATUS_NOTIFY_ENUM_DIR"; 44c2c66affSColin Finck case 0x0000010D: return "STATUS_NO_QUOTAS_FOR_ACCOUNT"; 45c2c66affSColin Finck case 0x0000010E: return "STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED"; 46c2c66affSColin Finck case 0x00000110: return "STATUS_PAGE_FAULT_TRANSITION"; 47c2c66affSColin Finck case 0x00000111: return "STATUS_PAGE_FAULT_DEMAND_ZERO"; 48c2c66affSColin Finck case 0x00000112: return "STATUS_PAGE_FAULT_COPY_ON_WRITE"; 49c2c66affSColin Finck case 0x00000113: return "STATUS_PAGE_FAULT_GUARD_PAGE"; 50c2c66affSColin Finck case 0x00000114: return "STATUS_PAGE_FAULT_PAGING_FILE"; 51c2c66affSColin Finck case 0x00000115: return "STATUS_CACHE_PAGE_LOCKED"; 52c2c66affSColin Finck case 0x00000116: return "STATUS_CRASH_DUMP"; 53c2c66affSColin Finck case 0x00000117: return "STATUS_BUFFER_ALL_ZEROS"; 54c2c66affSColin Finck case 0x00000118: return "STATUS_REPARSE_OBJECT"; 55c2c66affSColin Finck case 0x00000119: return "STATUS_RESOURCE_REQUIREMENTS_CHANGED"; 56c2c66affSColin Finck case 0x00000120: return "STATUS_TRANSLATION_COMPLETE"; 57c2c66affSColin Finck case 0x00000121: return "STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY"; 58c2c66affSColin Finck case 0x00010001: return "DBG_EXCEPTION_HANDLED"; 59c2c66affSColin Finck case 0x00010002: return "DBG_CONTINUE"; 60c2c66affSColin Finck case 0x40000000: return "STATUS_OBJECT_NAME_EXISTS"; 61c2c66affSColin Finck case 0x40000001: return "STATUS_THREAD_WAS_SUSPENDED"; 62c2c66affSColin Finck case 0x40000002: return "STATUS_WORKING_SET_LIMIT_RANGE"; 63c2c66affSColin Finck case 0x40000003: return "STATUS_IMAGE_NOT_AT_BASE"; 64c2c66affSColin Finck case 0x40000004: return "STATUS_RXACT_STATE_CREATED"; 65c2c66affSColin Finck case 0x40000005: return "STATUS_SEGMENT_NOTIFICATION"; 66c2c66affSColin Finck case 0x40000006: return "STATUS_LOCAL_USER_SESSION_KEY"; 67c2c66affSColin Finck case 0x40000007: return "STATUS_BAD_CURRENT_DIRECTORY"; 68c2c66affSColin Finck case 0x40000008: return "STATUS_SERIAL_MORE_WRITES"; 69c2c66affSColin Finck case 0x40000009: return "STATUS_REGISTRY_RECOVERED"; 70c2c66affSColin Finck case 0x4000000A: return "STATUS_FT_READ_RECOVERY_FROM_BACKUP"; 71c2c66affSColin Finck case 0x4000000B: return "STATUS_FT_WRITE_RECOVERY"; 72c2c66affSColin Finck case 0x4000000C: return "STATUS_SERIAL_COUNTER_TIMEOUT"; 73c2c66affSColin Finck case 0x4000000D: return "STATUS_NULL_LM_PASSWORD"; 74c2c66affSColin Finck case 0x4000000E: return "STATUS_IMAGE_MACHINE_TYPE_MISMATCH"; 75c2c66affSColin Finck case 0x4000000F: return "STATUS_RECEIVE_PARTIAL"; 76c2c66affSColin Finck case 0x40000010: return "STATUS_RECEIVE_EXPEDITED"; 77c2c66affSColin Finck case 0x40000011: return "STATUS_RECEIVE_PARTIAL_EXPEDITED"; 78c2c66affSColin Finck case 0x40000012: return "STATUS_EVENT_DONE"; 79c2c66affSColin Finck case 0x40000013: return "STATUS_EVENT_PENDING"; 80c2c66affSColin Finck case 0x40000014: return "STATUS_CHECKING_FILE_SYSTEM"; 81c2c66affSColin Finck case 0x40000015: return "STATUS_FATAL_APP_EXIT"; 82c2c66affSColin Finck case 0x40000016: return "STATUS_PREDEFINED_HANDLE"; 83c2c66affSColin Finck case 0x40000017: return "STATUS_WAS_UNLOCKED"; 84c2c66affSColin Finck case 0x40000018: return "STATUS_SERVICE_NOTIFICATION"; 85c2c66affSColin Finck case 0x40000019: return "STATUS_WAS_LOCKED"; 86c2c66affSColin Finck case 0x4000001A: return "STATUS_LOG_HARD_ERROR"; 87c2c66affSColin Finck case 0x4000001B: return "STATUS_ALREADY_WIN32"; 88c2c66affSColin Finck case 0x4000001C: return "STATUS_WX86_UNSIMULATE"; 89c2c66affSColin Finck case 0x4000001D: return "STATUS_WX86_CONTINUE"; 90c2c66affSColin Finck case 0x4000001E: return "STATUS_WX86_SINGLE_STEP"; 91c2c66affSColin Finck case 0x4000001F: return "STATUS_WX86_BREAKPOINT"; 92c2c66affSColin Finck case 0x40000020: return "STATUS_WX86_EXCEPTION_CONTINUE"; 93c2c66affSColin Finck case 0x40000021: return "STATUS_WX86_EXCEPTION_LASTCHANCE"; 94c2c66affSColin Finck case 0x40000022: return "STATUS_WX86_EXCEPTION_CHAIN"; 95c2c66affSColin Finck case 0x40000023: return "STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE"; 96c2c66affSColin Finck case 0x40000024: return "STATUS_NO_YIELD_PERFORMED"; 97c2c66affSColin Finck case 0x40000025: return "STATUS_TIMER_RESUME_IGNORED"; 98c2c66affSColin Finck case 0x40000026: return "STATUS_ARBITRATION_UNHANDLED"; 99c2c66affSColin Finck case 0x40000027: return "STATUS_CARDBUS_NOT_SUPPORTED"; 100c2c66affSColin Finck case 0x40000028: return "STATUS_WX86_CREATEWX86TIB"; 101c2c66affSColin Finck case 0x40000029: return "STATUS_MP_PROCESSOR_MISMATCH"; 102c2c66affSColin Finck case 0x40010001: return "DBG_REPLY_LATER"; 103c2c66affSColin Finck case 0x40010002: return "DBG_UNABLE_TO_PROVIDE_HANDLE"; 104c2c66affSColin Finck case 0x40010003: return "DBG_TERMINATE_THREAD"; 105c2c66affSColin Finck case 0x40010004: return "DBG_TERMINATE_PROCESS"; 106c2c66affSColin Finck case 0x40010005: return "DBG_CONTROL_C"; 107c2c66affSColin Finck case 0x40010006: return "DBG_PRINTEXCEPTION_C"; 108c2c66affSColin Finck case 0x40010007: return "DBG_RIPEXCEPTION"; 109c2c66affSColin Finck case 0x40010008: return "DBG_CONTROL_BREAK"; 110c2c66affSColin Finck case 0x80000001: return "STATUS_GUARD_PAGE_VIOLATION"; 111c2c66affSColin Finck case 0x80000002: return "STATUS_DATATYPE_MISALIGNMENT"; 112c2c66affSColin Finck case 0x80000003: return "STATUS_BREAKPOINT"; 113c2c66affSColin Finck case 0x80000004: return "STATUS_SINGLE_STEP"; 114c2c66affSColin Finck case 0x80000005: return "STATUS_BUFFER_OVERFLOW"; 115c2c66affSColin Finck case 0x80000006: return "STATUS_NO_MORE_FILES"; 116c2c66affSColin Finck case 0x80000007: return "STATUS_WAKE_SYSTEM_DEBUGGER"; 117c2c66affSColin Finck case 0x8000000A: return "STATUS_HANDLES_CLOSED"; 118c2c66affSColin Finck case 0x8000000B: return "STATUS_NO_INHERITANCE"; 119c2c66affSColin Finck case 0x8000000C: return "STATUS_GUID_SUBSTITUTION_MADE"; 120c2c66affSColin Finck case 0x8000000D: return "STATUS_PARTIAL_COPY"; 121c2c66affSColin Finck case 0x8000000E: return "STATUS_DEVICE_PAPER_EMPTY"; 122c2c66affSColin Finck case 0x8000000F: return "STATUS_DEVICE_POWERED_OFF"; 123c2c66affSColin Finck case 0x80000010: return "STATUS_DEVICE_OFF_LINE"; 124c2c66affSColin Finck case 0x80000011: return "STATUS_DEVICE_BUSY"; 125c2c66affSColin Finck case 0x80000012: return "STATUS_NO_MORE_EAS"; 126c2c66affSColin Finck case 0x80000013: return "STATUS_INVALID_EA_NAME"; 127c2c66affSColin Finck case 0x80000014: return "STATUS_EA_LIST_INCONSISTENT"; 128c2c66affSColin Finck case 0x80000015: return "STATUS_INVALID_EA_FLAG"; 129c2c66affSColin Finck case 0x80000016: return "STATUS_VERIFY_REQUIRED"; 130c2c66affSColin Finck case 0x80000017: return "STATUS_EXTRANEOUS_INFORMATION"; 131c2c66affSColin Finck case 0x80000018: return "STATUS_RXACT_COMMIT_NECESSARY"; 132c2c66affSColin Finck case 0x8000001A: return "STATUS_NO_MORE_ENTRIES"; 133c2c66affSColin Finck case 0x8000001B: return "STATUS_FILEMARK_DETECTED"; 134c2c66affSColin Finck case 0x8000001C: return "STATUS_MEDIA_CHANGED"; 135c2c66affSColin Finck case 0x8000001D: return "STATUS_BUS_RESET"; 136c2c66affSColin Finck case 0x8000001E: return "STATUS_END_OF_MEDIA"; 137c2c66affSColin Finck case 0x8000001F: return "STATUS_BEGINNING_OF_MEDIA"; 138c2c66affSColin Finck case 0x80000020: return "STATUS_MEDIA_CHECK"; 139c2c66affSColin Finck case 0x80000021: return "STATUS_SETMARK_DETECTED"; 140c2c66affSColin Finck case 0x80000022: return "STATUS_NO_DATA_DETECTED"; 141c2c66affSColin Finck case 0x80000023: return "STATUS_REDIRECTOR_HAS_OPEN_HANDLES"; 142c2c66affSColin Finck case 0x80000024: return "STATUS_SERVER_HAS_OPEN_HANDLES"; 143c2c66affSColin Finck case 0x80000025: return "STATUS_ALREADY_DISCONNECTED"; 144c2c66affSColin Finck case 0x80000026: return "STATUS_LONGJUMP"; 145c2c66affSColin Finck case 0x80010001: return "DBG_EXCEPTION_NOT_HANDLED"; 146c2c66affSColin Finck case 0xC0000001: return "STATUS_UNSUCCESSFUL"; 147c2c66affSColin Finck case 0xC0000002: return "STATUS_NOT_IMPLEMENTED"; 148c2c66affSColin Finck case 0xC0000003: return "STATUS_INVALID_INFO_CLASS"; 149c2c66affSColin Finck case 0xC0000004: return "STATUS_INFO_LENGTH_MISMATCH"; 150c2c66affSColin Finck case 0xC0000005: return "STATUS_ACCESS_VIOLATION"; 151c2c66affSColin Finck case 0xC0000006: return "STATUS_IN_PAGE_ERROR"; 152c2c66affSColin Finck case 0xC0000007: return "STATUS_PAGEFILE_QUOTA"; 153c2c66affSColin Finck case 0xC0000008: return "STATUS_INVALID_HANDLE"; 154c2c66affSColin Finck case 0xC0000009: return "STATUS_BAD_INITIAL_STACK"; 155c2c66affSColin Finck case 0xC000000A: return "STATUS_BAD_INITIAL_PC"; 156c2c66affSColin Finck case 0xC000000B: return "STATUS_INVALID_CID"; 157c2c66affSColin Finck case 0xC000000C: return "STATUS_TIMER_NOT_CANCELED"; 158c2c66affSColin Finck case 0xC000000D: return "STATUS_INVALID_PARAMETER"; 159c2c66affSColin Finck case 0xC000000E: return "STATUS_NO_SUCH_DEVICE"; 160c2c66affSColin Finck case 0xC000000F: return "STATUS_NO_SUCH_FILE"; 161c2c66affSColin Finck case 0xC0000010: return "STATUS_INVALID_DEVICE_REQUEST"; 162c2c66affSColin Finck case 0xC0000011: return "STATUS_END_OF_FILE"; 163c2c66affSColin Finck case 0xC0000012: return "STATUS_WRONG_VOLUME"; 164c2c66affSColin Finck case 0xC0000013: return "STATUS_NO_MEDIA_IN_DEVICE"; 165c2c66affSColin Finck case 0xC0000014: return "STATUS_UNRECOGNIZED_MEDIA"; 166c2c66affSColin Finck case 0xC0000015: return "STATUS_NONEXISTENT_SECTOR"; 167c2c66affSColin Finck case 0xC0000016: return "STATUS_MORE_PROCESSING_REQUIRED"; 168c2c66affSColin Finck case 0xC0000017: return "STATUS_NO_MEMORY"; 169c2c66affSColin Finck case 0xC0000018: return "STATUS_CONFLICTING_ADDRESSES"; 170c2c66affSColin Finck case 0xC0000019: return "STATUS_NOT_MAPPED_VIEW"; 171c2c66affSColin Finck case 0xC000001A: return "STATUS_UNABLE_TO_FREE_VM"; 172c2c66affSColin Finck case 0xC000001B: return "STATUS_UNABLE_TO_DELETE_SECTION"; 173c2c66affSColin Finck case 0xC000001C: return "STATUS_INVALID_SYSTEM_SERVICE"; 174c2c66affSColin Finck case 0xC000001D: return "STATUS_ILLEGAL_INSTRUCTION"; 175c2c66affSColin Finck case 0xC000001E: return "STATUS_INVALID_LOCK_SEQUENCE"; 176c2c66affSColin Finck case 0xC000001F: return "STATUS_INVALID_VIEW_SIZE"; 177c2c66affSColin Finck case 0xC0000020: return "STATUS_INVALID_FILE_FOR_SECTION"; 178c2c66affSColin Finck case 0xC0000021: return "STATUS_ALREADY_COMMITTED"; 179c2c66affSColin Finck case 0xC0000022: return "STATUS_ACCESS_DENIED"; 180c2c66affSColin Finck case 0xC0000023: return "STATUS_BUFFER_TOO_SMALL"; 181c2c66affSColin Finck case 0xC0000024: return "STATUS_OBJECT_TYPE_MISMATCH"; 182c2c66affSColin Finck case 0xC0000025: return "STATUS_NONCONTINUABLE_EXCEPTION"; 183c2c66affSColin Finck case 0xC0000026: return "STATUS_INVALID_DISPOSITION"; 184c2c66affSColin Finck case 0xC0000027: return "STATUS_UNWIND"; 185c2c66affSColin Finck case 0xC0000028: return "STATUS_BAD_STACK"; 186c2c66affSColin Finck case 0xC0000029: return "STATUS_INVALID_UNWIND_TARGET"; 187c2c66affSColin Finck case 0xC000002A: return "STATUS_NOT_LOCKED"; 188c2c66affSColin Finck case 0xC000002B: return "STATUS_PARITY_ERROR"; 189c2c66affSColin Finck case 0xC000002C: return "STATUS_UNABLE_TO_DECOMMIT_VM"; 190c2c66affSColin Finck case 0xC000002D: return "STATUS_NOT_COMMITTED"; 191c2c66affSColin Finck case 0xC000002E: return "STATUS_INVALID_PORT_ATTRIBUTES"; 192c2c66affSColin Finck case 0xC000002F: return "STATUS_PORT_MESSAGE_TOO_LONG"; 193c2c66affSColin Finck case 0xC0000030: return "STATUS_INVALID_PARAMETER_MIX"; 194c2c66affSColin Finck case 0xC0000031: return "STATUS_INVALID_QUOTA_LOWER"; 195c2c66affSColin Finck case 0xC0000032: return "STATUS_DISK_CORRUPT_ERROR"; 196c2c66affSColin Finck case 0xC0000033: return "STATUS_OBJECT_NAME_INVALID"; 197c2c66affSColin Finck case 0xC0000034: return "STATUS_OBJECT_NAME_NOT_FOUND"; 198c2c66affSColin Finck case 0xC0000035: return "STATUS_OBJECT_NAME_COLLISION"; 199c2c66affSColin Finck case 0xC0000037: return "STATUS_PORT_DISCONNECTED"; 200c2c66affSColin Finck case 0xC0000038: return "STATUS_DEVICE_ALREADY_ATTACHED"; 201c2c66affSColin Finck case 0xC0000039: return "STATUS_OBJECT_PATH_INVALID"; 202c2c66affSColin Finck case 0xC000003A: return "STATUS_OBJECT_PATH_NOT_FOUND"; 203c2c66affSColin Finck case 0xC000003B: return "STATUS_OBJECT_PATH_SYNTAX_BAD"; 204c2c66affSColin Finck case 0xC000003C: return "STATUS_DATA_OVERRUN"; 205c2c66affSColin Finck case 0xC000003D: return "STATUS_DATA_LATE_ERROR"; 206c2c66affSColin Finck case 0xC000003E: return "STATUS_DATA_ERROR"; 207c2c66affSColin Finck case 0xC000003F: return "STATUS_CRC_ERROR"; 208c2c66affSColin Finck case 0xC0000040: return "STATUS_SECTION_TOO_BIG"; 209c2c66affSColin Finck case 0xC0000041: return "STATUS_PORT_CONNECTION_REFUSED"; 210c2c66affSColin Finck case 0xC0000042: return "STATUS_INVALID_PORT_HANDLE"; 211c2c66affSColin Finck case 0xC0000043: return "STATUS_SHARING_VIOLATION"; 212c2c66affSColin Finck case 0xC0000044: return "STATUS_QUOTA_EXCEEDED"; 213c2c66affSColin Finck case 0xC0000045: return "STATUS_INVALID_PAGE_PROTECTION"; 214c2c66affSColin Finck case 0xC0000046: return "STATUS_MUTANT_NOT_OWNED"; 215c2c66affSColin Finck case 0xC0000047: return "STATUS_SEMAPHORE_LIMIT_EXCEEDED"; 216c2c66affSColin Finck case 0xC0000048: return "STATUS_PORT_ALREADY_SET"; 217c2c66affSColin Finck case 0xC0000049: return "STATUS_SECTION_NOT_IMAGE"; 218c2c66affSColin Finck case 0xC000004A: return "STATUS_SUSPEND_COUNT_EXCEEDED"; 219c2c66affSColin Finck case 0xC000004B: return "STATUS_THREAD_IS_TERMINATING"; 220c2c66affSColin Finck case 0xC000004C: return "STATUS_BAD_WORKING_SET_LIMIT"; 221c2c66affSColin Finck case 0xC000004D: return "STATUS_INCOMPATIBLE_FILE_MAP"; 222c2c66affSColin Finck case 0xC000004E: return "STATUS_SECTION_PROTECTION"; 223c2c66affSColin Finck case 0xC000004F: return "STATUS_EAS_NOT_SUPPORTED"; 224c2c66affSColin Finck case 0xC0000050: return "STATUS_EA_TOO_LARGE"; 225c2c66affSColin Finck case 0xC0000051: return "STATUS_NONEXISTENT_EA_ENTRY"; 226c2c66affSColin Finck case 0xC0000052: return "STATUS_NO_EAS_ON_FILE"; 227c2c66affSColin Finck case 0xC0000053: return "STATUS_EA_CORRUPT_ERROR"; 228c2c66affSColin Finck case 0xC0000054: return "STATUS_FILE_LOCK_CONFLICT"; 229c2c66affSColin Finck case 0xC0000055: return "STATUS_LOCK_NOT_GRANTED"; 230c2c66affSColin Finck case 0xC0000056: return "STATUS_DELETE_PENDING"; 231c2c66affSColin Finck case 0xC0000057: return "STATUS_CTL_FILE_NOT_SUPPORTED"; 232c2c66affSColin Finck case 0xC0000058: return "STATUS_UNKNOWN_REVISION"; 233c2c66affSColin Finck case 0xC0000059: return "STATUS_REVISION_MISMATCH"; 234c2c66affSColin Finck case 0xC000005A: return "STATUS_INVALID_OWNER"; 235c2c66affSColin Finck case 0xC000005B: return "STATUS_INVALID_PRIMARY_GROUP"; 236c2c66affSColin Finck case 0xC000005C: return "STATUS_NO_IMPERSONATION_TOKEN"; 237c2c66affSColin Finck case 0xC000005D: return "STATUS_CANT_DISABLE_MANDATORY"; 238c2c66affSColin Finck case 0xC000005E: return "STATUS_NO_LOGON_SERVERS"; 239c2c66affSColin Finck case 0xC000005F: return "STATUS_NO_SUCH_LOGON_SESSION"; 240c2c66affSColin Finck case 0xC0000060: return "STATUS_NO_SUCH_PRIVILEGE"; 241c2c66affSColin Finck case 0xC0000061: return "STATUS_PRIVILEGE_NOT_HELD"; 242c2c66affSColin Finck case 0xC0000062: return "STATUS_INVALID_ACCOUNT_NAME"; 243c2c66affSColin Finck case 0xC0000063: return "STATUS_USER_EXISTS"; 244c2c66affSColin Finck case 0xC0000064: return "STATUS_NO_SUCH_USER"; 245c2c66affSColin Finck case 0xC0000065: return "STATUS_GROUP_EXISTS"; 246c2c66affSColin Finck case 0xC0000066: return "STATUS_NO_SUCH_GROUP"; 247c2c66affSColin Finck case 0xC0000067: return "STATUS_MEMBER_IN_GROUP"; 248c2c66affSColin Finck case 0xC0000068: return "STATUS_MEMBER_NOT_IN_GROUP"; 249c2c66affSColin Finck case 0xC0000069: return "STATUS_LAST_ADMIN"; 250c2c66affSColin Finck case 0xC000006A: return "STATUS_WRONG_PASSWORD"; 251c2c66affSColin Finck case 0xC000006B: return "STATUS_ILL_FORMED_PASSWORD"; 252c2c66affSColin Finck case 0xC000006C: return "STATUS_PASSWORD_RESTRICTION"; 253c2c66affSColin Finck case 0xC000006D: return "STATUS_LOGON_FAILURE"; 254c2c66affSColin Finck case 0xC000006E: return "STATUS_ACCOUNT_RESTRICTION"; 255c2c66affSColin Finck case 0xC000006F: return "STATUS_INVALID_LOGON_HOURS"; 256c2c66affSColin Finck case 0xC0000070: return "STATUS_INVALID_WORKSTATION"; 257c2c66affSColin Finck case 0xC0000071: return "STATUS_PASSWORD_EXPIRED"; 258c2c66affSColin Finck case 0xC0000072: return "STATUS_ACCOUNT_DISABLED"; 259c2c66affSColin Finck case 0xC0000073: return "STATUS_NONE_MAPPED"; 260c2c66affSColin Finck case 0xC0000074: return "STATUS_TOO_MANY_LUIDS_REQUESTED"; 261c2c66affSColin Finck case 0xC0000075: return "STATUS_LUIDS_EXHAUSTED"; 262c2c66affSColin Finck case 0xC0000076: return "STATUS_INVALID_SUB_AUTHORITY"; 263c2c66affSColin Finck case 0xC0000077: return "STATUS_INVALID_ACL"; 264c2c66affSColin Finck case 0xC0000078: return "STATUS_INVALID_SID"; 265c2c66affSColin Finck case 0xC0000079: return "STATUS_INVALID_SECURITY_DESCR"; 266c2c66affSColin Finck case 0xC000007A: return "STATUS_PROCEDURE_NOT_FOUND"; 267c2c66affSColin Finck case 0xC000007B: return "STATUS_INVALID_IMAGE_FORMAT"; 268c2c66affSColin Finck case 0xC000007C: return "STATUS_NO_TOKEN"; 269c2c66affSColin Finck case 0xC000007D: return "STATUS_BAD_INHERITANCE_ACL"; 270c2c66affSColin Finck case 0xC000007E: return "STATUS_RANGE_NOT_LOCKED"; 271c2c66affSColin Finck case 0xC000007F: return "STATUS_DISK_FULL"; 272c2c66affSColin Finck case 0xC0000080: return "STATUS_SERVER_DISABLED"; 273c2c66affSColin Finck case 0xC0000081: return "STATUS_SERVER_NOT_DISABLED"; 274c2c66affSColin Finck case 0xC0000082: return "STATUS_TOO_MANY_GUIDS_REQUESTED"; 275c2c66affSColin Finck case 0xC0000083: return "STATUS_GUIDS_EXHAUSTED"; 276c2c66affSColin Finck case 0xC0000084: return "STATUS_INVALID_ID_AUTHORITY"; 277c2c66affSColin Finck case 0xC0000085: return "STATUS_AGENTS_EXHAUSTED"; 278c2c66affSColin Finck case 0xC0000086: return "STATUS_INVALID_VOLUME_LABEL"; 279c2c66affSColin Finck case 0xC0000087: return "STATUS_SECTION_NOT_EXTENDED"; 280c2c66affSColin Finck case 0xC0000088: return "STATUS_NOT_MAPPED_DATA"; 281c2c66affSColin Finck case 0xC0000089: return "STATUS_RESOURCE_DATA_NOT_FOUND"; 282c2c66affSColin Finck case 0xC000008A: return "STATUS_RESOURCE_TYPE_NOT_FOUND"; 283c2c66affSColin Finck case 0xC000008B: return "STATUS_RESOURCE_NAME_NOT_FOUND"; 284c2c66affSColin Finck case 0xC000008C: return "STATUS_ARRAY_BOUNDS_EXCEEDED"; 285c2c66affSColin Finck case 0xC000008D: return "STATUS_FLOAT_DENORMAL_OPERAND"; 286c2c66affSColin Finck case 0xC000008E: return "STATUS_FLOAT_DIVIDE_BY_ZERO"; 287c2c66affSColin Finck case 0xC000008F: return "STATUS_FLOAT_INEXACT_RESULT"; 288c2c66affSColin Finck case 0xC0000090: return "STATUS_FLOAT_INVALID_OPERATION"; 289c2c66affSColin Finck case 0xC0000091: return "STATUS_FLOAT_OVERFLOW"; 290c2c66affSColin Finck case 0xC0000092: return "STATUS_FLOAT_STACK_CHECK"; 291c2c66affSColin Finck case 0xC0000093: return "STATUS_FLOAT_UNDERFLOW"; 292c2c66affSColin Finck case 0xC0000094: return "STATUS_INTEGER_DIVIDE_BY_ZERO"; 293c2c66affSColin Finck case 0xC0000095: return "STATUS_INTEGER_OVERFLOW"; 294c2c66affSColin Finck case 0xC0000096: return "STATUS_PRIVILEGED_INSTRUCTION"; 295c2c66affSColin Finck case 0xC0000097: return "STATUS_TOO_MANY_PAGING_FILES"; 296c2c66affSColin Finck case 0xC0000098: return "STATUS_FILE_INVALID"; 297c2c66affSColin Finck case 0xC0000099: return "STATUS_ALLOTTED_SPACE_EXCEEDED"; 298c2c66affSColin Finck case 0xC000009A: return "STATUS_INSUFFICIENT_RESOURCES"; 299c2c66affSColin Finck case 0xC000009B: return "STATUS_DFS_EXIT_PATH_FOUND"; 300c2c66affSColin Finck case 0xC000009C: return "STATUS_DEVICE_DATA_ERROR"; 301c2c66affSColin Finck case 0xC000009D: return "STATUS_DEVICE_NOT_CONNECTED"; 302c2c66affSColin Finck case 0xC000009E: return "STATUS_DEVICE_POWER_FAILURE"; 303c2c66affSColin Finck case 0xC000009F: return "STATUS_FREE_VM_NOT_AT_BASE"; 304c2c66affSColin Finck case 0xC00000A0: return "STATUS_MEMORY_NOT_ALLOCATED"; 305c2c66affSColin Finck case 0xC00000A1: return "STATUS_WORKING_SET_QUOTA"; 306c2c66affSColin Finck case 0xC00000A2: return "STATUS_MEDIA_WRITE_PROTECTED"; 307c2c66affSColin Finck case 0xC00000A3: return "STATUS_DEVICE_NOT_READY"; 308c2c66affSColin Finck case 0xC00000A4: return "STATUS_INVALID_GROUP_ATTRIBUTES"; 309c2c66affSColin Finck case 0xC00000A5: return "STATUS_BAD_IMPERSONATION_LEVEL"; 310c2c66affSColin Finck case 0xC00000A6: return "STATUS_CANT_OPEN_ANONYMOUS"; 311c2c66affSColin Finck case 0xC00000A7: return "STATUS_BAD_VALIDATION_CLASS"; 312c2c66affSColin Finck case 0xC00000A8: return "STATUS_BAD_TOKEN_TYPE"; 313c2c66affSColin Finck case 0xC00000A9: return "STATUS_BAD_MASTER_BOOT_RECORD"; 314c2c66affSColin Finck case 0xC00000AA: return "STATUS_INSTRUCTION_MISALIGNMENT"; 315c2c66affSColin Finck case 0xC00000AB: return "STATUS_INSTANCE_NOT_AVAILABLE"; 316c2c66affSColin Finck case 0xC00000AC: return "STATUS_PIPE_NOT_AVAILABLE"; 317c2c66affSColin Finck case 0xC00000AD: return "STATUS_INVALID_PIPE_STATE"; 318c2c66affSColin Finck case 0xC00000AE: return "STATUS_PIPE_BUSY"; 319c2c66affSColin Finck case 0xC00000AF: return "STATUS_ILLEGAL_FUNCTION"; 320c2c66affSColin Finck case 0xC00000B0: return "STATUS_PIPE_DISCONNECTED"; 321c2c66affSColin Finck case 0xC00000B1: return "STATUS_PIPE_CLOSING"; 322c2c66affSColin Finck case 0xC00000B2: return "STATUS_PIPE_CONNECTED"; 323c2c66affSColin Finck case 0xC00000B3: return "STATUS_PIPE_LISTENING"; 324c2c66affSColin Finck case 0xC00000B4: return "STATUS_INVALID_READ_MODE"; 325c2c66affSColin Finck case 0xC00000B5: return "STATUS_IO_TIMEOUT"; 326c2c66affSColin Finck case 0xC00000B6: return "STATUS_FILE_FORCED_CLOSED"; 327c2c66affSColin Finck case 0xC00000B7: return "STATUS_PROFILING_NOT_STARTED"; 328c2c66affSColin Finck case 0xC00000B8: return "STATUS_PROFILING_NOT_STOPPED"; 329c2c66affSColin Finck case 0xC00000B9: return "STATUS_COULD_NOT_INTERPRET"; 330c2c66affSColin Finck case 0xC00000BA: return "STATUS_FILE_IS_A_DIRECTORY"; 331c2c66affSColin Finck case 0xC00000BB: return "STATUS_NOT_SUPPORTED"; 332c2c66affSColin Finck case 0xC00000BC: return "STATUS_REMOTE_NOT_LISTENING"; 333c2c66affSColin Finck case 0xC00000BD: return "STATUS_DUPLICATE_NAME"; 334c2c66affSColin Finck case 0xC00000BE: return "STATUS_BAD_NETWORK_PATH"; 335c2c66affSColin Finck case 0xC00000BF: return "STATUS_NETWORK_BUSY"; 336c2c66affSColin Finck case 0xC00000C0: return "STATUS_DEVICE_DOES_NOT_EXIST"; 337c2c66affSColin Finck case 0xC00000C1: return "STATUS_TOO_MANY_COMMANDS"; 338c2c66affSColin Finck case 0xC00000C2: return "STATUS_ADAPTER_HARDWARE_ERROR"; 339c2c66affSColin Finck case 0xC00000C3: return "STATUS_INVALID_NETWORK_RESPONSE"; 340c2c66affSColin Finck case 0xC00000C4: return "STATUS_UNEXPECTED_NETWORK_ERROR"; 341c2c66affSColin Finck case 0xC00000C5: return "STATUS_BAD_REMOTE_ADAPTER"; 342c2c66affSColin Finck case 0xC00000C6: return "STATUS_PRINT_QUEUE_FULL"; 343c2c66affSColin Finck case 0xC00000C7: return "STATUS_NO_SPOOL_SPACE"; 344c2c66affSColin Finck case 0xC00000C8: return "STATUS_PRINT_CANCELLED"; 345c2c66affSColin Finck case 0xC00000C9: return "STATUS_NETWORK_NAME_DELETED"; 346c2c66affSColin Finck case 0xC00000CA: return "STATUS_NETWORK_ACCESS_DENIED"; 347c2c66affSColin Finck case 0xC00000CB: return "STATUS_BAD_DEVICE_TYPE"; 348c2c66affSColin Finck case 0xC00000CC: return "STATUS_BAD_NETWORK_NAME"; 349c2c66affSColin Finck case 0xC00000CD: return "STATUS_TOO_MANY_NAMES"; 350c2c66affSColin Finck case 0xC00000CE: return "STATUS_TOO_MANY_SESSIONS"; 351c2c66affSColin Finck case 0xC00000CF: return "STATUS_SHARING_PAUSED"; 352c2c66affSColin Finck case 0xC00000D0: return "STATUS_REQUEST_NOT_ACCEPTED"; 353c2c66affSColin Finck case 0xC00000D1: return "STATUS_REDIRECTOR_PAUSED"; 354c2c66affSColin Finck case 0xC00000D2: return "STATUS_NET_WRITE_FAULT"; 355c2c66affSColin Finck case 0xC00000D3: return "STATUS_PROFILING_AT_LIMIT"; 356c2c66affSColin Finck case 0xC00000D4: return "STATUS_NOT_SAME_DEVICE"; 357c2c66affSColin Finck case 0xC00000D5: return "STATUS_FILE_RENAMED"; 358c2c66affSColin Finck case 0xC00000D6: return "STATUS_VIRTUAL_CIRCUIT_CLOSED"; 359c2c66affSColin Finck case 0xC00000D7: return "STATUS_NO_SECURITY_ON_OBJECT"; 360c2c66affSColin Finck case 0xC00000D8: return "STATUS_CANT_WAIT"; 361c2c66affSColin Finck case 0xC00000D9: return "STATUS_PIPE_EMPTY"; 362c2c66affSColin Finck case 0xC00000DA: return "STATUS_CANT_ACCESS_DOMAIN_INFO"; 363c2c66affSColin Finck case 0xC00000DB: return "STATUS_CANT_TERMINATE_SELF"; 364c2c66affSColin Finck case 0xC00000DC: return "STATUS_INVALID_SERVER_STATE"; 365c2c66affSColin Finck case 0xC00000DD: return "STATUS_INVALID_DOMAIN_STATE"; 366c2c66affSColin Finck case 0xC00000DE: return "STATUS_INVALID_DOMAIN_ROLE"; 367c2c66affSColin Finck case 0xC00000DF: return "STATUS_NO_SUCH_DOMAIN"; 368c2c66affSColin Finck case 0xC00000E0: return "STATUS_DOMAIN_EXISTS"; 369c2c66affSColin Finck case 0xC00000E1: return "STATUS_DOMAIN_LIMIT_EXCEEDED"; 370c2c66affSColin Finck case 0xC00000E2: return "STATUS_OPLOCK_NOT_GRANTED"; 371c2c66affSColin Finck case 0xC00000E3: return "STATUS_INVALID_OPLOCK_PROTOCOL"; 372c2c66affSColin Finck case 0xC00000E4: return "STATUS_INTERNAL_DB_CORRUPTION"; 373c2c66affSColin Finck case 0xC00000E5: return "STATUS_INTERNAL_ERROR"; 374c2c66affSColin Finck case 0xC00000E6: return "STATUS_GENERIC_NOT_MAPPED"; 375c2c66affSColin Finck case 0xC00000E7: return "STATUS_BAD_DESCRIPTOR_FORMAT"; 376c2c66affSColin Finck case 0xC00000E8: return "STATUS_INVALID_USER_BUFFER"; 377c2c66affSColin Finck case 0xC00000E9: return "STATUS_UNEXPECTED_IO_ERROR"; 378c2c66affSColin Finck case 0xC00000EA: return "STATUS_UNEXPECTED_MM_CREATE_ERR"; 379c2c66affSColin Finck case 0xC00000EB: return "STATUS_UNEXPECTED_MM_MAP_ERROR"; 380c2c66affSColin Finck case 0xC00000EC: return "STATUS_UNEXPECTED_MM_EXTEND_ERR"; 381c2c66affSColin Finck case 0xC00000ED: return "STATUS_NOT_LOGON_PROCESS"; 382c2c66affSColin Finck case 0xC00000EE: return "STATUS_LOGON_SESSION_EXISTS"; 383c2c66affSColin Finck case 0xC00000EF: return "STATUS_INVALID_PARAMETER_1"; 384c2c66affSColin Finck case 0xC00000F0: return "STATUS_INVALID_PARAMETER_2"; 385c2c66affSColin Finck case 0xC00000F1: return "STATUS_INVALID_PARAMETER_3"; 386c2c66affSColin Finck case 0xC00000F2: return "STATUS_INVALID_PARAMETER_4"; 387c2c66affSColin Finck case 0xC00000F3: return "STATUS_INVALID_PARAMETER_5"; 388c2c66affSColin Finck case 0xC00000F4: return "STATUS_INVALID_PARAMETER_6"; 389c2c66affSColin Finck case 0xC00000F5: return "STATUS_INVALID_PARAMETER_7"; 390c2c66affSColin Finck case 0xC00000F6: return "STATUS_INVALID_PARAMETER_8"; 391c2c66affSColin Finck case 0xC00000F7: return "STATUS_INVALID_PARAMETER_9"; 392c2c66affSColin Finck case 0xC00000F8: return "STATUS_INVALID_PARAMETER_10"; 393c2c66affSColin Finck case 0xC00000F9: return "STATUS_INVALID_PARAMETER_11"; 394c2c66affSColin Finck case 0xC00000FA: return "STATUS_INVALID_PARAMETER_12"; 395c2c66affSColin Finck case 0xC00000FB: return "STATUS_REDIRECTOR_NOT_STARTED"; 396c2c66affSColin Finck case 0xC00000FC: return "STATUS_REDIRECTOR_STARTED"; 397c2c66affSColin Finck case 0xC00000FD: return "STATUS_STACK_OVERFLOW"; 398c2c66affSColin Finck case 0xC00000FE: return "STATUS_NO_SUCH_PACKAGE"; 399c2c66affSColin Finck case 0xC00000FF: return "STATUS_BAD_FUNCTION_TABLE"; 400c2c66affSColin Finck case 0xC0000100: return "STATUS_VARIABLE_NOT_FOUND"; 401c2c66affSColin Finck case 0xC0000101: return "STATUS_DIRECTORY_NOT_EMPTY"; 402c2c66affSColin Finck case 0xC0000102: return "STATUS_FILE_CORRUPT_ERROR"; 403c2c66affSColin Finck case 0xC0000103: return "STATUS_NOT_A_DIRECTORY"; 404c2c66affSColin Finck case 0xC0000104: return "STATUS_BAD_LOGON_SESSION_STATE"; 405c2c66affSColin Finck case 0xC0000105: return "STATUS_LOGON_SESSION_COLLISION"; 406c2c66affSColin Finck case 0xC0000106: return "STATUS_NAME_TOO_LONG"; 407c2c66affSColin Finck case 0xC0000107: return "STATUS_FILES_OPEN"; 408c2c66affSColin Finck case 0xC0000108: return "STATUS_CONNECTION_IN_USE"; 409c2c66affSColin Finck case 0xC0000109: return "STATUS_MESSAGE_NOT_FOUND"; 410c2c66affSColin Finck case 0xC000010A: return "STATUS_PROCESS_IS_TERMINATING"; 411c2c66affSColin Finck case 0xC000010B: return "STATUS_INVALID_LOGON_TYPE"; 412c2c66affSColin Finck case 0xC000010C: return "STATUS_NO_GUID_TRANSLATION"; 413c2c66affSColin Finck case 0xC000010D: return "STATUS_CANNOT_IMPERSONATE"; 414c2c66affSColin Finck case 0xC000010E: return "STATUS_IMAGE_ALREADY_LOADED"; 415c2c66affSColin Finck case 0xC000010F: return "STATUS_ABIOS_NOT_PRESENT"; 416c2c66affSColin Finck case 0xC0000110: return "STATUS_ABIOS_LID_NOT_EXIST"; 417c2c66affSColin Finck case 0xC0000111: return "STATUS_ABIOS_LID_ALREADY_OWNED"; 418c2c66affSColin Finck case 0xC0000112: return "STATUS_ABIOS_NOT_LID_OWNER"; 419c2c66affSColin Finck case 0xC0000113: return "STATUS_ABIOS_INVALID_COMMAND"; 420c2c66affSColin Finck case 0xC0000114: return "STATUS_ABIOS_INVALID_LID"; 421c2c66affSColin Finck case 0xC0000115: return "STATUS_ABIOS_SELECTOR_NOT_AVAILABLE"; 422c2c66affSColin Finck case 0xC0000116: return "STATUS_ABIOS_INVALID_SELECTOR"; 423c2c66affSColin Finck case 0xC0000117: return "STATUS_NO_LDT"; 424c2c66affSColin Finck case 0xC0000118: return "STATUS_INVALID_LDT_SIZE"; 425c2c66affSColin Finck case 0xC0000119: return "STATUS_INVALID_LDT_OFFSET"; 426c2c66affSColin Finck case 0xC000011A: return "STATUS_INVALID_LDT_DESCRIPTOR"; 427c2c66affSColin Finck case 0xC000011B: return "STATUS_INVALID_IMAGE_NE_FORMAT"; 428c2c66affSColin Finck case 0xC000011C: return "STATUS_RXACT_INVALID_STATE"; 429c2c66affSColin Finck case 0xC000011D: return "STATUS_RXACT_COMMIT_FAILURE"; 430c2c66affSColin Finck case 0xC000011E: return "STATUS_MAPPED_FILE_SIZE_ZERO"; 431c2c66affSColin Finck case 0xC000011F: return "STATUS_TOO_MANY_OPENED_FILES"; 432c2c66affSColin Finck case 0xC0000120: return "STATUS_CANCELLED"; 433c2c66affSColin Finck case 0xC0000121: return "STATUS_CANNOT_DELETE"; 434c2c66affSColin Finck case 0xC0000122: return "STATUS_INVALID_COMPUTER_NAME"; 435c2c66affSColin Finck case 0xC0000123: return "STATUS_FILE_DELETED"; 436c2c66affSColin Finck case 0xC0000124: return "STATUS_SPECIAL_ACCOUNT"; 437c2c66affSColin Finck case 0xC0000125: return "STATUS_SPECIAL_GROUP"; 438c2c66affSColin Finck case 0xC0000126: return "STATUS_SPECIAL_USER"; 439c2c66affSColin Finck case 0xC0000127: return "STATUS_MEMBERS_PRIMARY_GROUP"; 440c2c66affSColin Finck case 0xC0000128: return "STATUS_FILE_CLOSED"; 441c2c66affSColin Finck case 0xC0000129: return "STATUS_TOO_MANY_THREADS"; 442c2c66affSColin Finck case 0xC000012A: return "STATUS_THREAD_NOT_IN_PROCESS"; 443c2c66affSColin Finck case 0xC000012B: return "STATUS_TOKEN_ALREADY_IN_USE"; 444c2c66affSColin Finck case 0xC000012C: return "STATUS_PAGEFILE_QUOTA_EXCEEDED"; 445c2c66affSColin Finck case 0xC000012D: return "STATUS_COMMITMENT_LIMIT"; 446c2c66affSColin Finck case 0xC000012E: return "STATUS_INVALID_IMAGE_LE_FORMAT"; 447c2c66affSColin Finck case 0xC000012F: return "STATUS_INVALID_IMAGE_NOT_MZ"; 448c2c66affSColin Finck case 0xC0000130: return "STATUS_INVALID_IMAGE_PROTECT"; 449c2c66affSColin Finck case 0xC0000131: return "STATUS_INVALID_IMAGE_WIN_16"; 450c2c66affSColin Finck case 0xC0000132: return "STATUS_LOGON_SERVER_CONFLICT"; 451c2c66affSColin Finck case 0xC0000133: return "STATUS_TIME_DIFFERENCE_AT_DC"; 452c2c66affSColin Finck case 0xC0000134: return "STATUS_SYNCHRONIZATION_REQUIRED"; 453c2c66affSColin Finck case 0xC0000135: return "STATUS_DLL_NOT_FOUND"; 454c2c66affSColin Finck case 0xC0000136: return "STATUS_OPEN_FAILED"; 455c2c66affSColin Finck case 0xC0000137: return "STATUS_IO_PRIVILEGE_FAILED"; 456c2c66affSColin Finck case 0xC0000138: return "STATUS_ORDINAL_NOT_FOUND"; 457c2c66affSColin Finck case 0xC0000139: return "STATUS_ENTRYPOINT_NOT_FOUND"; 458c2c66affSColin Finck case 0xC000013A: return "STATUS_CONTROL_C_EXIT"; 459c2c66affSColin Finck case 0xC000013B: return "STATUS_LOCAL_DISCONNECT"; 460c2c66affSColin Finck case 0xC000013C: return "STATUS_REMOTE_DISCONNECT"; 461c2c66affSColin Finck case 0xC000013D: return "STATUS_REMOTE_RESOURCES"; 462c2c66affSColin Finck case 0xC000013E: return "STATUS_LINK_FAILED"; 463c2c66affSColin Finck case 0xC000013F: return "STATUS_LINK_TIMEOUT"; 464c2c66affSColin Finck case 0xC0000140: return "STATUS_INVALID_CONNECTION"; 465c2c66affSColin Finck case 0xC0000141: return "STATUS_INVALID_ADDRESS"; 466c2c66affSColin Finck case 0xC0000142: return "STATUS_DLL_INIT_FAILED"; 467c2c66affSColin Finck case 0xC0000143: return "STATUS_MISSING_SYSTEMFILE"; 468c2c66affSColin Finck case 0xC0000144: return "STATUS_UNHANDLED_EXCEPTION"; 469c2c66affSColin Finck case 0xC0000145: return "STATUS_APP_INIT_FAILURE"; 470c2c66affSColin Finck case 0xC0000146: return "STATUS_PAGEFILE_CREATE_FAILED"; 471c2c66affSColin Finck case 0xC0000147: return "STATUS_NO_PAGEFILE"; 472c2c66affSColin Finck case 0xC0000148: return "STATUS_INVALID_LEVEL"; 473c2c66affSColin Finck case 0xC0000149: return "STATUS_WRONG_PASSWORD_CORE"; 474c2c66affSColin Finck case 0xC000014A: return "STATUS_ILLEGAL_FLOAT_CONTEXT"; 475c2c66affSColin Finck case 0xC000014B: return "STATUS_PIPE_BROKEN"; 476c2c66affSColin Finck case 0xC000014C: return "STATUS_REGISTRY_CORRUPT"; 477c2c66affSColin Finck case 0xC000014D: return "STATUS_REGISTRY_IO_FAILED"; 478c2c66affSColin Finck case 0xC000014E: return "STATUS_NO_EVENT_PAIR"; 479c2c66affSColin Finck case 0xC000014F: return "STATUS_UNRECOGNIZED_VOLUME"; 480c2c66affSColin Finck case 0xC0000150: return "STATUS_SERIAL_NO_DEVICE_INITED"; 481c2c66affSColin Finck case 0xC0000151: return "STATUS_NO_SUCH_ALIAS"; 482c2c66affSColin Finck case 0xC0000152: return "STATUS_MEMBER_NOT_IN_ALIAS"; 483c2c66affSColin Finck case 0xC0000153: return "STATUS_MEMBER_IN_ALIAS"; 484c2c66affSColin Finck case 0xC0000154: return "STATUS_ALIAS_EXISTS"; 485c2c66affSColin Finck case 0xC0000155: return "STATUS_LOGON_NOT_GRANTED"; 486c2c66affSColin Finck case 0xC0000156: return "STATUS_TOO_MANY_SECRETS"; 487c2c66affSColin Finck case 0xC0000157: return "STATUS_SECRET_TOO_LONG"; 488c2c66affSColin Finck case 0xC0000158: return "STATUS_INTERNAL_DB_ERROR"; 489c2c66affSColin Finck case 0xC0000159: return "STATUS_FULLSCREEN_MODE"; 490c2c66affSColin Finck case 0xC000015A: return "STATUS_TOO_MANY_CONTEXT_IDS"; 491c2c66affSColin Finck case 0xC000015B: return "STATUS_LOGON_TYPE_NOT_GRANTED"; 492c2c66affSColin Finck case 0xC000015C: return "STATUS_NOT_REGISTRY_FILE"; 493c2c66affSColin Finck case 0xC000015D: return "STATUS_NT_CROSS_ENCRYPTION_REQUIRED"; 494c2c66affSColin Finck case 0xC000015E: return "STATUS_DOMAIN_CTRLR_CONFIG_ERROR"; 495c2c66affSColin Finck case 0xC000015F: return "STATUS_FT_MISSING_MEMBER"; 496c2c66affSColin Finck case 0xC0000160: return "STATUS_ILL_FORMED_SERVICE_ENTRY"; 497c2c66affSColin Finck case 0xC0000161: return "STATUS_ILLEGAL_CHARACTER"; 498c2c66affSColin Finck case 0xC0000162: return "STATUS_UNMAPPABLE_CHARACTER"; 499c2c66affSColin Finck case 0xC0000163: return "STATUS_UNDEFINED_CHARACTER"; 500c2c66affSColin Finck case 0xC0000164: return "STATUS_FLOPPY_VOLUME"; 501c2c66affSColin Finck case 0xC0000165: return "STATUS_FLOPPY_ID_MARK_NOT_FOUND"; 502c2c66affSColin Finck case 0xC0000166: return "STATUS_FLOPPY_WRONG_CYLINDER"; 503c2c66affSColin Finck case 0xC0000167: return "STATUS_FLOPPY_UNKNOWN_ERROR"; 504c2c66affSColin Finck case 0xC0000168: return "STATUS_FLOPPY_BAD_REGISTERS"; 505c2c66affSColin Finck case 0xC0000169: return "STATUS_DISK_RECALIBRATE_FAILED"; 506c2c66affSColin Finck case 0xC000016A: return "STATUS_DISK_OPERATION_FAILED"; 507c2c66affSColin Finck case 0xC000016B: return "STATUS_DISK_RESET_FAILED"; 508c2c66affSColin Finck case 0xC000016C: return "STATUS_SHARED_IRQ_BUSY"; 509c2c66affSColin Finck case 0xC000016D: return "STATUS_FT_ORPHANING"; 510c2c66affSColin Finck case 0xC000016E: return "STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT"; 511c2c66affSColin Finck case 0xC0000172: return "STATUS_PARTITION_FAILURE"; 512c2c66affSColin Finck case 0xC0000173: return "STATUS_INVALID_BLOCK_LENGTH"; 513c2c66affSColin Finck case 0xC0000174: return "STATUS_DEVICE_NOT_PARTITIONED"; 514c2c66affSColin Finck case 0xC0000175: return "STATUS_UNABLE_TO_LOCK_MEDIA"; 515c2c66affSColin Finck case 0xC0000176: return "STATUS_UNABLE_TO_UNLOAD_MEDIA"; 516c2c66affSColin Finck case 0xC0000177: return "STATUS_EOM_OVERFLOW"; 517c2c66affSColin Finck case 0xC0000178: return "STATUS_NO_MEDIA"; 518c2c66affSColin Finck case 0xC000017A: return "STATUS_NO_SUCH_MEMBER"; 519c2c66affSColin Finck case 0xC000017B: return "STATUS_INVALID_MEMBER"; 520c2c66affSColin Finck case 0xC000017C: return "STATUS_KEY_DELETED"; 521c2c66affSColin Finck case 0xC000017D: return "STATUS_NO_LOG_SPACE"; 522c2c66affSColin Finck case 0xC000017E: return "STATUS_TOO_MANY_SIDS"; 523c2c66affSColin Finck case 0xC000017F: return "STATUS_LM_CROSS_ENCRYPTION_REQUIRED"; 524c2c66affSColin Finck case 0xC0000180: return "STATUS_KEY_HAS_CHILDREN"; 525c2c66affSColin Finck case 0xC0000181: return "STATUS_CHILD_MUST_BE_VOLATILE"; 526c2c66affSColin Finck case 0xC0000182: return "STATUS_DEVICE_CONFIGURATION_ERROR"; 527c2c66affSColin Finck case 0xC0000183: return "STATUS_DRIVER_INTERNAL_ERROR"; 528c2c66affSColin Finck case 0xC0000184: return "STATUS_INVALID_DEVICE_STATE"; 529c2c66affSColin Finck case 0xC0000185: return "STATUS_IO_DEVICE_ERROR"; 530c2c66affSColin Finck case 0xC0000186: return "STATUS_DEVICE_PROTOCOL_ERROR"; 531c2c66affSColin Finck case 0xC0000187: return "STATUS_BACKUP_CONTROLLER"; 532c2c66affSColin Finck case 0xC0000188: return "STATUS_LOG_FILE_FULL"; 533c2c66affSColin Finck case 0xC0000189: return "STATUS_TOO_LATE"; 534c2c66affSColin Finck case 0xC000018A: return "STATUS_NO_TRUST_LSA_SECRET"; 535c2c66affSColin Finck case 0xC000018B: return "STATUS_NO_TRUST_SAM_ACCOUNT"; 536c2c66affSColin Finck case 0xC000018C: return "STATUS_TRUSTED_DOMAIN_FAILURE"; 537c2c66affSColin Finck case 0xC000018D: return "STATUS_TRUSTED_RELATIONSHIP_FAILURE"; 538c2c66affSColin Finck case 0xC000018E: return "STATUS_EVENTLOG_FILE_CORRUPT"; 539c2c66affSColin Finck case 0xC000018F: return "STATUS_EVENTLOG_CANT_START"; 540c2c66affSColin Finck case 0xC0000190: return "STATUS_TRUST_FAILURE"; 541c2c66affSColin Finck case 0xC0000191: return "STATUS_MUTANT_LIMIT_EXCEEDED"; 542c2c66affSColin Finck case 0xC0000192: return "STATUS_NETLOGON_NOT_STARTED"; 543c2c66affSColin Finck case 0xC0000193: return "STATUS_ACCOUNT_EXPIRED"; 544c2c66affSColin Finck case 0xC0000194: return "STATUS_POSSIBLE_DEADLOCK"; 545c2c66affSColin Finck case 0xC0000195: return "STATUS_NETWORK_CREDENTIAL_CONFLICT"; 546c2c66affSColin Finck case 0xC0000196: return "STATUS_REMOTE_SESSION_LIMIT"; 547c2c66affSColin Finck case 0xC0000197: return "STATUS_EVENTLOG_FILE_CHANGED"; 548c2c66affSColin Finck case 0xC0000198: return "STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT"; 549c2c66affSColin Finck case 0xC0000199: return "STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT"; 550c2c66affSColin Finck case 0xC000019A: return "STATUS_NOLOGON_SERVER_TRUST_ACCOUNT"; 551c2c66affSColin Finck case 0xC000019B: return "STATUS_DOMAIN_TRUST_INCONSISTENT"; 552c2c66affSColin Finck case 0xC000019C: return "STATUS_FS_DRIVER_REQUIRED"; 553c2c66affSColin Finck case 0xC0000202: return "STATUS_NO_USER_SESSION_KEY"; 554c2c66affSColin Finck case 0xC0000203: return "STATUS_USER_SESSION_DELETED"; 555c2c66affSColin Finck case 0xC0000204: return "STATUS_RESOURCE_LANG_NOT_FOUND"; 556c2c66affSColin Finck case 0xC0000205: return "STATUS_INSUFF_SERVER_RESOURCES"; 557c2c66affSColin Finck case 0xC0000206: return "STATUS_INVALID_BUFFER_SIZE"; 558c2c66affSColin Finck case 0xC0000207: return "STATUS_INVALID_ADDRESS_COMPONENT"; 559c2c66affSColin Finck case 0xC0000208: return "STATUS_INVALID_ADDRESS_WILDCARD"; 560c2c66affSColin Finck case 0xC0000209: return "STATUS_TOO_MANY_ADDRESSES"; 561c2c66affSColin Finck case 0xC000020A: return "STATUS_ADDRESS_ALREADY_EXISTS"; 562c2c66affSColin Finck case 0xC000020B: return "STATUS_ADDRESS_CLOSED"; 563c2c66affSColin Finck case 0xC000020C: return "STATUS_CONNECTION_DISCONNECTED"; 564c2c66affSColin Finck case 0xC000020D: return "STATUS_CONNECTION_RESET"; 565c2c66affSColin Finck case 0xC000020E: return "STATUS_TOO_MANY_NODES"; 566c2c66affSColin Finck case 0xC000020F: return "STATUS_TRANSACTION_ABORTED"; 567c2c66affSColin Finck case 0xC0000210: return "STATUS_TRANSACTION_TIMED_OUT"; 568c2c66affSColin Finck case 0xC0000211: return "STATUS_TRANSACTION_NO_RELEASE"; 569c2c66affSColin Finck case 0xC0000212: return "STATUS_TRANSACTION_NO_MATCH"; 570c2c66affSColin Finck case 0xC0000213: return "STATUS_TRANSACTION_RESPONDED"; 571c2c66affSColin Finck case 0xC0000214: return "STATUS_TRANSACTION_INVALID_ID"; 572c2c66affSColin Finck case 0xC0000215: return "STATUS_TRANSACTION_INVALID_TYPE"; 573c2c66affSColin Finck case 0xC0000216: return "STATUS_NOT_SERVER_SESSION"; 574c2c66affSColin Finck case 0xC0000217: return "STATUS_NOT_CLIENT_SESSION"; 575c2c66affSColin Finck case 0xC0000218: return "STATUS_CANNOT_LOAD_REGISTRY_FILE"; 576c2c66affSColin Finck case 0xC0000219: return "STATUS_DEBUG_ATTACH_FAILED"; 577c2c66affSColin Finck case 0xC000021A: return "STATUS_SYSTEM_PROCESS_TERMINATED"; 578c2c66affSColin Finck case 0xC000021B: return "STATUS_DATA_NOT_ACCEPTED"; 579c2c66affSColin Finck case 0xC000021C: return "STATUS_NO_BROWSER_SERVERS_FOUND"; 580c2c66affSColin Finck case 0xC000021D: return "STATUS_VDM_HARD_ERROR"; 581c2c66affSColin Finck case 0xC000021E: return "STATUS_DRIVER_CANCEL_TIMEOUT"; 582c2c66affSColin Finck case 0xC000021F: return "STATUS_REPLY_MESSAGE_MISMATCH"; 583c2c66affSColin Finck case 0xC0000220: return "STATUS_MAPPED_ALIGNMENT"; 584c2c66affSColin Finck case 0xC0000221: return "STATUS_IMAGE_CHECKSUM_MISMATCH"; 585c2c66affSColin Finck case 0xC0000222: return "STATUS_LOST_WRITEBEHIND_DATA"; 586c2c66affSColin Finck case 0xC0000223: return "STATUS_CLIENT_SERVER_PARAMETERS_INVALID"; 587c2c66affSColin Finck case 0xC0000224: return "STATUS_PASSWORD_MUST_CHANGE"; 588c2c66affSColin Finck case 0xC0000225: return "STATUS_NOT_FOUND"; 589c2c66affSColin Finck case 0xC0000226: return "STATUS_NOT_TINY_STREAM"; 590c2c66affSColin Finck case 0xC0000227: return "STATUS_RECOVERY_FAILURE"; 591c2c66affSColin Finck case 0xC0000228: return "STATUS_STACK_OVERFLOW_READ"; 592c2c66affSColin Finck case 0xC0000229: return "STATUS_FAIL_CHECK"; 593c2c66affSColin Finck case 0xC000022A: return "STATUS_DUPLICATE_OBJECTID"; 594c2c66affSColin Finck case 0xC000022B: return "STATUS_OBJECTID_EXISTS"; 595c2c66affSColin Finck case 0xC000022C: return "STATUS_CONVERT_TO_LARGE"; 596c2c66affSColin Finck case 0xC000022D: return "STATUS_RETRY"; 597c2c66affSColin Finck case 0xC000022E: return "STATUS_FOUND_OUT_OF_SCOPE"; 598c2c66affSColin Finck case 0xC000022F: return "STATUS_ALLOCATE_BUCKET"; 599c2c66affSColin Finck case 0xC0000230: return "STATUS_PROPSET_NOT_FOUND"; 600c2c66affSColin Finck case 0xC0000231: return "STATUS_MARSHALL_OVERFLOW"; 601c2c66affSColin Finck case 0xC0000232: return "STATUS_INVALID_VARIANT"; 602c2c66affSColin Finck case 0xC0000233: return "STATUS_DOMAIN_CONTROLLER_NOT_FOUND"; 603c2c66affSColin Finck case 0xC0000234: return "STATUS_ACCOUNT_LOCKED_OUT"; 604c2c66affSColin Finck case 0xC0000235: return "STATUS_HANDLE_NOT_CLOSABLE"; 605c2c66affSColin Finck case 0xC0000236: return "STATUS_CONNECTION_REFUSED"; 606c2c66affSColin Finck case 0xC0000237: return "STATUS_GRACEFUL_DISCONNECT"; 607c2c66affSColin Finck case 0xC0000238: return "STATUS_ADDRESS_ALREADY_ASSOCIATED"; 608c2c66affSColin Finck case 0xC0000239: return "STATUS_ADDRESS_NOT_ASSOCIATED"; 609c2c66affSColin Finck case 0xC000023A: return "STATUS_CONNECTION_INVALID"; 610c2c66affSColin Finck case 0xC000023B: return "STATUS_CONNECTION_ACTIVE"; 611c2c66affSColin Finck case 0xC000023C: return "STATUS_NETWORK_UNREACHABLE"; 612c2c66affSColin Finck case 0xC000023D: return "STATUS_HOST_UNREACHABLE"; 613c2c66affSColin Finck case 0xC000023E: return "STATUS_PROTOCOL_UNREACHABLE"; 614c2c66affSColin Finck case 0xC000023F: return "STATUS_PORT_UNREACHABLE"; 615c2c66affSColin Finck case 0xC0000240: return "STATUS_REQUEST_ABORTED"; 616c2c66affSColin Finck case 0xC0000241: return "STATUS_CONNECTION_ABORTED"; 617c2c66affSColin Finck case 0xC0000242: return "STATUS_BAD_COMPRESSION_BUFFER"; 618c2c66affSColin Finck case 0xC0000243: return "STATUS_USER_MAPPED_FILE"; 619c2c66affSColin Finck case 0xC0000244: return "STATUS_AUDIT_FAILED"; 620c2c66affSColin Finck case 0xC0000245: return "STATUS_TIMER_RESOLUTION_NOT_SET"; 621c2c66affSColin Finck case 0xC0000246: return "STATUS_CONNECTION_COUNT_LIMIT"; 622c2c66affSColin Finck case 0xC0000247: return "STATUS_LOGIN_TIME_RESTRICTION"; 623c2c66affSColin Finck case 0xC0000248: return "STATUS_LOGIN_WKSTA_RESTRICTION"; 624c2c66affSColin Finck case 0xC0000249: return "STATUS_IMAGE_MP_UP_MISMATCH"; 625c2c66affSColin Finck case 0xC0000250: return "STATUS_INSUFFICIENT_LOGON_INFO"; 626c2c66affSColin Finck case 0xC0000251: return "STATUS_BAD_DLL_ENTRYPOINT"; 627c2c66affSColin Finck case 0xC0000252: return "STATUS_BAD_SERVICE_ENTRYPOINT"; 628c2c66affSColin Finck case 0xC0000253: return "STATUS_LPC_REPLY_LOST"; 629c2c66affSColin Finck case 0xC0000254: return "STATUS_IP_ADDRESS_CONFLICT1"; 630c2c66affSColin Finck case 0xC0000255: return "STATUS_IP_ADDRESS_CONFLICT2"; 631c2c66affSColin Finck case 0xC0000256: return "STATUS_REGISTRY_QUOTA_LIMIT"; 632c2c66affSColin Finck case 0xC0000257: return "STATUS_PATH_NOT_COVERED"; 633c2c66affSColin Finck case 0xC0000258: return "STATUS_NO_CALLBACK_ACTIVE"; 634c2c66affSColin Finck case 0xC0000259: return "STATUS_LICENSE_QUOTA_EXCEEDED"; 635c2c66affSColin Finck case 0xC000025A: return "STATUS_PWD_TOO_SHORT"; 636c2c66affSColin Finck case 0xC000025B: return "STATUS_PWD_TOO_RECENT"; 637c2c66affSColin Finck case 0xC000025C: return "STATUS_PWD_HISTORY_CONFLICT"; 638c2c66affSColin Finck case 0xC000025E: return "STATUS_PLUGPLAY_NO_DEVICE"; 639c2c66affSColin Finck case 0xC000025F: return "STATUS_UNSUPPORTED_COMPRESSION"; 640c2c66affSColin Finck case 0xC0000260: return "STATUS_INVALID_HW_PROFILE"; 641c2c66affSColin Finck case 0xC0000261: return "STATUS_INVALID_PLUGPLAY_DEVICE_PATH"; 642c2c66affSColin Finck case 0xC0000262: return "STATUS_DRIVER_ORDINAL_NOT_FOUND"; 643c2c66affSColin Finck case 0xC0000263: return "STATUS_DRIVER_ENTRYPOINT_NOT_FOUND"; 644c2c66affSColin Finck case 0xC0000264: return "STATUS_RESOURCE_NOT_OWNED"; 645c2c66affSColin Finck case 0xC0000265: return "STATUS_TOO_MANY_LINKS"; 646c2c66affSColin Finck case 0xC0000266: return "STATUS_QUOTA_LIST_INCONSISTENT"; 647c2c66affSColin Finck case 0xC0000267: return "STATUS_FILE_IS_OFFLINE"; 648c2c66affSColin Finck case 0xC0000268: return "STATUS_EVALUATION_EXPIRATION"; 649c2c66affSColin Finck case 0xC0000269: return "STATUS_ILLEGAL_DLL_RELOCATION"; 650c2c66affSColin Finck case 0xC000026A: return "STATUS_LICENSE_VIOLATION"; 651c2c66affSColin Finck case 0xC000026B: return "STATUS_DLL_INIT_FAILED_LOGOFF"; 652c2c66affSColin Finck case 0xC000026C: return "STATUS_DRIVER_UNABLE_TO_LOAD"; 653c2c66affSColin Finck case 0xC000026D: return "STATUS_DFS_UNAVAILABLE"; 654c2c66affSColin Finck case 0xC000026E: return "STATUS_VOLUME_DISMOUNTED"; 655c2c66affSColin Finck case 0xC000026F: return "STATUS_WX86_INTERNAL_ERROR"; 656c2c66affSColin Finck case 0xC0000270: return "STATUS_WX86_FLOAT_STACK_CHECK"; 657c2c66affSColin Finck case 0xC0000271: return "STATUS_VALIDATE_CONTINUE"; 658c2c66affSColin Finck case 0xC0000272: return "STATUS_NO_MATCH"; 659c2c66affSColin Finck case 0xC0000273: return "STATUS_NO_MORE_MATCHES"; 660c2c66affSColin Finck case 0xC0000275: return "STATUS_NOT_A_REPARSE_POINT"; 661c2c66affSColin Finck case 0xC0000276: return "STATUS_IO_REPARSE_TAG_INVALID"; 662c2c66affSColin Finck case 0xC0000277: return "STATUS_IO_REPARSE_TAG_MISMATCH"; 663c2c66affSColin Finck case 0xC0000278: return "STATUS_IO_REPARSE_DATA_INVALID"; 664c2c66affSColin Finck case 0xC0000279: return "STATUS_IO_REPARSE_TAG_NOT_HANDLED"; 665c2c66affSColin Finck case 0xC0000280: return "STATUS_REPARSE_POINT_NOT_RESOLVED"; 666c2c66affSColin Finck case 0xC0000281: return "STATUS_DIRECTORY_IS_A_REPARSE_POINT"; 667c2c66affSColin Finck case 0xC0000282: return "STATUS_RANGE_LIST_CONFLICT"; 668c2c66affSColin Finck case 0xC0000283: return "STATUS_SOURCE_ELEMENT_EMPTY"; 669c2c66affSColin Finck case 0xC0000284: return "STATUS_DESTINATION_ELEMENT_FULL"; 670c2c66affSColin Finck case 0xC0000285: return "STATUS_ILLEGAL_ELEMENT_ADDRESS"; 671c2c66affSColin Finck case 0xC0000286: return "STATUS_MAGAZINE_NOT_PRESENT"; 672c2c66affSColin Finck case 0xC0000287: return "STATUS_REINITIALIZATION_NEEDED"; 673c2c66affSColin Finck case 0x80000288: return "STATUS_DEVICE_REQUIRES_CLEANING"; 674c2c66affSColin Finck case 0x80000289: return "STATUS_DEVICE_DOOR_OPEN"; 675c2c66affSColin Finck case 0xC000028A: return "STATUS_ENCRYPTION_FAILED"; 676c2c66affSColin Finck case 0xC000028B: return "STATUS_DECRYPTION_FAILED"; 677c2c66affSColin Finck case 0xC000028C: return "STATUS_RANGE_NOT_FOUND"; 678c2c66affSColin Finck case 0xC000028D: return "STATUS_NO_RECOVERY_POLICY"; 679c2c66affSColin Finck case 0xC000028E: return "STATUS_NO_EFS"; 680c2c66affSColin Finck case 0xC000028F: return "STATUS_WRONG_EFS"; 681c2c66affSColin Finck case 0xC0000290: return "STATUS_NO_USER_KEYS"; 682c2c66affSColin Finck case 0xC0000291: return "STATUS_FILE_NOT_ENCRYPTED"; 683c2c66affSColin Finck case 0xC0000292: return "STATUS_NOT_EXPORT_FORMAT"; 684c2c66affSColin Finck case 0xC0000293: return "STATUS_FILE_ENCRYPTED"; 685c2c66affSColin Finck case 0x40000294: return "STATUS_WAKE_SYSTEM"; 686c2c66affSColin Finck case 0xC0000295: return "STATUS_WMI_GUID_NOT_FOUND"; 687c2c66affSColin Finck case 0xC0000296: return "STATUS_WMI_INSTANCE_NOT_FOUND"; 688c2c66affSColin Finck case 0xC0000297: return "STATUS_WMI_ITEMID_NOT_FOUND"; 689c2c66affSColin Finck case 0xC0000298: return "STATUS_WMI_TRY_AGAIN"; 690c2c66affSColin Finck case 0xC0000299: return "STATUS_SHARED_POLICY"; 691c2c66affSColin Finck case 0xC000029A: return "STATUS_POLICY_OBJECT_NOT_FOUND"; 692c2c66affSColin Finck case 0xC000029B: return "STATUS_POLICY_ONLY_IN_DS"; 693c2c66affSColin Finck case 0xC000029C: return "STATUS_VOLUME_NOT_UPGRADED"; 694c2c66affSColin Finck case 0xC000029D: return "STATUS_REMOTE_STORAGE_NOT_ACTIVE"; 695c2c66affSColin Finck case 0xC000029E: return "STATUS_REMOTE_STORAGE_MEDIA_ERROR"; 696c2c66affSColin Finck case 0xC000029F: return "STATUS_NO_TRACKING_SERVICE"; 697c2c66affSColin Finck case 0xC00002A0: return "STATUS_SERVER_SID_MISMATCH"; 698c2c66affSColin Finck case 0xC00002A1: return "STATUS_DS_NO_ATTRIBUTE_OR_VALUE"; 699c2c66affSColin Finck case 0xC00002A2: return "STATUS_DS_INVALID_ATTRIBUTE_SYNTAX"; 700c2c66affSColin Finck case 0xC00002A3: return "STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED"; 701c2c66affSColin Finck case 0xC00002A4: return "STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS"; 702c2c66affSColin Finck case 0xC00002A5: return "STATUS_DS_BUSY"; 703c2c66affSColin Finck case 0xC00002A6: return "STATUS_DS_UNAVAILABLE"; 704c2c66affSColin Finck case 0xC00002A7: return "STATUS_DS_NO_RIDS_ALLOCATED"; 705c2c66affSColin Finck case 0xC00002A8: return "STATUS_DS_NO_MORE_RIDS"; 706c2c66affSColin Finck case 0xC00002A9: return "STATUS_DS_INCORRECT_ROLE_OWNER"; 707c2c66affSColin Finck case 0xC00002AA: return "STATUS_DS_RIDMGR_INIT_ERROR"; 708c2c66affSColin Finck case 0xC00002AB: return "STATUS_DS_OBJ_CLASS_VIOLATION"; 709c2c66affSColin Finck case 0xC00002AC: return "STATUS_DS_CANT_ON_NON_LEAF"; 710c2c66affSColin Finck case 0xC00002AD: return "STATUS_DS_CANT_ON_RDN"; 711c2c66affSColin Finck case 0xC00002AE: return "STATUS_DS_CANT_MOD_OBJ_CLASS"; 712c2c66affSColin Finck case 0xC00002AF: return "STATUS_DS_CROSS_DOM_MOVE_FAILED"; 713c2c66affSColin Finck case 0xC00002B0: return "STATUS_DS_GC_NOT_AVAILABLE"; 714c2c66affSColin Finck case 0xC00002B1: return "STATUS_DIRECTORY_SERVICE_REQUIRED"; 715c2c66affSColin Finck case 0xC00002B2: return "STATUS_REPARSE_ATTRIBUTE_CONFLICT"; 716c2c66affSColin Finck case 0xC00002B3: return "STATUS_CANT_ENABLE_DENY_ONLY"; 717c2c66affSColin Finck case 0xC00002B4: return "STATUS_FLOAT_MULTIPLE_FAULTS"; 718c2c66affSColin Finck case 0xC00002B5: return "STATUS_FLOAT_MULTIPLE_TRAPS"; 719c2c66affSColin Finck case 0xC00002B6: return "STATUS_DEVICE_REMOVED"; 720c2c66affSColin Finck case 0xC00002B7: return "STATUS_JOURNAL_DELETE_IN_PROGRESS"; 721c2c66affSColin Finck case 0xC00002B8: return "STATUS_JOURNAL_NOT_ACTIVE"; 722c2c66affSColin Finck case 0xC00002B9: return "STATUS_NOINTERFACE"; 723c2c66affSColin Finck case 0xC00002C1: return "STATUS_DS_ADMIN_LIMIT_EXCEEDED"; 724c2c66affSColin Finck case 0xC00002C2: return "STATUS_DRIVER_FAILED_SLEEP"; 725c2c66affSColin Finck case 0xC00002C3: return "STATUS_MUTUAL_AUTHENTICATION_FAILED"; 726c2c66affSColin Finck case 0xC00002C4: return "STATUS_CORRUPT_SYSTEM_FILE"; 727c2c66affSColin Finck case 0xC00002C5: return "STATUS_DATATYPE_MISALIGNMENT_ERROR"; 728c2c66affSColin Finck case 0xC00002C6: return "STATUS_WMI_READ_ONLY"; 729c2c66affSColin Finck case 0xC00002C7: return "STATUS_WMI_SET_FAILURE"; 730c2c66affSColin Finck case 0xC00002C8: return "STATUS_COMMITMENT_MINIMUM"; 731c2c66affSColin Finck case 0xC00002C9: return "STATUS_REG_NAT_CONSUMPTION"; 732c2c66affSColin Finck case 0xC00002CA: return "STATUS_TRANSPORT_FULL"; 733c2c66affSColin Finck case 0xC00002CB: return "STATUS_DS_SAM_INIT_FAILURE"; 734c2c66affSColin Finck case 0xC00002CC: return "STATUS_ONLY_IF_CONNECTED"; 735c2c66affSColin Finck case 0xC00002CD: return "STATUS_DS_SENSITIVE_GROUP_VIOLATION"; 736c2c66affSColin Finck case 0xC00002CE: return "STATUS_PNP_RESTART_ENUMERATION"; 737c2c66affSColin Finck case 0xC00002CF: return "STATUS_JOURNAL_ENTRY_DELETED"; 738c2c66affSColin Finck case 0xC00002D0: return "STATUS_DS_CANT_MOD_PRIMARYGROUPID"; 739c2c66affSColin Finck case 0xC00002D1: return "STATUS_SYSTEM_IMAGE_BAD_SIGNATURE"; 740c2c66affSColin Finck case 0xC00002D2: return "STATUS_PNP_REBOOT_REQUIRED"; 741c2c66affSColin Finck case 0xC00002D3: return "STATUS_POWER_STATE_INVALID"; 742c2c66affSColin Finck case 0xC00002D4: return "STATUS_DS_INVALID_GROUP_TYPE"; 743c2c66affSColin Finck case 0xC00002D5: return "STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN"; 744c2c66affSColin Finck case 0xC00002D6: return "STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN"; 745c2c66affSColin Finck case 0xC00002D7: return "STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER"; 746c2c66affSColin Finck case 0xC00002D8: return "STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER"; 747c2c66affSColin Finck case 0xC00002D9: return "STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER"; 748c2c66affSColin Finck case 0xC00002DA: return "STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER"; 749c2c66affSColin Finck case 0xC00002DB: return "STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER"; 750c2c66affSColin Finck case 0xC00002DC: return "STATUS_DS_HAVE_PRIMARY_MEMBERS"; 751c2c66affSColin Finck case 0xC00002DD: return "STATUS_WMI_NOT_SUPPORTED"; 752c2c66affSColin Finck case 0xC00002DE: return "STATUS_INSUFFICIENT_POWER"; 753c2c66affSColin Finck case 0xC00002DF: return "STATUS_SAM_NEED_BOOTKEY_PASSWORD"; 754c2c66affSColin Finck case 0xC00002E0: return "STATUS_SAM_NEED_BOOTKEY_FLOPPY"; 755c2c66affSColin Finck case 0xC00002E1: return "STATUS_DS_CANT_START"; 756c2c66affSColin Finck case 0xC00002E2: return "STATUS_DS_INIT_FAILURE"; 757c2c66affSColin Finck case 0xC00002E3: return "STATUS_SAM_INIT_FAILURE"; 758c2c66affSColin Finck case 0xC00002E4: return "STATUS_DS_GC_REQUIRED"; 759c2c66affSColin Finck case 0xC00002E5: return "STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY"; 760c2c66affSColin Finck case 0xC00002E6: return "STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS"; 761c2c66affSColin Finck case 0xC00002E7: return "STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED"; 762c2c66affSColin Finck case 0xC00002E8: return "STATUS_MULTIPLE_FAULT_VIOLATION"; 763c2c66affSColin Finck case 0xC0000300: return "STATUS_NOT_SUPPORTED_ON_SBS"; 764c2c66affSColin Finck case 0xC0009898: return "STATUS_WOW_ASSERTION"; 765c2c66affSColin Finck case 0xC0010001: return "DBG_NO_STATE_CHANGE"; 766c2c66affSColin Finck case 0xC0010002: return "DBG_APP_NOT_IDLE"; 767c2c66affSColin Finck case 0xC0020001: return "RPC_NT_INVALID_STRING_BINDING"; 768c2c66affSColin Finck case 0xC0020002: return "RPC_NT_WRONG_KIND_OF_BINDING"; 769c2c66affSColin Finck case 0xC0020003: return "RPC_NT_INVALID_BINDING"; 770c2c66affSColin Finck case 0xC0020004: return "RPC_NT_PROTSEQ_NOT_SUPPORTED"; 771c2c66affSColin Finck case 0xC0020005: return "RPC_NT_INVALID_RPC_PROTSEQ"; 772c2c66affSColin Finck case 0xC0020006: return "RPC_NT_INVALID_STRING_UUID"; 773c2c66affSColin Finck case 0xC0020007: return "RPC_NT_INVALID_ENDPOINT_FORMAT"; 774c2c66affSColin Finck case 0xC0020008: return "RPC_NT_INVALID_NET_ADDR"; 775c2c66affSColin Finck case 0xC0020009: return "RPC_NT_NO_ENDPOINT_FOUND"; 776c2c66affSColin Finck case 0xC002000A: return "RPC_NT_INVALID_TIMEOUT"; 777c2c66affSColin Finck case 0xC002000B: return "RPC_NT_OBJECT_NOT_FOUND"; 778c2c66affSColin Finck case 0xC002000C: return "RPC_NT_ALREADY_REGISTERED"; 779c2c66affSColin Finck case 0xC002000D: return "RPC_NT_TYPE_ALREADY_REGISTERED"; 780c2c66affSColin Finck case 0xC002000E: return "RPC_NT_ALREADY_LISTENING"; 781c2c66affSColin Finck case 0xC002000F: return "RPC_NT_NO_PROTSEQS_REGISTERED"; 782c2c66affSColin Finck case 0xC0020010: return "RPC_NT_NOT_LISTENING"; 783c2c66affSColin Finck case 0xC0020011: return "RPC_NT_UNKNOWN_MGR_TYPE"; 784c2c66affSColin Finck case 0xC0020012: return "RPC_NT_UNKNOWN_IF"; 785c2c66affSColin Finck case 0xC0020013: return "RPC_NT_NO_BINDINGS"; 786c2c66affSColin Finck case 0xC0020014: return "RPC_NT_NO_PROTSEQS"; 787c2c66affSColin Finck case 0xC0020015: return "RPC_NT_CANT_CREATE_ENDPOINT"; 788c2c66affSColin Finck case 0xC0020016: return "RPC_NT_OUT_OF_RESOURCES"; 789c2c66affSColin Finck case 0xC0020017: return "RPC_NT_SERVER_UNAVAILABLE"; 790c2c66affSColin Finck case 0xC0020018: return "RPC_NT_SERVER_TOO_BUSY"; 791c2c66affSColin Finck case 0xC0020019: return "RPC_NT_INVALID_NETWORK_OPTIONS"; 792c2c66affSColin Finck case 0xC002001A: return "RPC_NT_NO_CALL_ACTIVE"; 793c2c66affSColin Finck case 0xC002001B: return "RPC_NT_CALL_FAILED"; 794c2c66affSColin Finck case 0xC002001C: return "RPC_NT_CALL_FAILED_DNE"; 795c2c66affSColin Finck case 0xC002001D: return "RPC_NT_PROTOCOL_ERROR"; 796c2c66affSColin Finck case 0xC002001F: return "RPC_NT_UNSUPPORTED_TRANS_SYN"; 797c2c66affSColin Finck case 0xC0020021: return "RPC_NT_UNSUPPORTED_TYPE"; 798c2c66affSColin Finck case 0xC0020022: return "RPC_NT_INVALID_TAG"; 799c2c66affSColin Finck case 0xC0020023: return "RPC_NT_INVALID_BOUND"; 800c2c66affSColin Finck case 0xC0020024: return "RPC_NT_NO_ENTRY_NAME"; 801c2c66affSColin Finck case 0xC0020025: return "RPC_NT_INVALID_NAME_SYNTAX"; 802c2c66affSColin Finck case 0xC0020026: return "RPC_NT_UNSUPPORTED_NAME_SYNTAX"; 803c2c66affSColin Finck case 0xC0020028: return "RPC_NT_UUID_NO_ADDRESS"; 804c2c66affSColin Finck case 0xC0020029: return "RPC_NT_DUPLICATE_ENDPOINT"; 805c2c66affSColin Finck case 0xC002002A: return "RPC_NT_UNKNOWN_AUTHN_TYPE"; 806c2c66affSColin Finck case 0xC002002B: return "RPC_NT_MAX_CALLS_TOO_SMALL"; 807c2c66affSColin Finck case 0xC002002C: return "RPC_NT_STRING_TOO_LONG"; 808c2c66affSColin Finck case 0xC002002D: return "RPC_NT_PROTSEQ_NOT_FOUND"; 809c2c66affSColin Finck case 0xC002002E: return "RPC_NT_PROCNUM_OUT_OF_RANGE"; 810c2c66affSColin Finck case 0xC002002F: return "RPC_NT_BINDING_HAS_NO_AUTH"; 811c2c66affSColin Finck case 0xC0020030: return "RPC_NT_UNKNOWN_AUTHN_SERVICE"; 812c2c66affSColin Finck case 0xC0020031: return "RPC_NT_UNKNOWN_AUTHN_LEVEL"; 813c2c66affSColin Finck case 0xC0020032: return "RPC_NT_INVALID_AUTH_IDENTITY"; 814c2c66affSColin Finck case 0xC0020033: return "RPC_NT_UNKNOWN_AUTHZ_SERVICE"; 815c2c66affSColin Finck case 0xC0020034: return "EPT_NT_INVALID_ENTRY"; 816c2c66affSColin Finck case 0xC0020035: return "EPT_NT_CANT_PERFORM_OP"; 817c2c66affSColin Finck case 0xC0020036: return "EPT_NT_NOT_REGISTERED"; 818c2c66affSColin Finck case 0xC0020037: return "RPC_NT_NOTHING_TO_EXPORT"; 819c2c66affSColin Finck case 0xC0020038: return "RPC_NT_INCOMPLETE_NAME"; 820c2c66affSColin Finck case 0xC0020039: return "RPC_NT_INVALID_VERS_OPTION"; 821c2c66affSColin Finck case 0xC002003A: return "RPC_NT_NO_MORE_MEMBERS"; 822c2c66affSColin Finck case 0xC002003B: return "RPC_NT_NOT_ALL_OBJS_UNEXPORTED"; 823c2c66affSColin Finck case 0xC002003C: return "RPC_NT_INTERFACE_NOT_FOUND"; 824c2c66affSColin Finck case 0xC002003D: return "RPC_NT_ENTRY_ALREADY_EXISTS"; 825c2c66affSColin Finck case 0xC002003E: return "RPC_NT_ENTRY_NOT_FOUND"; 826c2c66affSColin Finck case 0xC002003F: return "RPC_NT_NAME_SERVICE_UNAVAILABLE"; 827c2c66affSColin Finck case 0xC0020040: return "RPC_NT_INVALID_NAF_ID"; 828c2c66affSColin Finck case 0xC0020041: return "RPC_NT_CANNOT_SUPPORT"; 829c2c66affSColin Finck case 0xC0020042: return "RPC_NT_NO_CONTEXT_AVAILABLE"; 830c2c66affSColin Finck case 0xC0020043: return "RPC_NT_INTERNAL_ERROR"; 831c2c66affSColin Finck case 0xC0020044: return "RPC_NT_ZERO_DIVIDE"; 832c2c66affSColin Finck case 0xC0020045: return "RPC_NT_ADDRESS_ERROR"; 833c2c66affSColin Finck case 0xC0020046: return "RPC_NT_FP_DIV_ZERO"; 834c2c66affSColin Finck case 0xC0020047: return "RPC_NT_FP_UNDERFLOW"; 835c2c66affSColin Finck case 0xC0020048: return "RPC_NT_FP_OVERFLOW"; 836c2c66affSColin Finck case 0xC0030001: return "RPC_NT_NO_MORE_ENTRIES"; 837c2c66affSColin Finck case 0xC0030002: return "RPC_NT_SS_CHAR_TRANS_OPEN_FAIL"; 838c2c66affSColin Finck case 0xC0030003: return "RPC_NT_SS_CHAR_TRANS_SHORT_FILE"; 839c2c66affSColin Finck case 0xC0030004: return "RPC_NT_SS_IN_NULL_CONTEXT"; 840c2c66affSColin Finck case 0xC0030005: return "RPC_NT_SS_CONTEXT_MISMATCH"; 841c2c66affSColin Finck case 0xC0030006: return "RPC_NT_SS_CONTEXT_DAMAGED"; 842c2c66affSColin Finck case 0xC0030007: return "RPC_NT_SS_HANDLES_MISMATCH"; 843c2c66affSColin Finck case 0xC0030008: return "RPC_NT_SS_CANNOT_GET_CALL_HANDLE"; 844c2c66affSColin Finck case 0xC0030009: return "RPC_NT_NULL_REF_POINTER"; 845c2c66affSColin Finck case 0xC003000A: return "RPC_NT_ENUM_VALUE_OUT_OF_RANGE"; 846c2c66affSColin Finck case 0xC003000B: return "RPC_NT_BYTE_COUNT_TOO_SMALL"; 847c2c66affSColin Finck case 0xC003000C: return "RPC_NT_BAD_STUB_DATA"; 848c2c66affSColin Finck case 0xC0020049: return "RPC_NT_CALL_IN_PROGRESS"; 849c2c66affSColin Finck case 0xC002004A: return "RPC_NT_NO_MORE_BINDINGS"; 850c2c66affSColin Finck case 0xC002004B: return "RPC_NT_GROUP_MEMBER_NOT_FOUND"; 851c2c66affSColin Finck case 0xC002004C: return "EPT_NT_CANT_CREATE"; 852c2c66affSColin Finck case 0xC002004D: return "RPC_NT_INVALID_OBJECT"; 853c2c66affSColin Finck case 0xC002004F: return "RPC_NT_NO_INTERFACES"; 854c2c66affSColin Finck case 0xC0020050: return "RPC_NT_CALL_CANCELLED"; 855c2c66affSColin Finck case 0xC0020051: return "RPC_NT_BINDING_INCOMPLETE"; 856c2c66affSColin Finck case 0xC0020052: return "RPC_NT_COMM_FAILURE"; 857c2c66affSColin Finck case 0xC0020053: return "RPC_NT_UNSUPPORTED_AUTHN_LEVEL"; 858c2c66affSColin Finck case 0xC0020054: return "RPC_NT_NO_PRINC_NAME"; 859c2c66affSColin Finck case 0xC0020055: return "RPC_NT_NOT_RPC_ERROR"; 860c2c66affSColin Finck case 0x40020056: return "RPC_NT_UUID_LOCAL_ONLY"; 861c2c66affSColin Finck case 0xC0020057: return "RPC_NT_SEC_PKG_ERROR"; 862c2c66affSColin Finck case 0xC0020058: return "RPC_NT_NOT_CANCELLED"; 863c2c66affSColin Finck case 0xC0030059: return "RPC_NT_INVALID_ES_ACTION"; 864c2c66affSColin Finck case 0xC003005A: return "RPC_NT_WRONG_ES_VERSION"; 865c2c66affSColin Finck case 0xC003005B: return "RPC_NT_WRONG_STUB_VERSION"; 866c2c66affSColin Finck case 0xC003005C: return "RPC_NT_INVALID_PIPE_OBJECT"; 867c2c66affSColin Finck case 0xC003005D: return "RPC_NT_INVALID_PIPE_OPERATION"; 868c2c66affSColin Finck case 0xC003005E: return "RPC_NT_WRONG_PIPE_VERSION"; 869c2c66affSColin Finck case 0xC003005F: return "RPC_NT_PIPE_CLOSED"; 870c2c66affSColin Finck case 0xC0030060: return "RPC_NT_PIPE_DISCIPLINE_ERROR"; 871c2c66affSColin Finck case 0xC0030061: return "RPC_NT_PIPE_EMPTY"; 872c2c66affSColin Finck case 0xC0020062: return "RPC_NT_INVALID_ASYNC_HANDLE"; 873c2c66affSColin Finck case 0xC0020063: return "RPC_NT_INVALID_ASYNC_CALL"; 874c2c66affSColin Finck case 0x400200AF: return "RPC_NT_SEND_INCOMPLETE"; 875c2c66affSColin Finck case 0xC0140001: return "STATUS_ACPI_INVALID_OPCODE"; 876c2c66affSColin Finck case 0xC0140002: return "STATUS_ACPI_STACK_OVERFLOW"; 877c2c66affSColin Finck case 0xC0140003: return "STATUS_ACPI_ASSERT_FAILED"; 878c2c66affSColin Finck case 0xC0140004: return "STATUS_ACPI_INVALID_INDEX"; 879c2c66affSColin Finck case 0xC0140005: return "STATUS_ACPI_INVALID_ARGUMENT"; 880c2c66affSColin Finck case 0xC0140006: return "STATUS_ACPI_FATAL"; 881c2c66affSColin Finck case 0xC0140007: return "STATUS_ACPI_INVALID_SUPERNAME"; 882c2c66affSColin Finck case 0xC0140008: return "STATUS_ACPI_INVALID_ARGTYPE"; 883c2c66affSColin Finck case 0xC0140009: return "STATUS_ACPI_INVALID_OBJTYPE"; 884c2c66affSColin Finck case 0xC014000A: return "STATUS_ACPI_INVALID_TARGETTYPE"; 885c2c66affSColin Finck case 0xC014000B: return "STATUS_ACPI_INCORRECT_ARGUMENT_COUNT"; 886c2c66affSColin Finck case 0xC014000C: return "STATUS_ACPI_ADDRESS_NOT_MAPPED"; 887c2c66affSColin Finck case 0xC014000D: return "STATUS_ACPI_INVALID_EVENTTYPE"; 888c2c66affSColin Finck case 0xC014000E: return "STATUS_ACPI_HANDLER_COLLISION"; 889c2c66affSColin Finck case 0xC014000F: return "STATUS_ACPI_INVALID_DATA"; 890c2c66affSColin Finck case 0xC0140010: return "STATUS_ACPI_INVALID_REGION"; 891c2c66affSColin Finck case 0xC0140011: return "STATUS_ACPI_INVALID_ACCESS_SIZE"; 892c2c66affSColin Finck case 0xC0140012: return "STATUS_ACPI_ACQUIRE_GLOBAL_LOCK"; 893c2c66affSColin Finck case 0xC0140013: return "STATUS_ACPI_ALREADY_INITIALIZED"; 894c2c66affSColin Finck case 0xC0140014: return "STATUS_ACPI_NOT_INITIALIZED"; 895c2c66affSColin Finck case 0xC0140015: return "STATUS_ACPI_INVALID_MUTEX_LEVEL"; 896c2c66affSColin Finck case 0xC0140016: return "STATUS_ACPI_MUTEX_NOT_OWNED"; 897c2c66affSColin Finck case 0xC0140017: return "STATUS_ACPI_MUTEX_NOT_OWNER"; 898c2c66affSColin Finck case 0xC0140018: return "STATUS_ACPI_RS_ACCESS"; 899c2c66affSColin Finck case 0xC0140019: return "STATUS_ACPI_INVALID_TABLE"; 900c2c66affSColin Finck case 0xC0140020: return "STATUS_ACPI_REG_HANDLER_FAILED"; 901c2c66affSColin Finck case 0xC0140021: return "STATUS_ACPI_POWER_REQUEST_FAILED"; 902c2c66affSColin Finck case 0xC00A0001: return "STATUS_CTX_WINSTATION_NAME_INVALID"; 903c2c66affSColin Finck case 0xC00A0002: return "STATUS_CTX_INVALID_PD"; 904c2c66affSColin Finck case 0xC00A0003: return "STATUS_CTX_PD_NOT_FOUND"; 905c2c66affSColin Finck case 0x400A0004: return "STATUS_CTX_CDM_CONNECT"; 906c2c66affSColin Finck case 0x400A0005: return "STATUS_CTX_CDM_DISCONNECT"; 907c2c66affSColin Finck case 0xC00A0006: return "STATUS_CTX_CLOSE_PENDING"; 908c2c66affSColin Finck case 0xC00A0007: return "STATUS_CTX_NO_OUTBUF"; 909c2c66affSColin Finck case 0xC00A0008: return "STATUS_CTX_MODEM_INF_NOT_FOUND"; 910c2c66affSColin Finck case 0xC00A0009: return "STATUS_CTX_INVALID_MODEMNAME"; 911c2c66affSColin Finck case 0xC00A000A: return "STATUS_CTX_RESPONSE_ERROR"; 912c2c66affSColin Finck case 0xC00A000B: return "STATUS_CTX_MODEM_RESPONSE_TIMEOUT"; 913c2c66affSColin Finck case 0xC00A000C: return "STATUS_CTX_MODEM_RESPONSE_NO_CARRIER"; 914c2c66affSColin Finck case 0xC00A000D: return "STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE"; 915c2c66affSColin Finck case 0xC00A000E: return "STATUS_CTX_MODEM_RESPONSE_BUSY"; 916c2c66affSColin Finck case 0xC00A000F: return "STATUS_CTX_MODEM_RESPONSE_VOICE"; 917c2c66affSColin Finck case 0xC00A0010: return "STATUS_CTX_TD_ERROR"; 918c2c66affSColin Finck case 0xC00A0012: return "STATUS_CTX_LICENSE_CLIENT_INVALID"; 919c2c66affSColin Finck case 0xC00A0013: return "STATUS_CTX_LICENSE_NOT_AVAILABLE"; 920c2c66affSColin Finck case 0xC00A0014: return "STATUS_CTX_LICENSE_EXPIRED"; 921c2c66affSColin Finck case 0xC00A0015: return "STATUS_CTX_WINSTATION_NOT_FOUND"; 922c2c66affSColin Finck case 0xC00A0016: return "STATUS_CTX_WINSTATION_NAME_COLLISION"; 923c2c66affSColin Finck case 0xC00A0017: return "STATUS_CTX_WINSTATION_BUSY"; 924c2c66affSColin Finck case 0xC00A0018: return "STATUS_CTX_BAD_VIDEO_MODE"; 925c2c66affSColin Finck case 0xC00A0022: return "STATUS_CTX_GRAPHICS_INVALID"; 926c2c66affSColin Finck case 0xC00A0024: return "STATUS_CTX_NOT_CONSOLE"; 927c2c66affSColin Finck case 0xC00A0026: return "STATUS_CTX_CLIENT_QUERY_TIMEOUT"; 928c2c66affSColin Finck case 0xC00A0027: return "STATUS_CTX_CONSOLE_DISCONNECT"; 929c2c66affSColin Finck case 0xC00A0028: return "STATUS_CTX_CONSOLE_CONNECT"; 930c2c66affSColin Finck case 0xC00A002A: return "STATUS_CTX_SHADOW_DENIED"; 931c2c66affSColin Finck case 0xC00A002B: return "STATUS_CTX_WINSTATION_ACCESS_DENIED"; 932c2c66affSColin Finck case 0xC00A002E: return "STATUS_CTX_INVALID_WD"; 933c2c66affSColin Finck case 0xC00A002F: return "STATUS_CTX_WD_NOT_FOUND"; 934c2c66affSColin Finck case 0xC00A0030: return "STATUS_CTX_SHADOW_INVALID"; 935c2c66affSColin Finck case 0xC00A0031: return "STATUS_CTX_SHADOW_DISABLED"; 936c2c66affSColin Finck case 0xC00A0032: return "STATUS_RDP_PROTOCOL_ERROR"; 937c2c66affSColin Finck case 0xC00A0033: return "STATUS_CTX_CLIENT_LICENSE_NOT_SET"; 938c2c66affSColin Finck case 0xC00A0034: return "STATUS_CTX_CLIENT_LICENSE_IN_USE"; 939c2c66affSColin Finck case 0xC0040035: return "STATUS_PNP_BAD_MPS_TABLE"; 940c2c66affSColin Finck case 0xC0040036: return "STATUS_PNP_TRANSLATION_FAILED"; 941c2c66affSColin Finck case 0xC0040037: return "STATUS_PNP_IRQ_TRANSLATION_FAILED"; 942c2c66affSColin Finck default: return "STATUS_UNKNOWN"; 943c2c66affSColin Finck } 944c2c66affSColin Finck } 945c2c66affSColin Finck 946c2c66affSColin Finck /* 947c2c66affSColin Finck * Ext2ReadDisk 948c2c66affSColin Finck * Read data from disk ... 949c2c66affSColin Finck * 950c2c66affSColin Finck * ARGUMENTS: 951c2c66affSColin Finck * VolumeHandle: Volume Handle 952c2c66affSColin Finck * Offset : Disk Offset 953c2c66affSColin Finck * Length : Data Length to be read 954c2c66affSColin Finck * Buffer : ... 955c2c66affSColin Finck * 956c2c66affSColin Finck * RETURNS: 957c2c66affSColin Finck * Success: STATUS_SUCCESS 958c2c66affSColin Finck * Fail: ... 959c2c66affSColin Finck * 960c2c66affSColin Finck * NOTES: 961c2c66affSColin Finck * Both Length and Offset should be SECTOR_SIZE aligned. 962c2c66affSColin Finck */ 963c2c66affSColin Finck NTSTATUS 964c2c66affSColin Finck Ext2ReadDisk( PEXT2_FILESYS Ext2Sys, 965c2c66affSColin Finck ULONGLONG Offset, 966c2c66affSColin Finck ULONG Length, 967c2c66affSColin Finck PVOID Buffer ) 968c2c66affSColin Finck { 969c2c66affSColin Finck LARGE_INTEGER Address; 970c2c66affSColin Finck NTSTATUS Status; 971c2c66affSColin Finck ULONG AlignedLength; 972c2c66affSColin Finck 973c2c66affSColin Finck IO_STATUS_BLOCK IoStatus; 974c2c66affSColin Finck 975c2c66affSColin Finck PVOID NonPagedBuffer = NULL; 976c2c66affSColin Finck 977c2c66affSColin Finck ASSERT(Buffer != NULL); 978c2c66affSColin Finck 979c2c66affSColin Finck #if 0 980c2c66affSColin Finck if (Ext2Sys->bFile) 981c2c66affSColin Finck { 982c2c66affSColin Finck Address.QuadPart = Offset; 983c2c66affSColin Finck 984c2c66affSColin Finck Status = NtReadFile( Ext2Sys->MediaHandle, 985*bcaa33e3SSerge Gautherie NULL, 986c2c66affSColin Finck NULL, 987c2c66affSColin Finck NULL, 988c2c66affSColin Finck &IoStatus, 989c2c66affSColin Finck Buffer, 990c2c66affSColin Finck Length, 991c2c66affSColin Finck &Address, 992c2c66affSColin Finck NULL ); 993c2c66affSColin Finck } 994c2c66affSColin Finck else 995c2c66affSColin Finck #endif 996c2c66affSColin Finck { 997c2c66affSColin Finck Address.QuadPart = Offset & (~((ULONGLONG)SECTOR_SIZE - 1)); 998c2c66affSColin Finck 999c2c66affSColin Finck AlignedLength = (Length + SECTOR_SIZE - 1)&(~(SECTOR_SIZE - 1)); 1000c2c66affSColin Finck 1001c2c66affSColin Finck AlignedLength += ((ULONG)(Offset - Address.QuadPart) + SECTOR_SIZE - 1) 1002c2c66affSColin Finck & (~(SECTOR_SIZE - 1)); 1003c2c66affSColin Finck 1004c2c66affSColin Finck NonPagedBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, AlignedLength); 1005c2c66affSColin Finck if (!NonPagedBuffer) 1006c2c66affSColin Finck { 1007c2c66affSColin Finck Status = STATUS_INSUFFICIENT_RESOURCES; 1008c2c66affSColin Finck goto errorout; 1009c2c66affSColin Finck } 1010c2c66affSColin Finck 1011c2c66affSColin Finck Status = NtReadFile( Ext2Sys->MediaHandle, 1012*bcaa33e3SSerge Gautherie NULL, 1013c2c66affSColin Finck NULL, 1014c2c66affSColin Finck NULL, 1015c2c66affSColin Finck &IoStatus, 1016c2c66affSColin Finck NonPagedBuffer, 1017c2c66affSColin Finck AlignedLength, 1018c2c66affSColin Finck &Address, 1019c2c66affSColin Finck NULL ); 1020c2c66affSColin Finck 1021c2c66affSColin Finck if (!NT_SUCCESS(Status)) 1022c2c66affSColin Finck { 1023c2c66affSColin Finck goto errorout; 1024c2c66affSColin Finck } 1025c2c66affSColin Finck 1026c2c66affSColin Finck RtlCopyMemory( Buffer, 1027c2c66affSColin Finck (PUCHAR)NonPagedBuffer + (ULONG)(Offset - Address.QuadPart), 1028c2c66affSColin Finck Length ); 1029c2c66affSColin Finck } 1030c2c66affSColin Finck 1031c2c66affSColin Finck errorout: 1032c2c66affSColin Finck 1033c2c66affSColin Finck if (NonPagedBuffer) 1034c2c66affSColin Finck RtlFreeHeap(RtlGetProcessHeap(), 0, NonPagedBuffer); 1035c2c66affSColin Finck 1036c2c66affSColin Finck return Status; 1037c2c66affSColin Finck } 1038c2c66affSColin Finck 1039c2c66affSColin Finck 1040c2c66affSColin Finck /* 1041c2c66affSColin Finck * Ext2WriteDisk 1042c2c66affSColin Finck * Write data to disk ... 1043c2c66affSColin Finck * 1044c2c66affSColin Finck * ARGUMENTS: 1045c2c66affSColin Finck * VolumeHandle: Volume Handle 1046c2c66affSColin Finck * Offset : Disk Offset 1047c2c66affSColin Finck * Length : Data Length to be written 1048c2c66affSColin Finck * Buffer : Data to be written ... 1049c2c66affSColin Finck * 1050c2c66affSColin Finck * RETURNS: 1051c2c66affSColin Finck * Success: STATUS_SUCCESS 1052c2c66affSColin Finck * Fail: ... 1053c2c66affSColin Finck * 1054c2c66affSColin Finck * NOTES: 1055c2c66affSColin Finck * Both Length and Offset should be SECTOR_SIZE aligned. 1056c2c66affSColin Finck */ 1057c2c66affSColin Finck 1058c2c66affSColin Finck NTSTATUS 1059c2c66affSColin Finck Ext2WriteDisk( PEXT2_FILESYS Ext2Sys, 1060c2c66affSColin Finck ULONGLONG Offset, 1061c2c66affSColin Finck ULONG Length, 1062c2c66affSColin Finck PVOID Buffer ) 1063c2c66affSColin Finck { 1064c2c66affSColin Finck LARGE_INTEGER Address; 1065c2c66affSColin Finck NTSTATUS Status; 1066c2c66affSColin Finck ULONG AlignedLength; 1067c2c66affSColin Finck 1068c2c66affSColin Finck IO_STATUS_BLOCK IoStatus; 1069c2c66affSColin Finck 1070c2c66affSColin Finck PVOID NonPagedBuffer = NULL; 1071c2c66affSColin Finck 1072c2c66affSColin Finck ASSERT(Buffer != NULL); 1073c2c66affSColin Finck 1074c2c66affSColin Finck #if 0 1075c2c66affSColin Finck if (Ext2Sys->bFile) 1076c2c66affSColin Finck { 1077c2c66affSColin Finck Address.QuadPart = Offset; 1078c2c66affSColin Finck 1079c2c66affSColin Finck Status = NtWriteFile( Ext2Sys->MediaHandle, 1080c2c66affSColin Finck 0, 1081c2c66affSColin Finck NULL, 1082c2c66affSColin Finck NULL, 1083c2c66affSColin Finck &IoStatus, 1084c2c66affSColin Finck Buffer, 1085c2c66affSColin Finck Length, 1086c2c66affSColin Finck &Address, 1087c2c66affSColin Finck NULL ); 1088c2c66affSColin Finck } 1089c2c66affSColin Finck else 1090c2c66affSColin Finck #endif 1091c2c66affSColin Finck { 1092c2c66affSColin Finck Address.QuadPart = Offset & (~((ULONGLONG)SECTOR_SIZE - 1)); 1093c2c66affSColin Finck 1094c2c66affSColin Finck AlignedLength = (Length + SECTOR_SIZE - 1)&(~(SECTOR_SIZE - 1)); 1095c2c66affSColin Finck 1096c2c66affSColin Finck AlignedLength += ((ULONG)(Offset - Address.QuadPart) + SECTOR_SIZE - 1) 1097c2c66affSColin Finck & (~(SECTOR_SIZE - 1)); 1098c2c66affSColin Finck 1099c2c66affSColin Finck NonPagedBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, AlignedLength); 1100c2c66affSColin Finck if (!NonPagedBuffer) 1101c2c66affSColin Finck { 1102c2c66affSColin Finck Status = STATUS_INSUFFICIENT_RESOURCES; 1103c2c66affSColin Finck goto errorout; 1104c2c66affSColin Finck } 1105c2c66affSColin Finck 1106c2c66affSColin Finck if ((AlignedLength != Length) || (Address.QuadPart != (LONGLONG)Offset)) 1107c2c66affSColin Finck { 1108c2c66affSColin Finck Status = NtReadFile( Ext2Sys->MediaHandle, 1109*bcaa33e3SSerge Gautherie NULL, 1110c2c66affSColin Finck NULL, 1111c2c66affSColin Finck NULL, 1112c2c66affSColin Finck &IoStatus, 1113c2c66affSColin Finck NonPagedBuffer, 1114c2c66affSColin Finck AlignedLength, 1115c2c66affSColin Finck &Address, 1116c2c66affSColin Finck NULL ); 1117c2c66affSColin Finck 1118c2c66affSColin Finck if (!NT_SUCCESS(Status)) 1119c2c66affSColin Finck { 1120c2c66affSColin Finck goto errorout; 1121c2c66affSColin Finck } 1122c2c66affSColin Finck } 1123c2c66affSColin Finck 1124c2c66affSColin Finck RtlCopyMemory( (PUCHAR)NonPagedBuffer + (ULONG)(Offset - Address.QuadPart), 1125c2c66affSColin Finck Buffer, Length ); 1126c2c66affSColin Finck 1127c2c66affSColin Finck Status = NtWriteFile( Ext2Sys->MediaHandle, 1128c2c66affSColin Finck 0, 1129c2c66affSColin Finck NULL, 1130c2c66affSColin Finck NULL, 1131c2c66affSColin Finck &IoStatus, 1132c2c66affSColin Finck NonPagedBuffer, 1133c2c66affSColin Finck AlignedLength, 1134c2c66affSColin Finck &Address, 1135c2c66affSColin Finck NULL ); 1136c2c66affSColin Finck } 1137c2c66affSColin Finck 1138c2c66affSColin Finck errorout: 1139c2c66affSColin Finck 1140c2c66affSColin Finck if (NonPagedBuffer) 1141c2c66affSColin Finck RtlFreeHeap(RtlGetProcessHeap(), 0, NonPagedBuffer); 1142c2c66affSColin Finck 1143c2c66affSColin Finck return Status; 1144c2c66affSColin Finck } 1145c2c66affSColin Finck 1146c2c66affSColin Finck 1147c2c66affSColin Finck /* 1148c2c66affSColin Finck * Ext2GetMediaInfo 1149c2c66affSColin Finck * Get volume gemmetry information ... 1150c2c66affSColin Finck * 1151c2c66affSColin Finck * ARGUMENTS: 1152c2c66affSColin Finck * VolumeHandle: Volume handle. 1153c2c66affSColin Finck * 1154c2c66affSColin Finck * RETURNS: 1155c2c66affSColin Finck * Success or Fail 1156c2c66affSColin Finck * 1157c2c66affSColin Finck * NOTES: 1158c2c66affSColin Finck * N/A 1159c2c66affSColin Finck */ 1160c2c66affSColin Finck 1161c2c66affSColin Finck NTSTATUS 1162c2c66affSColin Finck Ext2GetMediaInfo( PEXT2_FILESYS Ext2Sys ) 1163c2c66affSColin Finck { 1164c2c66affSColin Finck NTSTATUS Status; 1165c2c66affSColin Finck IO_STATUS_BLOCK IoSb; 1166c2c66affSColin Finck 1167c2c66affSColin Finck Status = NtDeviceIoControlFile( Ext2Sys->MediaHandle, 1168c2c66affSColin Finck NULL, NULL, NULL, &IoSb, 1169c2c66affSColin Finck IOCTL_DISK_GET_DRIVE_GEOMETRY, 1170c2c66affSColin Finck &(Ext2Sys->DiskGeometry), sizeof(DISK_GEOMETRY), 1171c2c66affSColin Finck &(Ext2Sys->DiskGeometry), sizeof(DISK_GEOMETRY)); 1172c2c66affSColin Finck 1173c2c66affSColin Finck 1174c2c66affSColin Finck if (!NT_SUCCESS(Status)) 1175c2c66affSColin Finck { 1176c2c66affSColin Finck goto errorout; 1177c2c66affSColin Finck } 1178c2c66affSColin Finck 1179c2c66affSColin Finck Status = NtDeviceIoControlFile( Ext2Sys->MediaHandle, 1180c2c66affSColin Finck NULL, NULL, NULL, &IoSb, 1181c2c66affSColin Finck IOCTL_DISK_GET_PARTITION_INFO, 1182c2c66affSColin Finck &(Ext2Sys->PartInfo), sizeof(PARTITION_INFORMATION), 1183c2c66affSColin Finck &(Ext2Sys->PartInfo), sizeof(PARTITION_INFORMATION)); 1184c2c66affSColin Finck 1185c2c66affSColin Finck if (!NT_SUCCESS(Status)) 1186c2c66affSColin Finck { 1187c2c66affSColin Finck goto errorout; 1188c2c66affSColin Finck } 1189c2c66affSColin Finck 1190c2c66affSColin Finck errorout: 1191c2c66affSColin Finck 1192c2c66affSColin Finck return Status; 1193c2c66affSColin Finck } 1194c2c66affSColin Finck 1195c2c66affSColin Finck 1196c2c66affSColin Finck /* 1197c2c66affSColin Finck * Ext2LockVolume 1198c2c66affSColin Finck * Lock the volume ... 1199c2c66affSColin Finck * 1200c2c66affSColin Finck * ARGUMENTS: 1201c2c66affSColin Finck * VolumeHandle: Volume handle. 1202c2c66affSColin Finck * 1203c2c66affSColin Finck * RETURNS: 1204c2c66affSColin Finck * Success or Fail 1205c2c66affSColin Finck * 1206c2c66affSColin Finck * NOTES: 1207c2c66affSColin Finck * N/A 1208c2c66affSColin Finck */ 1209c2c66affSColin Finck 1210c2c66affSColin Finck 1211c2c66affSColin Finck NTSTATUS 1212c2c66affSColin Finck Ext2LockVolume( PEXT2_FILESYS Ext2Sys ) 1213c2c66affSColin Finck { 1214c2c66affSColin Finck NTSTATUS Status; 1215c2c66affSColin Finck IO_STATUS_BLOCK IoSb; 1216c2c66affSColin Finck 1217c2c66affSColin Finck Status = NtFsControlFile( Ext2Sys->MediaHandle, 1218c2c66affSColin Finck NULL, NULL, NULL, &IoSb, 1219c2c66affSColin Finck FSCTL_LOCK_VOLUME, 1220c2c66affSColin Finck NULL, 0, NULL, 0 ); 1221c2c66affSColin Finck 1222c2c66affSColin Finck if (!NT_SUCCESS(Status)) 1223c2c66affSColin Finck { 1224c2c66affSColin Finck DPRINT1("Mke2fs: Error when locking volume: Status = %lxh %s...\n", 1225c2c66affSColin Finck Status, Ext2StatusToString(Status)); 1226c2c66affSColin Finck 1227c2c66affSColin Finck goto errorout; 1228c2c66affSColin Finck } 1229c2c66affSColin Finck 1230c2c66affSColin Finck errorout: 1231c2c66affSColin Finck 1232c2c66affSColin Finck return Status; 1233c2c66affSColin Finck } 1234c2c66affSColin Finck 1235c2c66affSColin Finck 1236c2c66affSColin Finck NTSTATUS 1237c2c66affSColin Finck Ext2UnLockVolume( PEXT2_FILESYS Ext2Sys ) 1238c2c66affSColin Finck { 1239c2c66affSColin Finck NTSTATUS Status; 1240c2c66affSColin Finck IO_STATUS_BLOCK IoSb; 1241c2c66affSColin Finck 1242c2c66affSColin Finck Status = NtFsControlFile( Ext2Sys->MediaHandle, 1243c2c66affSColin Finck NULL, NULL, NULL, &IoSb, 1244c2c66affSColin Finck FSCTL_UNLOCK_VOLUME, 1245c2c66affSColin Finck NULL, 0, NULL, 0 ); 1246c2c66affSColin Finck 1247c2c66affSColin Finck if (!NT_SUCCESS(Status)) 1248c2c66affSColin Finck { 1249c2c66affSColin Finck DPRINT1("Mke2fs: Error when unlocking volume ...\n"); 1250c2c66affSColin Finck goto errorout; 1251c2c66affSColin Finck } 1252c2c66affSColin Finck 1253c2c66affSColin Finck errorout: 1254c2c66affSColin Finck 1255c2c66affSColin Finck return Status; 1256c2c66affSColin Finck } 1257c2c66affSColin Finck 1258c2c66affSColin Finck 1259c2c66affSColin Finck NTSTATUS 1260c2c66affSColin Finck Ext2DisMountVolume( PEXT2_FILESYS Ext2Sys ) 1261c2c66affSColin Finck { 1262c2c66affSColin Finck NTSTATUS Status; 1263c2c66affSColin Finck IO_STATUS_BLOCK IoSb; 1264c2c66affSColin Finck 1265c2c66affSColin Finck Status = NtFsControlFile( Ext2Sys->MediaHandle, 1266c2c66affSColin Finck NULL, NULL, NULL, &IoSb, 1267c2c66affSColin Finck FSCTL_DISMOUNT_VOLUME, 1268c2c66affSColin Finck NULL, 0, NULL, 0 ); 1269c2c66affSColin Finck 1270c2c66affSColin Finck if (!NT_SUCCESS(Status)) 1271c2c66affSColin Finck { 1272c2c66affSColin Finck DPRINT1("Mke2fs: Error when dismounting volume ...\n"); 1273c2c66affSColin Finck goto errorout; 1274c2c66affSColin Finck } 1275c2c66affSColin Finck 1276c2c66affSColin Finck errorout: 1277c2c66affSColin Finck 1278c2c66affSColin Finck return Status; 1279c2c66affSColin Finck } 1280c2c66affSColin Finck 1281c2c66affSColin Finck NTSTATUS 1282c2c66affSColin Finck Ext2OpenDevice( PEXT2_FILESYS Ext2Sys, 1283c2c66affSColin Finck PUNICODE_STRING DeviceName ) 1284c2c66affSColin Finck { 1285c2c66affSColin Finck NTSTATUS Status; 1286c2c66affSColin Finck OBJECT_ATTRIBUTES ObjectAttributes; 1287c2c66affSColin Finck HANDLE FileHandle; 1288c2c66affSColin Finck IO_STATUS_BLOCK Iosb; 1289c2c66affSColin Finck 1290c2c66affSColin Finck // 1291c2c66affSColin Finck // Setup the name in an object attributes structure. 1292c2c66affSColin Finck // Note that we create a name that is case INsensitive 1293c2c66affSColin Finck // 1294c2c66affSColin Finck InitializeObjectAttributes(&ObjectAttributes, // ptr to structure 1295c2c66affSColin Finck DeviceName, // ptr to file spec 1296c2c66affSColin Finck OBJ_CASE_INSENSITIVE, // attributes 1297c2c66affSColin Finck NULL, // root directory handle 1298c2c66affSColin Finck NULL ); // ptr to security descriptor 1299c2c66affSColin Finck 1300c2c66affSColin Finck // 1301c2c66affSColin Finck // Do the create. In this particular case, we'll have the I/O Manager 1302c2c66affSColin Finck // make our write requests syncrhonous for our convenience. 1303c2c66affSColin Finck // 1304c2c66affSColin Finck Status = NtCreateFile(&FileHandle, // returned file handle 1305c2c66affSColin Finck (GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE), // desired access 1306c2c66affSColin Finck &ObjectAttributes, // ptr to object attributes 1307c2c66affSColin Finck &Iosb, // ptr to I/O status block 1308c2c66affSColin Finck 0, // allocation size 1309c2c66affSColin Finck FILE_ATTRIBUTE_NORMAL, // file attributes 1310c2c66affSColin Finck FILE_SHARE_WRITE | FILE_SHARE_READ, // share access 1311c2c66affSColin Finck FILE_OPEN /*FILE_SUPERSEDE*/, // create disposition 1312c2c66affSColin Finck FILE_SYNCHRONOUS_IO_NONALERT, // create options 1313c2c66affSColin Finck NULL, // ptr to extended attributes 1314c2c66affSColin Finck 0); // length of ea buffer 1315c2c66affSColin Finck 1316c2c66affSColin Finck // 1317c2c66affSColin Finck // Check the system service status 1318c2c66affSColin Finck // 1319c2c66affSColin Finck if( !NT_SUCCESS(Status) ) 1320c2c66affSColin Finck { 1321c2c66affSColin Finck DPRINT1("Mke2fs: Create system service failed status = 0x%lx\n", Status); 1322c2c66affSColin Finck return Status; 1323c2c66affSColin Finck } 1324c2c66affSColin Finck 1325c2c66affSColin Finck 1326c2c66affSColin Finck // 1327c2c66affSColin Finck // Check the returned status too... 1328c2c66affSColin Finck // 1329c2c66affSColin Finck if(!NT_SUCCESS(Iosb.Status) ) 1330c2c66affSColin Finck { 1331c2c66affSColin Finck DPRINT1("Mke2fs: Create failed with status = 0x%lx\n",Iosb.Status); 1332c2c66affSColin Finck return Status; 1333c2c66affSColin Finck } 1334c2c66affSColin Finck 1335c2c66affSColin Finck Ext2Sys->MediaHandle = FileHandle; 1336c2c66affSColin Finck 1337c2c66affSColin Finck return Status; 1338c2c66affSColin Finck } 1339c2c66affSColin Finck 1340c2c66affSColin Finck 1341c2c66affSColin Finck NTSTATUS 1342c2c66affSColin Finck Ext2CloseDevice( PEXT2_FILESYS Ext2Sys) 1343c2c66affSColin Finck { 1344c2c66affSColin Finck NTSTATUS Status = STATUS_SUCCESS; 1345c2c66affSColin Finck 1346c2c66affSColin Finck if(Ext2Sys->MediaHandle) 1347c2c66affSColin Finck { 1348c2c66affSColin Finck Status = NtClose(Ext2Sys->MediaHandle); 1349c2c66affSColin Finck } 1350c2c66affSColin Finck 1351c2c66affSColin Finck return Status; 1352c2c66affSColin Finck } 1353