ReactOS  0.4.15-dev-489-g75a0787
hidparse.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Universal Serial Bus Bulk Enhanced Host Controller Interface
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: drivers/usb/hidparse/hidparse.c
5  * PURPOSE: HID Parser
6  * PROGRAMMERS:
7  * Michael Martin (michael.martin@reactos.org)
8  * Johannes Anderwald (johannes.anderwald@reactos.org)
9  */
10 
11 #include "hidparse.h"
12 #include "hidp.h"
13 
14 #define NDEBUG
15 #include <debug.h>
16 
17 PVOID
18 NTAPI
21 {
23  if (Item)
24  {
25  //
26  // zero item
27  //
28  RtlZeroMemory(Item, ItemSize);
29  }
30 
31  //
32  // done
33  //
34  return Item;
35 }
36 
37 VOID
38 NTAPI
40  IN PVOID Item)
41 {
42  //
43  // free item
44  //
46 }
47 
48 VOID
49 NTAPI
51  IN PVOID Item,
53 {
54  //
55  // zero item
56  //
57  RtlZeroMemory(Item, ItemSize);
58 }
59 
60 VOID
61 NTAPI
63  IN PVOID Target,
64  IN PVOID Source,
65  IN ULONG Length)
66 {
67  //
68  // copy item
69  //
71 }
72 
73 VOID
74 __cdecl
76  IN LPCSTR FormatStr, ...)
77 {
78 #if HID_DBG
79  va_list args;
80  char printbuffer[1024];
81 
82  va_start(args, FormatStr);
83  vsprintf(printbuffer, FormatStr, args);
84  va_end(args);
85 
86  DbgPrint(printbuffer);
87 #endif
88 }
89 
91 NTAPI
94  IN PUNICODE_STRING RegPath)
95 {
96  DPRINT("********* HID PARSE *********\n");
97  return STATUS_SUCCESS;
98 }
#define IN
Definition: typedefs.h:39
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define __cdecl
Definition: accygwin.h:79
#define DbgPrint
Definition: loader.c:25
LONG NTSTATUS
Definition: precomp.h:26
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hidparse.c:19
Definition: match.c:390
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define va_end(ap)
Definition: acmsvcex.h:90
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
char * va_list
Definition: acmsvcex.h:78
void DPRINT(...)
Definition: polytest.cpp:61
const char * LPCSTR
Definition: xmlstorage.h:183
NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
Definition: hidparse.c:92
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hidparse.c:50
VOID NTAPI CopyFunction(IN PVOID Target, IN PVOID Source, IN ULONG Length)
Definition: hidparse.c:62
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hidparse.c:75
_Must_inspect_result_ typedef _In_ ULONG _In_ BOOLEAN Target
Definition: iotypes.h:1070
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hidparse.c:39
static UCHAR ItemSize[4]
Definition: parser.c:16
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
#define HIDPARSE_TAG
Definition: hidparse.h:10
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define args
Definition: format.c:66