///////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright 1995 - 2003 OSR Open Systems Resources, Inc.
// All Rights Reserved
//
// This sofware is supplied for instructional purposes only.
//
// OSR Open Systems Resources, Inc. (OSR) expressly disclaims any warranty
// for this software. THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION,
// THE IMPLIED WARRANTIES OF MECHANTABILITY OR FITNESS FOR A PARTICULAR
// PURPOSE. THE ENTIRE RISK ARISING FROM THE USE OF THIS SOFTWARE REMAINS
// WITH YOU. OSR's entire liability and your exclusive remedy shall not
// exceed the price paid for this material. In no event shall OSR or its
// suppliers be liable for any damages whatsoever (including, without
// limitation, damages for loss of business profit, business interruption,
// loss of business information, or any other pecuniary loss) arising out
// of the use or inability to use this software, even if OSR has been
// advised of the possibility of such damages. Because some states/
// jurisdictions do not allow the exclusion or limitation of liability for
// consequential or incidental damages, the above limitation may not apply
// to you.
//
// OSR Open Systems Resources, Inc.
// 105 Route 101A Suite 19
// Amherst, NH 03031 (603) 595-6500 FAX: (603) 595-6503
// email bugs to: bugs@osr.com
//
//
// MODULE:
//
// NtStatStr.C -- Given an NTSTATUS value, display the symbolic
// name as a string
//
// ABSTRACT:
//
// This switch statement was generated based on the
// ntstatus.h shipped with the Windows Server 2003 DDK.
//
// AUTHOR(S):
//
// OSR Open Systems Resources, Inc.
//
// REVISION:
//
//
///////////////////////////////////////////////////////////////////////////////
#include <ntddk.h>
#include <ntverp.h>
PUCHAR OsrNTStatusToString(NTSTATUS Status) {
switch (Status) {
case STATUS_SUCCESS:
return "STATUS_SUCCESS";
case STATUS_WAIT_1:
return "STATUS_WAIT_1";
case STATUS_WAIT_2:
return "STATUS_WAIT_2";
case STATUS_WAIT_3:
return "STATUS_WAIT_3";
case STATUS_WAIT_63:
return "STATUS_WAIT_63";
case STATUS_ABANDONED:
return "STATUS_ABANDONED";
case STATUS_ABANDONED_WAIT_63:
return "STATUS_ABANDONED_WAIT_63";
case STATUS_USER_APC:
return "STATUS_USER_APC";
case STATUS_KERNEL_APC:
return "STATUS_KERNEL_APC";
case STATUS_ALERTED:
return "STATUS_ALERTED";
case STATUS_TIMEOUT:
return "STATUS_TIMEOUT";
case STATUS_PENDING:
return "STATUS_PENDING";
case STATUS_REPARSE:
return "STATUS_REPARSE";
case STATUS_MORE_ENTRIES:
return "STATUS_MORE_ENTRIES";
case STATUS_NOT_ALL_ASSIGNED:
return "STATUS_NOT_ALL_ASSIGNED";
case STATUS_SOME_NOT_MAPPED:
return "STATUS_SOME_NOT_MAPPED";
case STATUS_OPLOCK_BREAK_IN_PROGRESS:
return "STATUS_OPLOCK_BREAK_IN_PROGRESS";
case STATUS_VOLUME_MOUNTED:
return "STATUS_VOLUME_MOUNTED";
case STATUS_RXACT_COMMITTED:
return "STATUS_RXACT_COMMITTED";
case STATUS_NOTIFY_CLEANUP:
return "STATUS_NOTIFY_CLEANUP";
case STATUS_NOTIFY_ENUM_DIR:
return "STATUS_NOTIFY_ENUM_DIR";
case STATUS_NO_QUOTAS_FOR_ACCOUNT:
return "STATUS_NO_QUOTAS_FOR_ACCOUNT";
case STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED:
return "STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED";
case STATUS_PAGE_FAULT_TRANSITION:
return "STATUS_PAGE_FAULT_TRANSITION";
case STATUS_PAGE_FAULT_DEMAND_ZERO:
return "STATUS_PAGE_FAULT_DEMAND_ZERO";
case STATUS_PAGE_FAULT_COPY_ON_WRITE:
return "STATUS_PAGE_FAULT_COPY_ON_WRITE";
case STATUS_PAGE_FAULT_GUARD_PAGE:
return "STATUS_PAGE_FAULT_GUARD_PAGE";
case STATUS_PAGE_FAULT_PAGING_FILE:
return "STATUS_PAGE_FAULT_PAGING_FILE";
case STATUS_CACHE_PAGE_LOCKED:
return "STATUS_CACHE_PAGE_LOCKED";
case STATUS_CRASH_DUMP:
return "STATUS_CRASH_DUMP";
case STATUS_BUFFER_ALL_ZEROS:
return "STATUS_BUFFER_ALL_ZEROS";
case STATUS_REPARSE_OBJECT:
return "STATUS_REPARSE_OBJECT";
case STATUS_RESOURCE_REQUIREMENTS_CHANGED:
return "STATUS_RESOURCE_REQUIREMENTS_CHANGED";
case STATUS_TRANSLATION_COMPLETE:
return "STATUS_TRANSLATION_COMPLETE";
case STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY:
return "STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY";
#if (VER_PRODUCT_BUILD >= 2600)
case STATUS_NOTHING_TO_TERMINATE:
return "STATUS_NOTHING_TO_TERMINATE";
case STATUS_PROCESS_NOT_IN_JOB:
return "STATUS_PROCESS_NOT_IN_JOB";
case STATUS_PROCESS_IN_JOB:
return "STATUS_PROCESS_IN_JOB";
#endif
#if (VER_PRODUCT_BUILD > 2600)
case STATUS_VOLSNAP_HIBERNATE_READY:
return "STATUS_VOLSNAP_HIBERNATE_READY";
case STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY:
return "STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY";
#endif
#if (VER_PRODUCT_BUILD >= 2600)
case STATUS_WAIT_FOR_OPLOCK:
return "STATUS_WAIT_FOR_OPLOCK";
#endif
case DBG_EXCEPTION_HANDLED:
return "DBG_EXCEPTION_HANDLED";
case DBG_CONTINUE:
return "DBG_CONTINUE";
case STATUS_OBJECT_NAME_EXISTS:
return "STATUS_OBJECT_NAME_EXISTS";
case STATUS_THREAD_WAS_SUSPENDED:
return "STATUS_THREAD_WAS_SUSPENDED";
case STATUS_WORKING_SET_LIMIT_RANGE:
return "STATUS_WORKING_SET_LIMIT_RANGE";
case STATUS_IMAGE_NOT_AT_BASE:
return "STATUS_IMAGE_NOT_AT_BASE";
case STATUS_RXACT_STATE_CREATED:
return "STATUS_RXACT_STATE_CREATED";
case STATUS_SEGMENT_NOTIFICATION:
return "STATUS_SEGMENT_NOTIFICATION";
case STATUS_LOCAL_USER_SESSION_KEY:
return "STATUS_LOCAL_USER_SESSION_KEY";
case STATUS_BAD_CURRENT_DIRECTORY:
return "STATUS_BAD_CURRENT_DIRECTORY";
case STATUS_SERIAL_MORE_WRITES:
return "STATUS_SERIAL_MORE_WRITES";
case STATUS_REGISTRY_RECOVERED:
return "STATUS_REGISTRY_RECOVERED";
case STATUS_FT_READ_RECOVERY_FROM_BACKUP:
return "STATUS_FT_READ_RECOVERY_FROM_BACKUP";
case STATUS_FT_WRITE_RECOVERY:
return "STATUS_FT_WRITE_RECOVERY";
case STATUS_SERIAL_COUNTER_TIMEOUT:
return "STATUS_SERIAL_COUNTER_TIMEOUT";
case STATUS_NULL_LM_PASSWORD:
return "STATUS_NULL_LM_PASSWORD";
case STATUS_IMAGE_MACHINE_TYPE_MISMATCH:
return "STATUS_IMAGE_MACHINE_TYPE_MISMATCH";
case STATUS_RECEIVE_PARTIAL:
return "STATUS_RECEIVE_PARTIAL";
case STATUS_RECEIVE_EXPEDITED:
return "STATUS_RECEIVE_EXPEDITED";
case STATUS_RECEIVE_PARTIAL_EXPEDITED:
return "STATUS_RECEIVE_PARTIAL_EXPEDITED";
case STATUS_EVENT_DONE:
return "STATUS_EVENT_DONE";
case STATUS_EVENT_PENDING:
return "STATUS_EVENT_PENDING";
case STATUS_CHECKING_FILE_SYSTEM:
return "STATUS_CHECKING_FILE_SYSTEM";
case STATUS_FATAL_APP_EXIT:
return "STATUS_FATAL_APP_EXIT";
case STATUS_PREDEFINED_HANDLE:
return "STATUS_PREDEFINED_HANDLE";
case STATUS_WAS_UNLOCKED:
return "STATUS_WAS_UNLOCKED";
case STATUS_SERVICE_NOTIFICATION:
return "STATUS_SERVICE_NOTIFICATION";
case STATUS_WAS_LOCKED:
return "STATUS_WAS_LOCKED";
case STATUS_LOG_HARD_ERROR:
return "STATUS_LOG_HARD_ERROR";
case STATUS_ALREADY_WIN32:
return "STATUS_ALREADY_WIN32";
case STATUS_WX86_UNSIMULATE:
return "STATUS_WX86_UNSIMULATE";
case STATUS_WX86_CONTINUE:
return "STATUS_WX86_CONTI