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.

147 lines
2.6 KiB

  1. /*++
  2. Copyright (c) Microsoft 1998, All Rights Reserved
  3. Module Name:
  4. hclient.h
  5. Abstract:
  6. This module contains the public declarations and definitions that are
  7. defined in hclient.c and available to other modules outside of it.
  8. Environment:
  9. User mode
  10. Revision History:
  11. Nov-97 : Created
  12. --*/
  13. #ifndef __HCLIENT_H__
  14. #define __HCLIENT_H__
  15. #define WM_UNREGISTER_HANDLE WM_USER+1
  16. #define WM_DISPLAY_READ_DATA WM_USER+2
  17. #define WM_READ_DONE WM_USER+3
  18. #define READ_THREAD_TIMEOUT 1000
  19. #define HCLIENT_ERROR "HClient Error"
  20. typedef struct _READ_THREAD_CONTEXT
  21. {
  22. PHID_DEVICE HidDevice;
  23. HWND DisplayWindow;
  24. HANDLE DisplayEvent;
  25. BOOL DoOneRead;
  26. BOOL TerminateThread;
  27. } READ_THREAD_CONTEXT, *PREAD_THREAD_CONTEXT;
  28. typedef NTSTATUS __stdcall GETEXTATTRIB (
  29. HIDP_REPORT_TYPE,
  30. USHORT,
  31. PHIDP_PREPARSED_DATA,
  32. PHIDP_EXTENDED_ATTRIBUTES,
  33. PULONG);
  34. typedef GETEXTATTRIB *PGETEXTATTRIB;
  35. typedef NTSTATUS __stdcall INITREPORT (
  36. HIDP_REPORT_TYPE,
  37. UCHAR,
  38. PHIDP_PREPARSED_DATA,
  39. PCHAR,
  40. ULONG);
  41. typedef INITREPORT *PINITREPORT;
  42. extern PGETEXTATTRIB pfnHidP_GetExtendedAttributes;
  43. extern PINITREPORT pfnHidP_InitializeReportForID;
  44. VOID
  45. vDisplayDeviceAttributes(
  46. IN PHIDD_ATTRIBUTES pAttrib,
  47. IN HWND hControl
  48. );
  49. VOID
  50. vDisplayButtonAttributes(
  51. IN PHIDP_BUTTON_CAPS pButton,
  52. IN HWND hControl
  53. );
  54. VOID
  55. vDisplayDataAttributes(
  56. PHIDP_DATA pData,
  57. BOOL IsButton,
  58. HWND hControl
  59. );
  60. VOID
  61. vCreateUsageAndPageString(
  62. IN PUSAGE_AND_PAGE pUsageList,
  63. OUT CHAR szString[]
  64. );
  65. VOID
  66. vCreateUsageString(
  67. IN PUSAGE pUsageList,
  68. OUT CHAR szString[]
  69. );
  70. VOID
  71. vDisplayDeviceCaps(
  72. IN PHIDP_CAPS pCaps,
  73. IN HWND hControl
  74. );
  75. VOID
  76. vDisplayValueAttributes(
  77. IN PHIDP_VALUE_CAPS pValue,
  78. IN HWND hControl
  79. );
  80. VOID
  81. vDisplayLinkCollectionNode(
  82. IN PHIDP_LINK_COLLECTION_NODE pLCNode,
  83. IN ULONG ulLinkIndex,
  84. IN HWND hControl
  85. );
  86. VOID
  87. vCreateUsageValueStringFromArray(
  88. PCHAR pBuffer,
  89. USHORT BitSize,
  90. USHORT UsageIndex,
  91. CHAR szString[]
  92. );
  93. VOID
  94. vDisplayValueAttributes(
  95. IN PHIDP_VALUE_CAPS pValue,
  96. IN HWND hControl
  97. );
  98. DWORD WINAPI
  99. AsynchReadThreadProc(
  100. PREAD_THREAD_CONTEXT Context
  101. );
  102. DWORD WINAPI
  103. SynchReadThreadProc(
  104. PREAD_THREAD_CONTEXT Context
  105. );
  106. #endif