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
30480a23
Commit
30480a23
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 HidP_InitializeReportForID.
parent
ecc61965
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
1 deletion
+65
-1
hid.spec
dlls/hid/hid.spec
+1
-1
hidp.c
dlls/hid/hidp.c
+63
-0
hidpi.h
include/ddk/hidpi.h
+1
-0
No files found.
dlls/hid/hid.spec
View file @
30480a23
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
@ stdcall HidP_GetUsages(long long long ptr ptr ptr ptr long)
@ stdcall HidP_GetUsages(long long long ptr ptr ptr ptr long)
@ stub HidP_GetUsagesEx
@ stub HidP_GetUsagesEx
@ stdcall HidP_GetValueCaps(long ptr ptr ptr)
@ stdcall HidP_GetValueCaps(long ptr ptr ptr)
@ st
ub HidP_InitializeReportForID
@ st
dcall HidP_InitializeReportForID(long long ptr ptr long)
@ stub HidP_MaxDataListLength
@ stub HidP_MaxDataListLength
@ stub HidP_MaxUsageListLength
@ stub HidP_MaxUsageListLength
@ stub HidP_SetData
@ stub HidP_SetData
...
...
dlls/hid/hidp.c
View file @
30480a23
...
@@ -358,3 +358,66 @@ NTSTATUS WINAPI HidP_GetValueCaps(HIDP_REPORT_TYPE ReportType, PHIDP_VALUE_CAPS
...
@@ -358,3 +358,66 @@ NTSTATUS WINAPI HidP_GetValueCaps(HIDP_REPORT_TYPE ReportType, PHIDP_VALUE_CAPS
*
ValueCapsLength
=
v_count
;
*
ValueCapsLength
=
v_count
;
return
HIDP_STATUS_SUCCESS
;
return
HIDP_STATUS_SUCCESS
;
}
}
NTSTATUS
WINAPI
HidP_InitializeReportForID
(
HIDP_REPORT_TYPE
ReportType
,
UCHAR
ReportID
,
PHIDP_PREPARSED_DATA
PreparsedData
,
PCHAR
Report
,
ULONG
ReportLength
)
{
int
size
;
PWINE_HIDP_PREPARSED_DATA
data
=
(
PWINE_HIDP_PREPARSED_DATA
)
PreparsedData
;
WINE_HID_REPORT
*
report
=
NULL
;
BOOL
found
=
FALSE
;
int
r_count
;
int
i
;
TRACE
(
"(%i, %i, %p, %p, %i)
\n
"
,
ReportType
,
ReportID
,
PreparsedData
,
Report
,
ReportLength
);
if
(
data
->
magic
!=
HID_MAGIC
)
return
HIDP_STATUS_INVALID_PREPARSED_DATA
;
switch
(
ReportType
)
{
case
HidP_Input
:
size
=
data
->
caps
.
InputReportByteLength
;
report
=
HID_INPUT_REPORTS
(
data
);
r_count
=
data
->
dwInputReportCount
;
break
;
case
HidP_Output
:
size
=
data
->
caps
.
OutputReportByteLength
;
report
=
HID_OUTPUT_REPORTS
(
data
);
r_count
=
data
->
dwOutputReportCount
;
break
;
case
HidP_Feature
:
size
=
data
->
caps
.
FeatureReportByteLength
;
report
=
HID_FEATURE_REPORTS
(
data
);
r_count
=
data
->
dwFeatureReportCount
;
break
;
default:
return
HIDP_STATUS_INVALID_REPORT_TYPE
;
}
if
(
!
r_count
||
!
size
||
!
report
)
return
HIDP_STATUS_REPORT_DOES_NOT_EXIST
;
if
(
size
!=
ReportLength
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
ZeroMemory
(
Report
,
size
);
for
(
i
=
0
;
i
<
r_count
;
i
++
)
{
if
(
report
->
reportID
==
ReportID
)
{
found
=
TRUE
;
if
(
report
->
reportID
)
Report
[
0
]
=
ReportID
;
/* TODO: Handle null and default values */
}
report
=
HID_NEXT_REPORT
(
data
,
report
);
}
if
(
!
found
)
return
HIDP_STATUS_REPORT_DOES_NOT_EXIST
;
return
HIDP_STATUS_SUCCESS
;
}
include/ddk/hidpi.h
View file @
30480a23
...
@@ -141,6 +141,7 @@ NTSTATUS WINAPI HidP_GetCaps(PHIDP_PREPARSED_DATA PreparsedData, PHIDP_CAPS Capa
...
@@ -141,6 +141,7 @@ NTSTATUS WINAPI HidP_GetCaps(PHIDP_PREPARSED_DATA PreparsedData, PHIDP_CAPS Capa
NTSTATUS
WINAPI
HidP_GetUsages
(
HIDP_REPORT_TYPE
ReportType
,
USAGE
UsagePage
,
USHORT
LinkCollection
,
PUSAGE
UsageList
,
PULONG
UsageLength
,
PHIDP_PREPARSED_DATA
PreparsedData
,
PCHAR
Report
,
ULONG
ReportLength
);
NTSTATUS
WINAPI
HidP_GetUsages
(
HIDP_REPORT_TYPE
ReportType
,
USAGE
UsagePage
,
USHORT
LinkCollection
,
PUSAGE
UsageList
,
PULONG
UsageLength
,
PHIDP_PREPARSED_DATA
PreparsedData
,
PCHAR
Report
,
ULONG
ReportLength
);
NTSTATUS
WINAPI
HidP_GetUsageValue
(
HIDP_REPORT_TYPE
ReportType
,
USAGE
UsagePage
,
USHORT
LinkCollection
,
USAGE
Usage
,
PULONG
UsageValue
,
PHIDP_PREPARSED_DATA
PreparsedData
,
PCHAR
Report
,
ULONG
ReportLength
);
NTSTATUS
WINAPI
HidP_GetUsageValue
(
HIDP_REPORT_TYPE
ReportType
,
USAGE
UsagePage
,
USHORT
LinkCollection
,
USAGE
Usage
,
PULONG
UsageValue
,
PHIDP_PREPARSED_DATA
PreparsedData
,
PCHAR
Report
,
ULONG
ReportLength
);
NTSTATUS
WINAPI
HidP_GetValueCaps
(
HIDP_REPORT_TYPE
ReportType
,
PHIDP_VALUE_CAPS
ValueCaps
,
PUSHORT
ValueCapsLength
,
PHIDP_PREPARSED_DATA
PreparsedData
);
NTSTATUS
WINAPI
HidP_GetValueCaps
(
HIDP_REPORT_TYPE
ReportType
,
PHIDP_VALUE_CAPS
ValueCaps
,
PUSHORT
ValueCapsLength
,
PHIDP_PREPARSED_DATA
PreparsedData
);
NTSTATUS
WINAPI
HidP_InitializeReportForID
(
HIDP_REPORT_TYPE
ReportType
,
UCHAR
ReportID
,
PHIDP_PREPARSED_DATA
PreparsedData
,
PCHAR
Report
,
ULONG
ReportLength
);
#ifndef FACILITY_HID_ERROR_CODE
#ifndef FACILITY_HID_ERROR_CODE
...
...
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