Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
21b7e1fa
Commit
21b7e1fa
authored
Sep 21, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupDiCreateDeviceInterfaceRegKeyA/W.
parent
443cfda4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
2 deletions
+99
-2
devinst.c
dlls/setupapi/devinst.c
+99
-2
No files found.
dlls/setupapi/devinst.c
View file @
21b7e1fa
...
...
@@ -2171,9 +2171,27 @@ HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyA(
HINF
InfHandle
,
PCSTR
InfSectionName
)
{
FIXME
(
"%p %p %d %08x %p %p
\n
"
,
DeviceInfoSet
,
DeviceInterfaceData
,
Reserved
,
HKEY
key
;
PWSTR
InfSectionNameW
=
NULL
;
TRACE
(
"%p %p %d %08x %p %p
\n
"
,
DeviceInfoSet
,
DeviceInterfaceData
,
Reserved
,
samDesired
,
InfHandle
,
InfSectionName
);
if
(
InfHandle
)
{
if
(
!
InfSectionName
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
INVALID_HANDLE_VALUE
;
}
InfSectionNameW
=
MultiByteToUnicode
(
InfSectionName
,
CP_ACP
);
if
(
!
InfSectionNameW
)
return
INVALID_HANDLE_VALUE
;
}
key
=
SetupDiCreateDeviceInterfaceRegKeyW
(
DeviceInfoSet
,
DeviceInterfaceData
,
Reserved
,
samDesired
,
InfHandle
,
InfSectionNameW
);
MyFree
(
InfSectionNameW
);
return
key
;
}
/***********************************************************************
...
...
@@ -2187,9 +2205,88 @@ HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyW(
HINF
InfHandle
,
PCWSTR
InfSectionName
)
{
FIXME
(
"%p %p %d %08x %p %p
\n
"
,
DeviceInfoSet
,
DeviceInterfaceData
,
Reserved
,
struct
DeviceInfoSet
*
set
=
(
struct
DeviceInfoSet
*
)
DeviceInfoSet
;
HKEY
key
=
INVALID_HANDLE_VALUE
,
interfacesKey
;
LONG
l
;
TRACE
(
"%p %p %d %08x %p %p
\n
"
,
DeviceInfoSet
,
DeviceInterfaceData
,
Reserved
,
samDesired
,
InfHandle
,
InfSectionName
);
if
(
!
DeviceInfoSet
||
DeviceInfoSet
==
(
HDEVINFO
)
INVALID_HANDLE_VALUE
||
set
->
magic
!=
SETUP_DEVICE_INFO_SET_MAGIC
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
INVALID_HANDLE_VALUE
;
}
if
(
!
DeviceInterfaceData
||
DeviceInterfaceData
->
cbSize
!=
sizeof
(
SP_DEVICE_INTERFACE_DATA
)
||
!
DeviceInterfaceData
->
Reserved
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
INVALID_HANDLE_VALUE
;
}
if
(
InfHandle
&&
!
InfSectionName
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
INVALID_HANDLE_VALUE
;
}
if
(
!
(
l
=
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
DeviceClasses
,
0
,
NULL
,
0
,
samDesired
,
NULL
,
&
interfacesKey
,
NULL
)))
{
HKEY
parent
;
WCHAR
bracedGuidString
[
39
];
SETUPDI_GuidToString
(
&
DeviceInterfaceData
->
InterfaceClassGuid
,
bracedGuidString
);
if
(
!
(
l
=
RegCreateKeyExW
(
interfacesKey
,
bracedGuidString
,
0
,
NULL
,
0
,
samDesired
,
NULL
,
&
parent
,
NULL
)))
{
static
const
WCHAR
hash
[]
=
{
'#'
,
0
};
struct
InterfaceInfo
*
ifaceInfo
=
(
struct
InterfaceInfo
*
)
DeviceInterfaceData
->
Reserved
;
LPCWSTR
instancePath
=
NULL
;
LPWSTR
referencePath
=
NULL
;
if
(
ifaceInfo
->
referenceString
)
{
referencePath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
ifaceInfo
->
referenceString
)
+
2
)
*
sizeof
(
WCHAR
));
if
(
referencePath
)
{
lstrcpyW
(
referencePath
,
hash
);
lstrcatW
(
referencePath
,
ifaceInfo
->
referenceString
);
instancePath
=
referencePath
;
}
else
SetLastError
(
ERROR_OUTOFMEMORY
);
}
else
instancePath
=
hash
;
if
(
instancePath
)
{
LONG
l
;
l
=
RegCreateKeyExW
(
parent
,
instancePath
,
0
,
NULL
,
0
,
samDesired
,
NULL
,
&
key
,
NULL
);
if
(
l
)
{
SetLastError
(
l
);
key
=
INVALID_HANDLE_VALUE
;
}
else
if
(
InfHandle
)
FIXME
(
"INF section installation unsupported
\n
"
);
}
HeapFree
(
GetProcessHeap
(),
0
,
referencePath
);
RegCloseKey
(
parent
);
}
else
SetLastError
(
l
);
RegCloseKey
(
interfacesKey
);
}
else
SetLastError
(
l
);
return
key
;
}
/***********************************************************************
...
...
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