Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5b790bde
Commit
5b790bde
authored
Jun 30, 2015
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hid: Implement HidD_GetPreparsedData and HidD_FreePreparsedData.
parent
30480a23
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
2 deletions
+45
-2
hid.spec
dlls/hid/hid.spec
+2
-2
hidd.c
dlls/hid/hidd.c
+32
-0
hidclass.h
include/ddk/hidclass.h
+9
-0
hidsdi.h
include/ddk/hidsdi.h
+2
-0
No files found.
dlls/hid/hid.spec
View file @
5b790bde
@ stub HidD_FlushQueue
@ st
ub HidD_FreePreparsedData
@ st
dcall HidD_FreePreparsedData(ptr)
@ stub HidD_GetAttributes
@ stub HidD_GetConfiguration
@ stdcall HidD_GetFeature(long ptr long)
...
...
@@ -10,7 +10,7 @@
@ stub HidD_GetMsGenreDescriptor
@ stub HidD_GetNumInputBuffers
@ stub HidD_GetPhysicalDescriptor
@ st
ub HidD_GetPreparsedData
@ st
dcall HidD_GetPreparsedData(ptr ptr)
@ stdcall HidD_GetProductString(long ptr long)
@ stub HidD_GetSerialNumberString
@ stub HidD_Hello
...
...
dlls/hid/hidd.c
View file @
5b790bde
...
...
@@ -32,10 +32,19 @@
#include "winioctl.h"
#include "ddk/wdm.h"
#include "hidusage.h"
#include "ddk/hidclass.h"
#include "ddk/hidpi.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
hid
);
BOOLEAN
WINAPI
HidD_FreePreparsedData
(
PHIDP_PREPARSED_DATA
PreparsedData
)
{
TRACE
(
"(%p)
\n
"
,
PreparsedData
);
HeapFree
(
GetProcessHeap
(),
0
,
PreparsedData
);
return
TRUE
;
}
BOOLEAN
WINAPI
HidD_GetFeature
(
HANDLE
HidDeviceObject
,
PVOID
ReportBuffer
,
ULONG
ReportBufferLength
)
{
TRACE
(
"(%p %p %u)
\n
"
,
HidDeviceObject
,
ReportBuffer
,
ReportBufferLength
);
...
...
@@ -65,3 +74,26 @@ BOOLEAN WINAPI HidD_GetProductString(HANDLE HidDeviceObject, PVOID Buffer, ULONG
TRACE
(
"(%p %p %u)
\n
"
,
HidDeviceObject
,
Buffer
,
BufferLength
);
return
DeviceIoControl
(
HidDeviceObject
,
IOCTL_HID_GET_PRODUCT_STRING
,
NULL
,
0
,
Buffer
,
BufferLength
,
NULL
,
NULL
);
}
BOOLEAN
WINAPI
HidD_GetPreparsedData
(
HANDLE
HidDeviceObject
,
PHIDP_PREPARSED_DATA
*
PreparsedData
)
{
HID_COLLECTION_INFORMATION
info
;
PHIDP_PREPARSED_DATA
data
;
TRACE
(
"(%p %p)
\n
"
,
HidDeviceObject
,
PreparsedData
);
if
(
!
DeviceIoControl
(
HidDeviceObject
,
IOCTL_HID_GET_COLLECTION_INFORMATION
,
NULL
,
0
,
&
info
,
sizeof
(
HID_COLLECTION_INFORMATION
),
NULL
,
NULL
))
return
FALSE
;
if
(
!
(
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
info
.
DescriptorSize
)))
return
FALSE
;
if
(
!
DeviceIoControl
(
HidDeviceObject
,
IOCTL_HID_GET_COLLECTION_DESCRIPTOR
,
NULL
,
0
,
data
,
info
.
DescriptorSize
,
NULL
,
NULL
))
{
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
FALSE
;
}
*
PreparsedData
=
data
;
return
TRUE
;
}
include/ddk/hidclass.h
View file @
5b790bde
...
...
@@ -56,6 +56,15 @@ DEFINE_GUID (GUID_DEVINTERFACE_HID, \
#define IOCTL_HID_SET_DRIVER_CONFIG HID_BUFFER_CTL_CODE(101)
#define IOCTL_HID_GET_MS_GENRE_DESCRIPTOR HID_OUT_CTL_CODE(121)
typedef
struct
_HID_COLLECTION_INFORMATION
{
ULONG
DescriptorSize
;
BOOLEAN
Polled
;
UCHAR
Reserved1
[
1
];
USHORT
VendorID
;
USHORT
ProductID
;
USHORT
VersionNumber
;
}
HID_COLLECTION_INFORMATION
,
*
PHID_COLLECTION_INFORMATION
;
#ifdef __cplusplus
}
#endif
...
...
include/ddk/hidsdi.h
View file @
5b790bde
...
...
@@ -32,5 +32,7 @@ void WINAPI HidD_GetHidGuid(LPGUID guid);
BOOLEAN
WINAPI
HidD_GetManufacturerString
(
HANDLE
HidDeviceObject
,
PVOID
Buffer
,
ULONG
BufferLength
);
BOOLEAN
WINAPI
HidD_GetProductString
(
HANDLE
HidDeviceObject
,
PVOID
Buffer
,
ULONG
BufferLength
);
BOOLEAN
WINAPI
HidD_SetFeature
(
HANDLE
HidDeviceObject
,
PVOID
ReportBuffer
,
ULONG
ReportBufferLength
);
BOOLEAN
WINAPI
HidD_GetPreparsedData
(
HANDLE
HidDeviceObject
,
PHIDP_PREPARSED_DATA
*
PreparsedData
);
BOOLEAN
WINAPI
HidD_FreePreparsedData
(
PHIDP_PREPARSED_DATA
PreparsedData
);
#endif
/* __WINE_HIDSDI_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment