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
397859dd
Commit
397859dd
authored
Jan 31, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hid: Fix printf format warnings with long types.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3bb0e2e5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
73 deletions
+72
-73
Makefile.in
dlls/hid/Makefile.in
+0
-1
hidd.c
dlls/hid/hidd.c
+44
-44
hidp.c
dlls/hid/hidp.c
+23
-22
Makefile.in
dlls/hidparse.sys/Makefile.in
+0
-1
main.c
dlls/hidparse.sys/main.c
+5
-5
No files found.
dlls/hid/Makefile.in
View file @
397859dd
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
hid.dll
IMPORTLIB
=
hid
...
...
dlls/hid/hidd.c
View file @
397859dd
...
...
@@ -52,116 +52,116 @@ static BOOL sync_ioctl(HANDLE file, DWORD code, void *in_buf, DWORD in_len, void
return
ret
;
}
BOOLEAN
WINAPI
HidD_FreePreparsedData
(
PHIDP_PREPARSED_DATA
PreparsedData
)
BOOLEAN
WINAPI
HidD_FreePreparsedData
(
PHIDP_PREPARSED_DATA
preparsed_data
)
{
TRACE
(
"(%p)
\n
"
,
PreparsedData
);
HeapFree
(
GetProcessHeap
(),
0
,
PreparsedData
);
TRACE
(
"preparsed_data %p.
\n
"
,
preparsed_data
);
HeapFree
(
GetProcessHeap
(),
0
,
preparsed_data
);
return
TRUE
;
}
BOOLEAN
WINAPI
HidD_GetAttributes
(
HANDLE
HidDeviceObject
,
PHIDD_ATTRIBUTES
Attr
)
BOOLEAN
WINAPI
HidD_GetAttributes
(
HANDLE
file
,
PHIDD_ATTRIBUTES
attributes
)
{
HID_COLLECTION_INFORMATION
info
;
BOOLEAN
ret
;
TRACE
(
"(%p %p)
\n
"
,
HidDeviceObject
,
Attr
);
TRACE
(
"file %p, attributes %p.
\n
"
,
file
,
attributes
);
ret
=
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_GET_COLLECTION_INFORMATION
,
NULL
,
0
,
&
info
,
sizeof
(
HID_COLLECTION_INFORMATION
)
);
ret
=
sync_ioctl
(
file
,
IOCTL_HID_GET_COLLECTION_INFORMATION
,
NULL
,
0
,
&
info
,
sizeof
(
HID_COLLECTION_INFORMATION
)
);
if
(
ret
)
{
Attr
->
Size
=
sizeof
(
HIDD_ATTRIBUTES
);
Attr
->
VendorID
=
info
.
VendorID
;
Attr
->
ProductID
=
info
.
ProductID
;
Attr
->
VersionNumber
=
info
.
VersionNumber
;
attributes
->
Size
=
sizeof
(
HIDD_ATTRIBUTES
);
attributes
->
VendorID
=
info
.
VendorID
;
attributes
->
ProductID
=
info
.
ProductID
;
attributes
->
VersionNumber
=
info
.
VersionNumber
;
}
return
ret
;
}
BOOLEAN
WINAPI
HidD_GetFeature
(
HANDLE
HidDeviceObject
,
PVOID
ReportBuffer
,
ULONG
ReportBufferLength
)
BOOLEAN
WINAPI
HidD_GetFeature
(
HANDLE
file
,
void
*
report_buf
,
ULONG
report_len
)
{
TRACE
(
"(%p %p %u)
\n
"
,
HidDeviceObject
,
ReportBuffer
,
ReportBufferLength
);
return
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_GET_FEATURE
,
NULL
,
0
,
ReportBuffer
,
ReportBufferLength
);
TRACE
(
"file %p, report_buf %p, report_len %lu.
\n
"
,
file
,
report_buf
,
report_len
);
return
sync_ioctl
(
file
,
IOCTL_HID_GET_FEATURE
,
NULL
,
0
,
report_buf
,
report_len
);
}
void
WINAPI
HidD_GetHidGuid
(
LPGUID
guid
)
{
TRACE
(
"(%p)
\n
"
,
guid
);
TRACE
(
"guid %s.
\n
"
,
debugstr_guid
(
guid
)
);
*
guid
=
GUID_DEVINTERFACE_HID
;
}
BOOLEAN
WINAPI
HidD_GetInputReport
(
HANDLE
HidDeviceObject
,
PVOID
ReportBuffer
,
ULONG
ReportBufferLength
)
BOOLEAN
WINAPI
HidD_GetInputReport
(
HANDLE
file
,
void
*
report_buf
,
ULONG
report_len
)
{
TRACE
(
"(%p %p %u)
\n
"
,
HidDeviceObject
,
ReportBuffer
,
ReportBufferLength
);
return
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_GET_INPUT_REPORT
,
NULL
,
0
,
ReportBuffer
,
ReportBufferLength
);
TRACE
(
"file %p, report_buf %p, report_len %lu.
\n
"
,
file
,
report_buf
,
report_len
);
return
sync_ioctl
(
file
,
IOCTL_HID_GET_INPUT_REPORT
,
NULL
,
0
,
report_buf
,
report_len
);
}
BOOLEAN
WINAPI
HidD_GetManufacturerString
(
HANDLE
HidDeviceObject
,
PVOID
Buffer
,
ULONG
BufferLength
)
BOOLEAN
WINAPI
HidD_GetManufacturerString
(
HANDLE
file
,
void
*
buffer
,
ULONG
buffer_len
)
{
TRACE
(
"(%p %p %u)
\n
"
,
HidDeviceObject
,
Buffer
,
BufferLength
);
return
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_GET_MANUFACTURER_STRING
,
NULL
,
0
,
Buffer
,
BufferLength
);
TRACE
(
"file %p, buffer %p, buffer_len %lu.
\n
"
,
file
,
buffer
,
buffer_len
);
return
sync_ioctl
(
file
,
IOCTL_HID_GET_MANUFACTURER_STRING
,
NULL
,
0
,
buffer
,
buffer_len
);
}
BOOLEAN
WINAPI
HidD_GetNumInputBuffers
(
HANDLE
HidDeviceObject
,
ULONG
*
NumberBuffers
)
BOOLEAN
WINAPI
HidD_GetNumInputBuffers
(
HANDLE
file
,
ULONG
*
num_buffer
)
{
TRACE
(
"(%p %p)
\n
"
,
HidDeviceObject
,
NumberBuffers
);
return
sync_ioctl
(
HidDeviceObject
,
IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS
,
NULL
,
0
,
NumberBuffers
,
sizeof
(
*
NumberBuffers
)
);
TRACE
(
"file %p, num_buffer %p.
\n
"
,
file
,
num_buffer
);
return
sync_ioctl
(
file
,
IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS
,
NULL
,
0
,
num_buffer
,
sizeof
(
*
num_buffer
)
);
}
BOOLEAN
WINAPI
HidD_SetFeature
(
HANDLE
HidDeviceObject
,
PVOID
ReportBuffer
,
ULONG
ReportBufferLength
)
BOOLEAN
WINAPI
HidD_SetFeature
(
HANDLE
file
,
void
*
report_buf
,
ULONG
report_len
)
{
TRACE
(
"(%p %p %u)
\n
"
,
HidDeviceObject
,
ReportBuffer
,
ReportBufferLength
);
return
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_SET_FEATURE
,
ReportBuffer
,
ReportBufferLength
,
NULL
,
0
);
TRACE
(
"file %p, report_buf %p, report_len %lu.
\n
"
,
file
,
report_buf
,
report_len
);
return
sync_ioctl
(
file
,
IOCTL_HID_SET_FEATURE
,
report_buf
,
report_len
,
NULL
,
0
);
}
BOOLEAN
WINAPI
HidD_SetNumInputBuffers
(
HANDLE
HidDeviceObject
,
ULONG
NumberBuffers
)
BOOLEAN
WINAPI
HidD_SetNumInputBuffers
(
HANDLE
file
,
ULONG
num_buffer
)
{
TRACE
(
"(%p %i)
\n
"
,
HidDeviceObject
,
NumberBuffers
);
return
sync_ioctl
(
HidDeviceObject
,
IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS
,
&
NumberBuffers
,
sizeof
(
NumberBuffers
),
NULL
,
0
);
TRACE
(
"file %p, num_buffer %lu.
\n
"
,
file
,
num_buffer
);
return
sync_ioctl
(
file
,
IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS
,
&
num_buffer
,
sizeof
(
num_buffer
),
NULL
,
0
);
}
BOOLEAN
WINAPI
HidD_GetProductString
(
HANDLE
HidDeviceObject
,
PVOID
Buffer
,
ULONG
BufferLength
)
BOOLEAN
WINAPI
HidD_GetProductString
(
HANDLE
file
,
void
*
buffer
,
ULONG
buffer_len
)
{
TRACE
(
"(%p %p %u)
\n
"
,
HidDeviceObject
,
Buffer
,
BufferLength
);
return
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_GET_PRODUCT_STRING
,
NULL
,
0
,
Buffer
,
BufferLength
);
TRACE
(
"file %p, buffer %p, buffer_len %lu.
\n
"
,
file
,
buffer
,
buffer_len
);
return
sync_ioctl
(
file
,
IOCTL_HID_GET_PRODUCT_STRING
,
NULL
,
0
,
buffer
,
buffer_len
);
}
BOOLEAN
WINAPI
HidD_GetSerialNumberString
(
HANDLE
HidDeviceObject
,
PVOID
Buffer
,
ULONG
BufferLength
)
BOOLEAN
WINAPI
HidD_GetSerialNumberString
(
HANDLE
file
,
void
*
buffer
,
ULONG
buffer_len
)
{
TRACE
(
"(%p %p %u)
\n
"
,
HidDeviceObject
,
Buffer
,
BufferLength
);
return
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_GET_SERIALNUMBER_STRING
,
NULL
,
0
,
Buffer
,
BufferLength
);
TRACE
(
"file %p, buffer %p, buffer_len %lu.
\n
"
,
file
,
buffer
,
buffer_len
);
return
sync_ioctl
(
file
,
IOCTL_HID_GET_SERIALNUMBER_STRING
,
NULL
,
0
,
buffer
,
buffer_len
);
}
BOOLEAN
WINAPI
HidD_GetPreparsedData
(
HANDLE
HidDeviceObject
,
PHIDP_PREPARSED_DATA
*
PreparsedData
)
BOOLEAN
WINAPI
HidD_GetPreparsedData
(
HANDLE
file
,
PHIDP_PREPARSED_DATA
*
preparsed_data
)
{
HID_COLLECTION_INFORMATION
info
;
PHIDP_PREPARSED_DATA
data
;
TRACE
(
"(%p %p)
\n
"
,
HidDeviceObject
,
PreparsedData
);
TRACE
(
"file %p, preparsed_data %p.
\n
"
,
file
,
preparsed_data
);
if
(
!
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_GET_COLLECTION_INFORMATION
,
NULL
,
0
,
&
info
,
sizeof
(
info
)
))
if
(
!
sync_ioctl
(
file
,
IOCTL_HID_GET_COLLECTION_INFORMATION
,
NULL
,
0
,
&
info
,
sizeof
(
info
)
))
return
FALSE
;
if
(
!
(
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
info
.
DescriptorSize
)))
return
FALSE
;
if
(
!
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_GET_COLLECTION_DESCRIPTOR
,
NULL
,
0
,
data
,
info
.
DescriptorSize
))
if
(
!
sync_ioctl
(
file
,
IOCTL_HID_GET_COLLECTION_DESCRIPTOR
,
NULL
,
0
,
data
,
info
.
DescriptorSize
))
{
HeapFree
(
GetProcessHeap
(),
0
,
data
);
return
FALSE
;
}
*
PreparsedD
ata
=
data
;
*
preparsed_d
ata
=
data
;
return
TRUE
;
}
BOOLEAN
WINAPI
HidD_SetOutputReport
(
HANDLE
HidDeviceObject
,
void
*
ReportBuffer
,
ULONG
ReportBufferLength
)
BOOLEAN
WINAPI
HidD_SetOutputReport
(
HANDLE
file
,
void
*
report_buf
,
ULONG
report_len
)
{
TRACE
(
"(%p %p %u)
\n
"
,
HidDeviceObject
,
ReportBuffer
,
ReportBufferLength
);
return
sync_ioctl
(
HidDeviceObject
,
IOCTL_HID_SET_OUTPUT_REPORT
,
ReportBuffer
,
ReportBufferLength
,
NULL
,
0
);
TRACE
(
"file %p, report_buf %p, report_len %lu.
\n
"
,
file
,
report_buf
,
report_len
);
return
sync_ioctl
(
file
,
IOCTL_HID_SET_OUTPUT_REPORT
,
report_buf
,
report_len
,
NULL
,
0
);
}
BOOLEAN
WINAPI
HidD_GetIndexedString
(
HANDLE
file
,
ULONG
index
,
void
*
buffer
,
ULONG
length
)
{
TRACE
(
"file %p, index %u, buffer %p, length %u.
\n
"
,
file
,
index
,
buffer
,
length
);
TRACE
(
"file %p, index %lu, buffer %p, length %lu.
\n
"
,
file
,
index
,
buffer
,
length
);
return
sync_ioctl
(
file
,
IOCTL_HID_GET_INDEXED_STRING
,
&
index
,
sizeof
(
index
),
buffer
,
length
);
}
...
...
dlls/hid/hidp.c
View file @
397859dd
...
...
@@ -270,7 +270,7 @@ NTSTATUS WINAPI HidP_GetScaledUsageValue( HIDP_REPORT_TYPE report_type, USAGE us
struct
caps_filter
filter
=
{.
values
=
TRUE
,
.
usage_page
=
usage_page
,
.
collection
=
collection
,
.
usage
=
usage
};
USHORT
count
=
1
;
TRACE
(
"report_type %d, usage_page %
x, collection %d, usage %x, value %p, preparsed_data %p, report_buf %p, report_len %
u.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u, usage %u, value %p, preparsed_data %p, report_buf %p, report_len %l
u.
\n
"
,
report_type
,
usage_page
,
collection
,
usage
,
value
,
preparsed_data
,
report_buf
,
report_len
);
*
value
=
0
;
...
...
@@ -303,7 +303,7 @@ NTSTATUS WINAPI HidP_GetUsageValue( HIDP_REPORT_TYPE report_type, USAGE usage_pa
struct
caps_filter
filter
=
{.
values
=
TRUE
,
.
usage_page
=
usage_page
,
.
collection
=
collection
,
.
usage
=
usage
};
USHORT
count
=
1
;
TRACE
(
"report_type %d, usage_page %
x, collection %d, usage %x, value %p, preparsed_data %p, report_buf %p, report_len %
u.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u, usage %u, value %p, preparsed_data %p, report_buf %p, report_len %l
u.
\n
"
,
report_type
,
usage_page
,
collection
,
usage
,
value
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -321,8 +321,8 @@ NTSTATUS WINAPI HidP_GetUsageValueArray( HIDP_REPORT_TYPE report_type, USAGE usa
struct
caps_filter
filter
=
{.
values
=
TRUE
,
.
array
=
TRUE
,
.
usage_page
=
usage_page
,
.
collection
=
collection
,
.
usage
=
usage
};
USHORT
count
=
1
;
TRACE
(
"report_type %d, usage_page %
x, collection %d, usage %x
, value_buf %p, value_len %u, "
"preparsed_data %p, report_buf %p, report_len %u.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u, usage %u
, value_buf %p, value_len %u, "
"preparsed_data %p, report_buf %p, report_len %
l
u.
\n
"
,
report_type
,
usage_page
,
collection
,
usage
,
value_buf
,
value_len
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -383,8 +383,9 @@ NTSTATUS WINAPI HidP_GetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page,
NTSTATUS
status
;
USHORT
limit
=
-
1
;
TRACE
(
"report_type %d, collection %d, usages %p, usages_len %p, preparsed_data %p, report_buf %p, report_len %u.
\n
"
,
report_type
,
collection
,
usages
,
usages_len
,
preparsed_data
,
report_buf
,
report_len
);
TRACE
(
"report_type %d, usage_page %u, collection %u, usages %p, usages_len %p, preparsed_data %p, "
"report_buf %p, report_len %lu.
\n
"
,
report_type
,
usage_page
,
collection
,
usages
,
usages_len
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -410,7 +411,7 @@ NTSTATUS WINAPI HidP_InitializeReportForID( HIDP_REPORT_TYPE report_type, UCHAR
const
struct
hid_value_caps
*
caps
,
*
end
;
NTSTATUS
status
;
TRACE
(
"report_type %d, report_id %
x, preparsed_data %p, report_buf %p, report_len %
u.
\n
"
,
report_type
,
TRACE
(
"report_type %d, report_id %
u, preparsed_data %p, report_buf %p, report_len %l
u.
\n
"
,
report_type
,
report_id
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -439,7 +440,7 @@ ULONG WINAPI HidP_MaxUsageListLength( HIDP_REPORT_TYPE report_type, USAGE usage_
USHORT
limit
=
-
1
;
ULONG
count
=
0
;
TRACE
(
"report_type %d, usage_page %
x
, preparsed_data %p.
\n
"
,
report_type
,
usage_page
,
preparsed_data
);
TRACE
(
"report_type %d, usage_page %
u
, preparsed_data %p.
\n
"
,
report_type
,
usage_page
,
preparsed_data
);
enum_value_caps
(
preparsed
,
report_type
,
0
,
&
filter
,
get_usage_list_length
,
&
count
,
&
limit
);
return
count
;
...
...
@@ -485,7 +486,7 @@ NTSTATUS WINAPI HidP_SetScaledUsageValue( HIDP_REPORT_TYPE report_type, USAGE us
struct
caps_filter
filter
=
{.
values
=
TRUE
,
.
usage_page
=
usage_page
,
.
collection
=
collection
,
.
usage
=
usage
};
USHORT
count
=
1
;
TRACE
(
"report_type %d, usage_page %
x, collection %d, usage %x, value %d, preparsed_data %p, report_buf %p, report_len %
u.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u, usage %u, value %ld, preparsed_data %p, report_buf %p, report_len %l
u.
\n
"
,
report_type
,
usage_page
,
collection
,
usage
,
value
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -516,7 +517,7 @@ NTSTATUS WINAPI HidP_SetUsageValue( HIDP_REPORT_TYPE report_type, USAGE usage_pa
struct
caps_filter
filter
=
{.
values
=
TRUE
,
.
usage_page
=
usage_page
,
.
collection
=
collection
,
.
usage
=
usage
};
USHORT
count
=
1
;
TRACE
(
"report_type %d, usage_page %
x, collection %d, usage %x, value %u, preparsed_data %p, report_buf %p, report_len %
u.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u, usage %u, value %lu, preparsed_data %p, report_buf %p, report_len %l
u.
\n
"
,
report_type
,
usage_page
,
collection
,
usage
,
value
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -534,8 +535,8 @@ NTSTATUS WINAPI HidP_SetUsageValueArray( HIDP_REPORT_TYPE report_type, USAGE usa
struct
caps_filter
filter
=
{.
values
=
TRUE
,
.
array
=
TRUE
,
.
usage_page
=
usage_page
,
.
collection
=
collection
,
.
usage
=
usage
};
USHORT
count
=
1
;
TRACE
(
"report_type %d, usage_page %
x, collection %d, usage %x
, value_buf %p, value_len %u, "
"preparsed_data %p, report_buf %p, report_len %u.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u, usage %u
, value_buf %p, value_len %u, "
"preparsed_data %p, report_buf %p, report_len %
l
u.
\n
"
,
report_type
,
usage_page
,
collection
,
usage
,
value_buf
,
value_len
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -590,8 +591,8 @@ NTSTATUS WINAPI HidP_SetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page,
USHORT
limit
=
1
;
ULONG
i
,
count
=
*
usage_count
;
TRACE
(
"report_type %d, usage_page %
x, collection %d
, usages %p, usage_count %p, preparsed_data %p, "
"report_buf %p, report_len %u.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u
, usages %p, usage_count %p, preparsed_data %p, "
"report_buf %p, report_len %
l
u.
\n
"
,
report_type
,
usage_page
,
collection
,
usages
,
usage_count
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -656,8 +657,8 @@ NTSTATUS WINAPI HidP_UnsetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page
USHORT
limit
=
1
;
ULONG
i
,
count
=
*
usage_count
;
TRACE
(
"report_type %d, usage_page %
x, collection %d
, usages %p, usage_count %p, preparsed_data %p, "
"report_buf %p, report_len %u.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u
, usages %p, usage_count %p, preparsed_data %p, "
"report_buf %p, report_len %
l
u.
\n
"
,
report_type
,
usage_page
,
collection
,
usages
,
usage_count
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -679,8 +680,8 @@ NTSTATUS WINAPI HidP_TranslateUsagesToI8042ScanCodes(USAGE *ChangedUsageList,
HIDP_KEYBOARD_MODIFIER_STATE
*
ModifierState
,
PHIDP_INSERT_SCANCODES
InsertCodesProcedure
,
VOID
*
InsertCodesContext
)
{
FIXME
(
"stub: %p, %i, %i, %p, %p, %p
\n
"
,
ChangedUsageList
,
UsageListLength
,
KeyAction
,
ModifierState
,
InsertCodesProcedure
,
InsertCodesContext
);
FIXME
(
"ChangedUsageList %p, UsageListLength %lu, KeyAction %u, ModifierState %p, InsertCodesProcedure %p, InsertCodesContext %p stub!
\n
"
,
ChangedUsageList
,
UsageListLength
,
KeyAction
,
ModifierState
,
InsertCodesProcedure
,
InsertCodesContext
);
return
STATUS_NOT_IMPLEMENTED
;
}
...
...
@@ -736,7 +737,7 @@ NTSTATUS WINAPI HidP_GetSpecificButtonCaps( HIDP_REPORT_TYPE report_type, USAGE
struct
hid_preparsed_data
*
preparsed
=
(
struct
hid_preparsed_data
*
)
preparsed_data
;
const
struct
caps_filter
filter
=
{.
buttons
=
TRUE
,
.
usage_page
=
usage_page
,
.
collection
=
collection
,
.
usage
=
usage
};
TRACE
(
"report_type %d, usage_page %
x, collection %d, usage %x
, caps %p, caps_count %p, preparsed_data %p.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u, usage %u
, caps %p, caps_count %p, preparsed_data %p.
\n
"
,
report_type
,
usage_page
,
collection
,
usage
,
caps
,
caps_count
,
preparsed_data
);
return
enum_value_caps
(
preparsed
,
report_type
,
0
,
&
filter
,
get_button_caps
,
&
caps
,
caps_count
);
...
...
@@ -803,7 +804,7 @@ NTSTATUS WINAPI HidP_GetSpecificValueCaps( HIDP_REPORT_TYPE report_type, USAGE u
struct
hid_preparsed_data
*
preparsed
=
(
struct
hid_preparsed_data
*
)
preparsed_data
;
const
struct
caps_filter
filter
=
{.
values
=
TRUE
,
.
usage_page
=
usage_page
,
.
collection
=
collection
,
.
usage
=
usage
};
TRACE
(
"report_type %d, usage_page %
x, collection %d, usage %x
, caps %p, caps_count %p, preparsed_data %p.
\n
"
,
TRACE
(
"report_type %d, usage_page %
u, collection %u, usage %u
, caps %p, caps_count %p, preparsed_data %p.
\n
"
,
report_type
,
usage_page
,
collection
,
usage
,
caps
,
caps_count
,
preparsed_data
);
return
enum_value_caps
(
preparsed
,
report_type
,
0
,
&
filter
,
get_value_caps
,
&
caps
,
caps_count
);
...
...
@@ -868,7 +869,7 @@ NTSTATUS WINAPI HidP_GetUsagesEx( HIDP_REPORT_TYPE report_type, USHORT collectio
NTSTATUS
status
;
USHORT
limit
=
-
1
;
TRACE
(
"report_type %d, collection %
d, usages %p, usages_len %p, preparsed_data %p, report_buf %p, report_len %
u.
\n
"
,
TRACE
(
"report_type %d, collection %
u, usages %p, usages_len %p, preparsed_data %p, report_buf %p, report_len %l
u.
\n
"
,
report_type
,
collection
,
usages
,
usages_len
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
@@ -980,7 +981,7 @@ NTSTATUS WINAPI HidP_GetData( HIDP_REPORT_TYPE report_type, HIDP_DATA *data, ULO
NTSTATUS
status
;
USHORT
limit
=
-
1
;
TRACE
(
"report_type %d, data %p, data_len %p, preparsed_data %p, report_buf %p, report_len %u.
\n
"
,
TRACE
(
"report_type %d, data %p, data_len %p, preparsed_data %p, report_buf %p, report_len %
l
u.
\n
"
,
report_type
,
data
,
data_len
,
preparsed_data
,
report_buf
,
report_len
);
if
(
!
report_len
)
return
HIDP_STATUS_INVALID_REPORT_LENGTH
;
...
...
dlls/hidparse.sys/Makefile.in
View file @
397859dd
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
hidparse.sys
IMPORTLIB
=
hidparse
IMPORTS
=
ntoskrnl
...
...
dlls/hidparse.sys/main.c
View file @
397859dd
...
...
@@ -103,7 +103,7 @@ static inline const char *debugstr_hid_value_caps( struct hid_value_caps *caps )
{
if
(
!
caps
)
return
"(null)"
;
return
wine_dbg_sprintf
(
"RId %d, Usg %02x:%02x-%02x Dat %02x-%02x, Str %d-%d, Des %d-%d, "
"Bits %02
x Flags %#x, LCol %d LUsg %02x:%02x, BitSz %d, RCnt %d, Unit %x E%+d, Log %+d-%+d, Phy %+d-%+
d"
,
"Bits %02
lx Flags %#lx, LCol %d LUsg %02x:%02x, BitSz %d, RCnt %d, Unit %lx E%+ld, Log %+ld-%+ld, Phy %+ld-%+l
d"
,
caps
->
report_id
,
caps
->
usage_page
,
caps
->
usage_min
,
caps
->
usage_max
,
caps
->
data_index_min
,
caps
->
data_index_max
,
caps
->
string_min
,
caps
->
string_max
,
caps
->
designator_min
,
caps
->
designator_max
,
caps
->
bit_field
,
caps
->
flags
,
caps
->
link_collection
,
caps
->
link_usage_page
,
caps
->
link_usage
,
caps
->
bit_size
,
caps
->
report_count
,
...
...
@@ -113,7 +113,7 @@ static inline const char *debugstr_hid_value_caps( struct hid_value_caps *caps )
static
inline
const
char
*
debugstr_hid_collection_node
(
struct
hid_collection_node
*
node
)
{
if
(
!
node
)
return
"(null)"
;
return
wine_dbg_sprintf
(
"Usg %02x:%02x, Parent %u, Next %u, NbChild %u, Child %u, Type %02x"
,
return
wine_dbg_sprintf
(
"Usg %02x:%02x, Parent %u, Next %u, NbChild %u, Child %u, Type %02
l
x"
,
node
->
usage_page
,
node
->
usage
,
node
->
parent
,
node
->
next_sibling
,
node
->
number_of_children
,
node
->
first_child
,
node
->
collection_type
);
}
...
...
@@ -416,8 +416,8 @@ static BOOL parse_new_value_caps( struct hid_parser_state *state, HIDP_REPORT_TY
static
void
free_parser_state
(
struct
hid_parser_state
*
state
)
{
if
(
state
->
global_idx
)
ERR
(
"%u unpopped device caps on the stack
\n
"
,
state
->
global_idx
);
if
(
state
->
collection_idx
)
ERR
(
"%u unpopped device collection on the stack
\n
"
,
state
->
collection_idx
);
if
(
state
->
global_idx
)
ERR
(
"%
l
u unpopped device caps on the stack
\n
"
,
state
->
global_idx
);
if
(
state
->
collection_idx
)
ERR
(
"%
l
u unpopped device collection on the stack
\n
"
,
state
->
collection_idx
);
free
(
state
->
stack
);
free
(
state
->
collections
);
free
(
state
->
values
[
HidP_Input
]
);
...
...
@@ -647,7 +647,7 @@ NTSTATUS WINAPI HidP_GetCollectionDescription( PHIDP_REPORT_DESCRIPTOR report_de
struct
hid_value_caps
*
caps
,
*
caps_end
;
struct
hid_preparsed_data
*
preparsed
;
TRACE
(
"report_desc %p, report_desc_len %u, pool_type %u, device_desc %p.
\n
"
,
TRACE
(
"report_desc %p, report_desc_len %
l
u, pool_type %u, device_desc %p.
\n
"
,
report_desc
,
report_desc_len
,
pool_type
,
device_desc
);
memset
(
device_desc
,
0
,
sizeof
(
*
device_desc
)
);
...
...
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