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
4588f10f
Commit
4588f10f
authored
Jan 26, 2020
by
Chip Davis
Committed by
Alexandre Julliard
Jan 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement CM_Get_DevNode_Property[_Ex]W().
Signed-off-by:
Chip Davis
<
cdavis@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1fe3f60f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
30 deletions
+83
-30
api-ms-win-devices-config-l1-1-0.spec
...vices-config-l1-1-0/api-ms-win-devices-config-l1-1-0.spec
+1
-1
api-ms-win-devices-config-l1-1-1.spec
...vices-config-l1-1-1/api-ms-win-devices-config-l1-1-1.spec
+1
-1
cfgmgr32.spec
dlls/cfgmgr32/cfgmgr32.spec
+2
-0
devinst.c
dlls/setupapi/devinst.c
+77
-28
setupapi.spec
dlls/setupapi/setupapi.spec
+2
-0
No files found.
dlls/api-ms-win-devices-config-l1-1-0/api-ms-win-devices-config-l1-1-0.spec
View file @
4588f10f
...
...
@@ -8,7 +8,7 @@
@ stub CM_Get_Class_Property_Keys
@ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr long long ptr) setupapi.CM_Get_Class_Registry_PropertyW
@ stub CM_Get_Depth
@ st
ub
CM_Get_DevNode_PropertyW
@ st
dcall CM_Get_DevNode_PropertyW(long ptr ptr ptr ptr long) setupapi.
CM_Get_DevNode_PropertyW
@ stub CM_Get_DevNode_Property_Keys
@ stdcall CM_Get_DevNode_Registry_PropertyW(long long ptr ptr ptr long) setupapi.CM_Get_DevNode_Registry_PropertyW
@ stdcall CM_Get_DevNode_Status(ptr ptr long long) setupapi.CM_Get_DevNode_Status
...
...
dlls/api-ms-win-devices-config-l1-1-1/api-ms-win-devices-config-l1-1-1.spec
View file @
4588f10f
...
...
@@ -8,7 +8,7 @@
@ stub CM_Get_Class_Property_Keys
@ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr long long ptr) setupapi.CM_Get_Class_Registry_PropertyW
@ stub CM_Get_Depth
@ st
ub
CM_Get_DevNode_PropertyW
@ st
dcall CM_Get_DevNode_PropertyW(long ptr ptr ptr ptr long) setupapi.
CM_Get_DevNode_PropertyW
@ stub CM_Get_DevNode_Property_Keys
@ stdcall CM_Get_DevNode_Registry_PropertyW(long long ptr ptr ptr long) setupapi.CM_Get_DevNode_Registry_PropertyW
@ stdcall CM_Get_DevNode_Status(ptr ptr long long) setupapi.CM_Get_DevNode_Status
...
...
dlls/cfgmgr32/cfgmgr32.spec
View file @
4588f10f
...
...
@@ -57,6 +57,8 @@
@ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr long long ptr) setupapi.CM_Get_Class_Registry_PropertyW
@ stub CM_Get_Depth
@ stub CM_Get_Depth_Ex
@ stdcall CM_Get_DevNode_PropertyW(long ptr ptr ptr ptr long) setupapi.CM_Get_DevNode_PropertyW
@ stdcall CM_Get_DevNode_Property_ExW(long ptr ptr ptr ptr long ptr) setupapi.CM_Get_DevNode_Property_ExW
@ stdcall CM_Get_DevNode_Registry_PropertyA(long long ptr ptr ptr long) setupapi.CM_Get_DevNode_Registry_PropertyA
@ stdcall CM_Get_DevNode_Registry_PropertyW(long long ptr ptr ptr long) setupapi.CM_Get_DevNode_Registry_PropertyW
@ stdcall CM_Get_DevNode_Registry_Property_ExA(long long ptr ptr ptr long ptr) setupapi.CM_Get_DevNode_Registry_Property_ExA
...
...
dlls/setupapi/devinst.c
View file @
4588f10f
...
...
@@ -4177,47 +4177,26 @@ BOOL WINAPI SetupDiGetINFClassW(PCWSTR inf, LPGUID class_guid, PWSTR class_name,
return
(
have_guid
||
have_name
);
}
/***********************************************************************
* SetupDiGetDevicePropertyW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiGetDevicePropertyW
(
HDEVINFO
devinfo
,
PSP_DEVINFO_DATA
device_data
,
const
DEVPROPKEY
*
prop_key
,
DEVPROPTYPE
*
prop_type
,
BYTE
*
prop_buff
,
DWORD
prop_buff_size
,
DWORD
*
required_size
,
DWORD
flags
)
static
LSTATUS
get_device_property
(
struct
device
*
device
,
const
DEVPROPKEY
*
prop_key
,
DEVPROPTYPE
*
prop_type
,
BYTE
*
prop_buff
,
DWORD
prop_buff_size
,
DWORD
*
required_size
,
DWORD
flags
)
{
static
const
WCHAR
formatW
[]
=
{
'\\'
,
'%'
,
'0'
,
'4'
,
'X'
,
0
};
WCHAR
key_path
[
55
]
=
{
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'i'
,
'e'
,
's'
,
'\\'
};
WCHAR
key_path
[
55
]
=
L"Properties
\\
"
;
HKEY
hkey
;
DWORD
value_type
;
DWORD
value_size
=
0
;
LSTATUS
ls
;
struct
device
*
device
;
TRACE
(
"%p, %p, %p, %p, %p, %d, %p, %#x
\n
"
,
devinfo
,
device_data
,
prop_key
,
prop_type
,
prop_buff
,
prop_buff_size
,
required_size
,
flags
);
if
(
!
(
device
=
get_device
(
devinfo
,
device_data
)))
return
FALSE
;
if
(
!
prop_key
)
{
SetLastError
(
ERROR_INVALID_DATA
);
return
FALSE
;
}
return
ERROR_INVALID_DATA
;
if
(
!
prop_type
||
(
!
prop_buff
&&
prop_buff_size
))
{
SetLastError
(
ERROR_INVALID_USER_BUFFER
);
return
FALSE
;
}
return
ERROR_INVALID_USER_BUFFER
;
if
(
flags
)
{
SetLastError
(
ERROR_INVALID_FLAGS
);
return
FALSE
;
}
return
ERROR_INVALID_FLAGS
;
SETUPDI_GuidToString
(
&
prop_key
->
fmtid
,
key_path
+
11
);
swprintf
(
key_path
+
49
,
ARRAY_SIZE
(
key_path
)
-
49
,
formatW
,
prop_key
->
pid
);
swprintf
(
key_path
+
49
,
ARRAY_SIZE
(
key_path
)
-
49
,
L"
\\
%04X"
,
prop_key
->
pid
);
ls
=
RegOpenKeyExW
(
device
->
key
,
key_path
,
0
,
KEY_QUERY_VALUE
,
&
hkey
);
if
(
!
ls
)
...
...
@@ -4248,11 +4227,81 @@ BOOL WINAPI SetupDiGetDevicePropertyW(HDEVINFO devinfo, PSP_DEVINFO_DATA device_
if
(
required_size
)
*
required_size
=
value_size
;
return
ls
;
}
/***********************************************************************
* SetupDiGetDevicePropertyW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiGetDevicePropertyW
(
HDEVINFO
devinfo
,
PSP_DEVINFO_DATA
device_data
,
const
DEVPROPKEY
*
prop_key
,
DEVPROPTYPE
*
prop_type
,
BYTE
*
prop_buff
,
DWORD
prop_buff_size
,
DWORD
*
required_size
,
DWORD
flags
)
{
struct
device
*
device
;
LSTATUS
ls
;
TRACE
(
"%p, %p, %p, %p, %p, %d, %p, %#x
\n
"
,
devinfo
,
device_data
,
prop_key
,
prop_type
,
prop_buff
,
prop_buff_size
,
required_size
,
flags
);
if
(
!
(
device
=
get_device
(
devinfo
,
device_data
)))
return
FALSE
;
ls
=
get_device_property
(
device
,
prop_key
,
prop_type
,
prop_buff
,
prop_buff_size
,
required_size
,
flags
);
SetLastError
(
ls
);
return
!
ls
;
}
/***********************************************************************
* CM_Get_DevNode_Property_ExW (SETUPAPI.@)
*/
CONFIGRET
WINAPI
CM_Get_DevNode_Property_ExW
(
DEVINST
devnode
,
const
DEVPROPKEY
*
prop_key
,
DEVPROPTYPE
*
prop_type
,
BYTE
*
prop_buff
,
ULONG
*
prop_buff_size
,
ULONG
flags
,
HMACHINE
machine
)
{
struct
device
*
device
=
get_devnode_device
(
devnode
);
LSTATUS
ls
;
TRACE
(
"%u, %p, %p, %p, %p, %#x, %p
\n
"
,
devnode
,
prop_key
,
prop_type
,
prop_buff
,
prop_buff_size
,
flags
,
machine
);
if
(
machine
)
return
CR_MACHINE_UNAVAILABLE
;
if
(
!
device
)
return
CR_NO_SUCH_DEVINST
;
if
(
!
prop_buff_size
)
return
CR_INVALID_POINTER
;
ls
=
get_device_property
(
device
,
prop_key
,
prop_type
,
prop_buff
,
*
prop_buff_size
,
prop_buff_size
,
flags
);
switch
(
ls
)
{
case
NO_ERROR
:
return
CR_SUCCESS
;
case
ERROR_INVALID_DATA
:
return
CR_INVALID_DATA
;
case
ERROR_INVALID_USER_BUFFER
:
return
CR_INVALID_POINTER
;
case
ERROR_INVALID_FLAGS
:
return
CR_INVALID_FLAG
;
case
ERROR_INSUFFICIENT_BUFFER
:
return
CR_BUFFER_SMALL
;
case
ERROR_NOT_FOUND
:
return
CR_NO_SUCH_VALUE
;
}
return
CR_FAILURE
;
}
/***********************************************************************
* CM_Get_DevNode_PropertyW (SETUPAPI.@)
*/
CONFIGRET
WINAPI
CM_Get_DevNode_PropertyW
(
DEVINST
dev
,
const
DEVPROPKEY
*
key
,
DEVPROPTYPE
*
type
,
PVOID
buf
,
PULONG
len
,
ULONG
flags
)
{
return
CM_Get_DevNode_Property_ExW
(
dev
,
key
,
type
,
buf
,
len
,
flags
,
NULL
);
}
/***********************************************************************
* SetupDiInstallDeviceInterfaces (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiInstallDeviceInterfaces
(
HDEVINFO
devinfo
,
SP_DEVINFO_DATA
*
device_data
)
...
...
dlls/setupapi/setupapi.spec
View file @
4588f10f
...
...
@@ -67,6 +67,8 @@
@ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr long long ptr)
@ stub CM_Get_Depth
@ stub CM_Get_Depth_Ex
@ stdcall CM_Get_DevNode_PropertyW(long ptr ptr ptr ptr long)
@ stdcall CM_Get_DevNode_Property_ExW(long ptr ptr ptr ptr long ptr)
@ stdcall CM_Get_DevNode_Registry_PropertyA(long long ptr ptr ptr long)
@ stdcall CM_Get_DevNode_Registry_PropertyW(long long ptr ptr ptr long)
@ stdcall CM_Get_DevNode_Registry_Property_ExA(long long ptr ptr ptr long ptr)
...
...
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