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.

59 lines
1.6 KiB

  1. /*
  2. * DEBUG.C
  3. *
  4. * Point-of-Sale Control Panel Applet
  5. *
  6. * Author: Ervin Peretz
  7. *
  8. * (c) 2001 Microsoft Corporation
  9. */
  10. #include <windows.h>
  11. #include <windowsx.h>
  12. #include <commctrl.h>
  13. #include <cpl.h>
  14. #include <setupapi.h>
  15. #include <hidsdi.h>
  16. #include "internal.h"
  17. #include "res.h"
  18. #include "debug.h"
  19. #if DBG
  20. PWCHAR DbgHidStatusStr(DWORD hidStatus)
  21. {
  22. PWCHAR statusName = L"<Unknown>";
  23. switch (hidStatus){
  24. #define MAKE_CASE(stat) case stat: statusName = L#stat; break;
  25. MAKE_CASE(HIDP_STATUS_SUCCESS)
  26. MAKE_CASE(HIDP_STATUS_NULL)
  27. MAKE_CASE(HIDP_STATUS_INVALID_PREPARSED_DATA)
  28. MAKE_CASE(HIDP_STATUS_INVALID_REPORT_TYPE)
  29. MAKE_CASE(HIDP_STATUS_INVALID_REPORT_LENGTH)
  30. MAKE_CASE(HIDP_STATUS_USAGE_NOT_FOUND)
  31. MAKE_CASE(HIDP_STATUS_VALUE_OUT_OF_RANGE)
  32. MAKE_CASE(HIDP_STATUS_BAD_LOG_PHY_VALUES)
  33. MAKE_CASE(HIDP_STATUS_BUFFER_TOO_SMALL)
  34. MAKE_CASE(HIDP_STATUS_INTERNAL_ERROR)
  35. MAKE_CASE(HIDP_STATUS_I8042_TRANS_UNKNOWN)
  36. MAKE_CASE(HIDP_STATUS_INCOMPATIBLE_REPORT_ID)
  37. MAKE_CASE(HIDP_STATUS_NOT_VALUE_ARRAY)
  38. MAKE_CASE(HIDP_STATUS_IS_VALUE_ARRAY)
  39. MAKE_CASE(HIDP_STATUS_DATA_INDEX_NOT_FOUND)
  40. MAKE_CASE(HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE)
  41. MAKE_CASE(HIDP_STATUS_BUTTON_NOT_PRESSED)
  42. MAKE_CASE(HIDP_STATUS_REPORT_DOES_NOT_EXIST)
  43. MAKE_CASE(HIDP_STATUS_NOT_IMPLEMENTED)
  44. }
  45. return statusName;
  46. }
  47. #endif