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
d0a2866a
Commit
d0a2866a
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 set in device, and use it to make sure that a device…
setupapi: Store pointer to set in device, and use it to make sure that a device is a member of a set.
parent
21b7e1fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
devinst.c
dlls/setupapi/devinst.c
+26
-7
No files found.
dlls/setupapi/devinst.c
View file @
d0a2866a
...
...
@@ -124,10 +124,11 @@ struct InterfaceInstances
/* Pointed to by SP_DEVINFO_DATA's Reserved member */
struct
DeviceInfo
{
HKEY
key
;
BOOL
phantom
;
LPWSTR
instanceId
;
struct
list
interfaces
;
struct
DeviceInfoSet
*
set
;
HKEY
key
;
BOOL
phantom
;
LPWSTR
instanceId
;
struct
list
interfaces
;
};
static
void
SETUPDI_GuidToString
(
const
GUID
*
guid
,
LPWSTR
guidStr
)
...
...
@@ -386,14 +387,15 @@ static BOOL SETUPDI_SetInterfaceSymbolicLink(SP_DEVICE_INTERFACE_DATA *iface,
return
ret
;
}
static
struct
DeviceInfo
*
SETUPDI_AllocateDeviceInfo
(
LPCWSTR
instanceId
,
BOOL
phantom
)
static
struct
DeviceInfo
*
SETUPDI_AllocateDeviceInfo
(
struct
DeviceInfoSet
*
set
,
LPCWSTR
instanceId
,
BOOL
phantom
)
{
struct
DeviceInfo
*
devInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
DeviceInfo
));
if
(
devInfo
)
{
devInfo
->
set
=
set
;
devInfo
->
instanceId
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
instanceId
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
devInfo
->
instanceId
)
...
...
@@ -470,7 +472,7 @@ static BOOL SETUPDI_AddDeviceToSet(struct DeviceInfoSet *set,
SP_DEVINFO_DATA
**
dev
)
{
BOOL
ret
=
FALSE
;
struct
DeviceInfo
*
devInfo
=
SETUPDI_AllocateDeviceInfo
(
instanceId
,
struct
DeviceInfo
*
devInfo
=
SETUPDI_AllocateDeviceInfo
(
set
,
instanceId
,
phantom
);
TRACE
(
"%p, %s, %d, %s, %d
\n
"
,
set
,
debugstr_guid
(
guid
),
devInst
,
...
...
@@ -1364,6 +1366,11 @@ BOOL WINAPI SetupDiRegisterDeviceInfo(
return
FALSE
;
}
devInfo
=
(
struct
DeviceInfo
*
)
DeviceInfoData
->
Reserved
;
if
(
devInfo
->
set
!=
set
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
devInfo
->
phantom
)
{
devInfo
->
phantom
=
FALSE
;
...
...
@@ -1504,6 +1511,11 @@ BOOL WINAPI SetupDiGetDeviceInstanceIdW(
return
FALSE
;
}
devInfo
=
(
struct
DeviceInfo
*
)
DeviceInfoData
->
Reserved
;
if
(
devInfo
->
set
!=
set
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
TRACE
(
"instance ID: %s
\n
"
,
debugstr_w
(
devInfo
->
instanceId
));
if
(
DeviceInstanceIdSize
<
lstrlenW
(
devInfo
->
instanceId
)
+
1
)
{
...
...
@@ -2115,6 +2127,7 @@ 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
;
...
...
@@ -2138,6 +2151,12 @@ BOOL WINAPI SetupDiCreateDeviceInterfaceW(
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
devInfo
=
(
struct
DeviceInfo
*
)
DeviceInfoData
->
Reserved
;
if
(
devInfo
->
set
!=
set
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
InterfaceClassGuid
)
{
SetLastError
(
ERROR_INVALID_USER_BUFFER
);
...
...
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