SAM3S8/SD8 Software Package: examples_usb/usb_hid_transfer/HIDTest/hclient.h Source File

SAM3S8/SD8 Software Package 1.2

# hclient.h

    00001 /*++
    00002
    00003 Copyright (c) Microsoft 1998, All Rights Reserved
    00004
    00005 Module Name:
    00006
    00007     hclient.h
    00008
    00009 Abstract:
    00010
    00011     This module contains the public declarations and definitions that are
    00012     defined in hclient.c and available to other modules outside of it.
    00013
    00014 Environment:
    00015
    00016     User mode
    00017
    00018 Revision History:
    00019
    00020     Nov-97 : Created
    00021
    00022 --*/
    00023
    00024 #ifndef __HCLIENT_H__
    00025 #define __HCLIENT_H__
    00026
    00027 #define WM_UNREGISTER_HANDLE    WM_USER+1
    00028 #define WM_DISPLAY_READ_DATA    WM_USER+2
    00029 #define WM_READ_DONE            WM_USER+3
    00030
    00031 #define READ_THREAD_TIMEOUT     1000
    00032
    00033 #define HCLIENT_ERROR           "HClient Error"
    00034
    00035 typedef struct _READ_THREAD_CONTEXT
    00036 {
    00037     PHID_DEVICE HidDevice;
    00038
    00039     HWND        DisplayWindow;
    00040     HANDLE      DisplayEvent;
    00041
    00042     BOOL        DoOneRead;
    00043     BOOL        TerminateThread;
    00044
    00045 } READ_THREAD_CONTEXT, *PREAD_THREAD_CONTEXT;
    00046
    00047
    00048 typedef NTSTATUS __stdcall GETEXTATTRIB (
    00049     HIDP_REPORT_TYPE,
    00050     USHORT,
    00051     PHIDP_PREPARSED_DATA,
    00052     PHIDP_EXTENDED_ATTRIBUTES,
    00053     PULONG);
    00054
    00055 typedef GETEXTATTRIB *PGETEXTATTRIB;
    00056
    00057 typedef NTSTATUS __stdcall INITREPORT (
    00058     HIDP_REPORT_TYPE,
    00059     UCHAR,
    00060     PHIDP_PREPARSED_DATA,
    00061     PCHAR,
    00062     ULONG);
    00063
    00064 typedef INITREPORT *PINITREPORT;
    00065
    00066
    00067 extern PGETEXTATTRIB pfnHidP_GetExtendedAttributes;
    00068
    00069 extern PINITREPORT   pfnHidP_InitializeReportForID;
    00070
    00071 VOID
    00072 vDisplayDeviceAttributes(
    00073     IN PHIDD_ATTRIBUTES pAttrib,
    00074     IN HWND             hControl
    00075 );
    00076
    00077 VOID
    00078 vDisplayButtonAttributes(
    00079     IN PHIDP_BUTTON_CAPS pButton,
    00080     IN HWND              hControl
    00081 );
    00082
    00083 VOID
    00084 vDisplayDataAttributes(
    00085     PHIDP_DATA pData,
    00086     BOOL IsButton,
    00087     HWND hControl
    00088 );
    00089
    00090 VOID
    00091 vCreateUsageAndPageString(
    00092     IN  PUSAGE_AND_PAGE   pUsageList,
    00093     OUT CHAR              szString[]
    00094 );
    00095
    00096 VOID
    00097 vCreateUsageString(
    00098     IN  PUSAGE   pUsageList,
    00099     OUT CHAR     szString[]
    00100 );
    00101
    00102 VOID
    00103 vDisplayDeviceCaps(
    00104     IN PHIDP_CAPS pCaps,
    00105     IN HWND       hControl
    00106 );
    00107
    00108 VOID
    00109 vDisplayValueAttributes(
    00110     IN PHIDP_VALUE_CAPS pValue,
    00111     IN HWND             hControl
    00112 );
    00113
    00114 VOID
    00115 vDisplayLinkCollectionNode(
    00116     IN  PHIDP_LINK_COLLECTION_NODE  pLCNode,
    00117     IN  ULONG                       ulLinkIndex,
    00118     IN  HWND                        hControl
    00119 );
    00120
    00121 VOID
    00122 vCreateUsageValueStringFromArray(
    00123     PCHAR       pBuffer,
    00124     USHORT      BitSize,
    00125     USHORT      UsageIndex,
    00126     CHAR        szString[]
    00127 );
    00128
    00129 VOID
    00130 vDisplayValueAttributes(
    00131     IN PHIDP_VALUE_CAPS pValue,
    00132     IN HWND hControl
    00133 );
    00134
    00135 DWORD WINAPI
    00136 AsynchReadThreadProc(
    00137     PREAD_THREAD_CONTEXT    Context
    00138 );
    00139
    00140 DWORD WINAPI
    00141 SynchReadThreadProc(
    00142     PREAD_THREAD_CONTEXT    Context
    00143 );
    00144
    00145 DWORD WINAPI
    00146 MyReadThreadProc(
    00147     PREAD_THREAD_CONTEXT    Context
    00148 );
    00149
    00150 #endif
    00151
    00152
    00153

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines