Leaked source code of windows server 2003
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.

52 lines
1.7 KiB

  1. //===========================================================================
  2. // dmterror.h
  3. //
  4. // Custom error messages for the DIMapTst project
  5. //
  6. // History:
  7. // 09/29/1999 - davidkl - created
  8. //===========================================================================
  9. #ifndef _DMTERROR_H
  10. #define _DMTERROR_H
  11. #include <objbase.h>
  12. //---------------------------------------------------------------------------
  13. // macros to create HRESULT codes
  14. //---------------------------------------------------------------------------
  15. // facility code for HRESULTS
  16. //
  17. // D15 == DirectInputSemantic
  18. #define DMT_FACILITY_CODE 0xD15
  19. // create success code
  20. #define MAKE_DMT_HRSUCCESS(n) MAKE_HRESULT(0, DMT_FACILITY_CODE, n)
  21. // create failure code
  22. #define MAKE_DMT_HRFAILURE(n) MAKE_HRESULT(1, DMT_FACILITY_CODE, n)
  23. //---------------------------------------------------------------------------
  24. // custom return codes for DIMapTst
  25. //---------------------------------------------------------------------------
  26. // success
  27. #define DMT_S_MEMORYLEAK MAKE_DMT_HRSUCCESS(0)
  28. #define DMT_S_NO_MAPPINGS MAKE_DMT_HRSUCCESS(1)
  29. // -- values intentionally skipped --
  30. #define DMT_S_FILE_ALMOST_TOO_BIG MAKE_DMT_HRSUCCESS(4)
  31. // failure
  32. #define DMT_E_NO_MATCHING_MAPPING MAKE_DMT_HRFAILURE(0)
  33. #define DMT_E_INPUT_CREATE_FAILED MAKE_DMT_HRFAILURE(1)
  34. #define DMT_E_FILE_WRITE_FAILED MAKE_DMT_HRFAILURE(2)
  35. #define DMT_E_FILE_READ_FAILED MAKE_DMT_HRFAILURE(3)
  36. #define DMT_E_FILE_TOO_BIG MAKE_DMT_HRFAILURE(4)
  37. //---------------------------------------------------------------------------
  38. #endif // _DMTERROR_H