Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.1 KiB

  1. // --edkcode.h------------------------------------------------------------------
  2. //
  3. // EDK function ec = codes.
  4. //
  5. // Copyright 1986 - 1998 Microsoft Corporation. All Rights Reserved.
  6. // -----------------------------------------------------------------------------
  7. #ifndef _EDKCODE_H
  8. #define _EDKCODE_H
  9. #include <winerror.h>
  10. // Every HRESULT is built from a serverity value, a facility
  11. // value and an error code value.
  12. #define FACILITY_EDK 11 // EDK facility value
  13. // Pairs of EDK error codes and the HRESULTs built from them.
  14. // EDK functions always return HRESULTs. Console applications
  15. // return exit codes via the _nEcFromHr function.
  16. #define EC_EDK_E_NOT_FOUND 0x0001
  17. #define EDK_E_NOT_FOUND \
  18. MAKE_SCODE(SEVERITY_ERROR, FACILITY_EDK, EC_EDK_E_NOT_FOUND)
  19. #define EC_EDK_E_SHUTDOWN_SERVICE 0x0002
  20. #define EDK_E_SHUTDOWN_SERVICE \
  21. MAKE_SCODE(SEVERITY_ERROR, FACILITY_EDK, EC_EDK_E_SHUTDOWN_SERVICE)
  22. #define EC_EDK_E_ALREADY_EXISTS 0x0003
  23. #define EDK_E_ALREADY_EXISTS \
  24. MAKE_SCODE(SEVERITY_ERROR, FACILITY_EDK, EC_EDK_E_ALREADY_EXISTS)
  25. #define EC_EDK_E_END_OF_FILE 0x0004
  26. #define EDK_E_END_OF_FILE \
  27. MAKE_SCODE(SEVERITY_ERROR, FACILITY_EDK, EC_EDK_E_END_OF_FILE)
  28. #define EC_EDK_E_AMBIGUOUS 0x0005
  29. #define EDK_E_AMBIGUOUS \
  30. MAKE_SCODE(SEVERITY_ERROR, FACILITY_EDK, EC_EDK_E_AMBIGUOUS)
  31. #define EC_EDK_E_PARSE 0x0006
  32. #define EDK_E_PARSE \
  33. MAKE_SCODE(SEVERITY_ERROR, FACILITY_EDK, EC_EDK_E_PARSE)
  34. // maximum EDK exit code
  35. #define MAX_EDK_ERROR_CODE 10
  36. // exit codes for approved OLE and Win32 HRESULTs.
  37. #define EC_EDK_E_FAIL 1 + MAX_EDK_ERROR_CODE
  38. #define EC_EDK_E_OUTOFMEMORY 2 + MAX_EDK_ERROR_CODE
  39. #define EC_EDK_E_INVALIDARG 3 + MAX_EDK_ERROR_CODE
  40. #define EC_EDK_E_NOTIMPL 4 + MAX_EDK_ERROR_CODE
  41. #define EC_EDK_E_NOINTERFACE 5 + MAX_EDK_ERROR_CODE
  42. #define EC_EDK_E_ACCESSDENIED 6 + MAX_EDK_ERROR_CODE
  43. // Unknown EDK exit code (HRESULT does not correspond to one of the "valid" EDK HRESULTs above)
  44. #define EC_EDK_E_UNKNOWN 10 + MAX_EDK_ERROR_CODE
  45. #endif