home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / edkcode.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  2.2 KB  |  63 lines

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