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
5ce7fcae
Commit
5ce7fcae
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: Store pointer to an interface's device in the interface instance.
parent
e9b55346
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
devinst.c
dlls/setupapi/devinst.c
+8
-8
No files found.
dlls/setupapi/devinst.c
View file @
5ce7fcae
...
...
@@ -104,8 +104,9 @@ struct DeviceInfoSet
/* Pointed to by SP_DEVICE_INTERFACE_DATA's Reserved member */
struct
InterfaceInfo
{
LPWSTR
referenceString
;
LPWSTR
symbolicLink
;
LPWSTR
referenceString
;
LPWSTR
symbolicLink
;
PSP_DEVINFO_DATA
device
;
};
/* A device may have multiple instances of the same interface, so this holds
...
...
@@ -258,10 +259,11 @@ static LPWSTR SETUPDI_CreateSymbolicLinkPath(LPCWSTR instanceId,
* the device, if it doesn't already exist in the device. If iface is not
* NULL, returns a pointer to the newly added (or already existing) interface.
*/
static
BOOL
SETUPDI_AddInterfaceInstance
(
struct
DeviceInfo
*
devInfo
,
static
BOOL
SETUPDI_AddInterfaceInstance
(
PSP_DEVINFO_DATA
DeviceInfoData
,
const
GUID
*
InterfaceClassGuid
,
LPCWSTR
ReferenceString
,
SP_DEVICE_INTERFACE_DATA
**
ifaceData
)
{
struct
DeviceInfo
*
devInfo
=
(
struct
DeviceInfo
*
)
DeviceInfoData
->
Reserved
;
BOOL
newInterface
=
FALSE
,
ret
;
struct
InterfaceInstances
*
iface
=
NULL
;
...
...
@@ -313,6 +315,7 @@ static BOOL SETUPDI_AddInterfaceInstance(struct DeviceInfo *devInfo,
if
(
ifaceInfo
)
{
ret
=
TRUE
;
ifaceInfo
->
device
=
DeviceInfoData
;
ifaceInfo
->
symbolicLink
=
SETUPDI_CreateSymbolicLinkPath
(
devInfo
->
instanceId
,
InterfaceClassGuid
,
ReferenceString
);
...
...
@@ -1736,7 +1739,6 @@ end:
static
void
SETUPDI_AddDeviceInterfaces
(
SP_DEVINFO_DATA
*
dev
,
HKEY
key
,
const
GUID
*
interface
)
{
struct
DeviceInfo
*
devInfo
=
(
struct
DeviceInfo
*
)
dev
->
Reserved
;
DWORD
i
,
len
;
WCHAR
subKeyName
[
MAX_PATH
];
LONG
l
=
ERROR_SUCCESS
;
...
...
@@ -1751,7 +1753,7 @@ static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key,
SP_DEVICE_INTERFACE_DATA
*
iface
=
NULL
;
/* The subkey name is the reference string, with a '#' prepended */
SETUPDI_AddInterfaceInstance
(
dev
Info
,
interface
,
subKeyName
+
1
,
SETUPDI_AddInterfaceInstance
(
dev
,
interface
,
subKeyName
+
1
,
&
iface
);
l
=
RegOpenKeyExW
(
key
,
subKeyName
,
0
,
KEY_READ
,
&
subKey
);
if
(
!
l
)
...
...
@@ -2113,7 +2115,6 @@ BOOL WINAPI SetupDiCreateDeviceInterfaceW(
PSP_DEVICE_INTERFACE_DATA
DeviceInterfaceData
)
{
struct
DeviceInfoSet
*
set
=
(
struct
DeviceInfoSet
*
)
DeviceInfoSet
;
struct
DeviceInfo
*
devInfo
;
SP_DEVICE_INTERFACE_DATA
*
iface
=
NULL
;
BOOL
ret
;
...
...
@@ -2142,8 +2143,7 @@ BOOL WINAPI SetupDiCreateDeviceInterfaceW(
SetLastError
(
ERROR_INVALID_USER_BUFFER
);
return
FALSE
;
}
devInfo
=
(
struct
DeviceInfo
*
)
DeviceInfoData
->
Reserved
;
if
((
ret
=
SETUPDI_AddInterfaceInstance
(
devInfo
,
InterfaceClassGuid
,
if
((
ret
=
SETUPDI_AddInterfaceInstance
(
DeviceInfoData
,
InterfaceClassGuid
,
ReferenceString
,
&
iface
)))
{
if
(
DeviceInterfaceData
)
...
...
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