forked from reactos/reactos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhidparse.c
More file actions
98 lines (87 loc) · 1.55 KB
/
Copy pathhidparse.c
File metadata and controls
98 lines (87 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
* PROJECT: ReactOS Universal Serial Bus Bulk Enhanced Host Controller Interface
* LICENSE: GPL - See COPYING in the top level directory
* FILE: drivers/usb/hidparse/hidparse.c
* PURPOSE: HID Parser
* PROGRAMMERS:
* Michael Martin (michael.martin@reactos.org)
* Johannes Anderwald (johannes.anderwald@reactos.org)
*/
#include "hidparse.h"
#include "hidp.h"
#define NDEBUG
#include <debug.h>
PVOID
NTAPI
AllocFunction(
IN ULONG ItemSize)
{
PVOID Item = ExAllocatePoolWithTag(NonPagedPool, ItemSize, HIDPARSE_TAG);
if (Item)
{
//
// zero item
//
RtlZeroMemory(Item, ItemSize);
}
//
// done
//
return Item;
}
VOID
NTAPI
FreeFunction(
IN PVOID Item)
{
//
// free item
//
ExFreePoolWithTag(Item, HIDPARSE_TAG);
}
VOID
NTAPI
ZeroFunction(
IN PVOID Item,
IN ULONG ItemSize)
{
//
// zero item
//
RtlZeroMemory(Item, ItemSize);
}
VOID
NTAPI
CopyFunction(
IN PVOID Target,
IN PVOID Source,
IN ULONG Length)
{
//
// copy item
//
RtlCopyMemory(Target, Source, Length);
}
VOID
__cdecl
DebugFunction(
IN LPCSTR FormatStr, ...)
{
#if HID_DBG
va_list args;
char printbuffer[1024];
va_start(args, FormatStr);
vsprintf(printbuffer, FormatStr, args);
va_end(args);
DbgPrint(printbuffer);
#endif
}
NTSTATUS
NTAPI
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegPath)
{
DPRINT("********* HID PARSE *********\n");
return STATUS_SUCCESS;
}