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
60fefd72
Commit
60fefd72
authored
Sep 20, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupDiSetDeviceRegistryPropertyA/W.
parent
bc924f5b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
2 deletions
+98
-2
devinst.c
dlls/setupapi/devinst.c
+96
-0
setupapi.spec
dlls/setupapi/setupapi.spec
+2
-2
No files found.
dlls/setupapi/devinst.c
View file @
60fefd72
...
...
@@ -1647,6 +1647,102 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(
}
/***********************************************************************
* SetupDiSetDeviceRegistryPropertyA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiSetDeviceRegistryPropertyA
(
HDEVINFO
DeviceInfoSet
,
PSP_DEVINFO_DATA
DeviceInfoData
,
DWORD
Property
,
const
BYTE
*
PropertyBuffer
,
DWORD
PropertyBufferSize
)
{
BOOL
ret
=
FALSE
;
struct
DeviceInfoSet
*
set
=
(
struct
DeviceInfoSet
*
)
DeviceInfoSet
;
struct
DeviceInfo
*
devInfo
;
TRACE
(
"%p %p %d %p %d
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
Property
,
PropertyBuffer
,
PropertyBufferSize
);
if
(
!
DeviceInfoSet
||
DeviceInfoSet
==
INVALID_HANDLE_VALUE
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
set
->
magic
!=
SETUP_DEVICE_INFO_SET_MAGIC
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
!
DeviceInfoData
||
DeviceInfoData
->
cbSize
!=
sizeof
(
SP_DEVINFO_DATA
)
||
!
DeviceInfoData
->
Reserved
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
devInfo
=
(
struct
DeviceInfo
*
)
DeviceInfoData
->
Reserved
;
if
(
Property
<
sizeof
(
PropertyMap
)
/
sizeof
(
PropertyMap
[
0
])
&&
PropertyMap
[
Property
].
nameA
)
{
LONG
l
=
RegSetValueExA
(
devInfo
->
key
,
PropertyMap
[
Property
].
nameA
,
0
,
PropertyMap
[
Property
].
regType
,
PropertyBuffer
,
PropertyBufferSize
);
if
(
!
l
)
ret
=
TRUE
;
else
SetLastError
(
l
);
}
return
ret
;
}
/***********************************************************************
* SetupDiSetDeviceRegistryPropertyW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiSetDeviceRegistryPropertyW
(
HDEVINFO
DeviceInfoSet
,
PSP_DEVINFO_DATA
DeviceInfoData
,
DWORD
Property
,
const
BYTE
*
PropertyBuffer
,
DWORD
PropertyBufferSize
)
{
BOOL
ret
=
FALSE
;
struct
DeviceInfoSet
*
set
=
(
struct
DeviceInfoSet
*
)
DeviceInfoSet
;
struct
DeviceInfo
*
devInfo
;
TRACE
(
"%p %p %d %p %d
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
Property
,
PropertyBuffer
,
PropertyBufferSize
);
if
(
!
DeviceInfoSet
||
DeviceInfoSet
==
INVALID_HANDLE_VALUE
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
set
->
magic
!=
SETUP_DEVICE_INFO_SET_MAGIC
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
!
DeviceInfoData
||
DeviceInfoData
->
cbSize
!=
sizeof
(
SP_DEVINFO_DATA
)
||
!
DeviceInfoData
->
Reserved
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
devInfo
=
(
struct
DeviceInfo
*
)
DeviceInfoData
->
Reserved
;
if
(
Property
<
sizeof
(
PropertyMap
)
/
sizeof
(
PropertyMap
[
0
])
&&
PropertyMap
[
Property
].
nameW
)
{
LONG
l
=
RegSetValueExW
(
devInfo
->
key
,
PropertyMap
[
Property
].
nameW
,
0
,
PropertyMap
[
Property
].
regType
,
PropertyBuffer
,
PropertyBufferSize
);
if
(
!
l
)
ret
=
TRUE
;
else
SetLastError
(
l
);
}
return
ret
;
}
/***********************************************************************
* SetupDiInstallClassA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiInstallClassA
(
...
...
dlls/setupapi/setupapi.spec
View file @
60fefd72
...
...
@@ -374,8 +374,8 @@
@ stub SetupDiSetClassInstallParamsW
@ stub SetupDiSetDeviceInstallParamsA
@ stub SetupDiSetDeviceInstallParamsW
@ st
ub SetupDiSetDeviceRegistryPropertyA
@ st
ub SetupDiSetDeviceRegistryPropertyW
@ st
dcall SetupDiSetDeviceRegistryPropertyA(ptr ptr long ptr ptr)
@ st
dcall SetupDiSetDeviceRegistryPropertyW(ptr ptr long ptr ptr)
@ stub SetupDiSetDriverInstallParamsA
@ stub SetupDiSetDriverInstallParamsW
@ stub SetupDiSetSelectedDevice
...
...
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