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
72fdb743
Commit
72fdb743
authored
Feb 09, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Don't use 'interface' as variable name, since it can be defined to a keyword.
parent
0a81b788
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
devinst.c
dlls/setupapi/devinst.c
+11
-14
No files found.
dlls/setupapi/devinst.c
View file @
72fdb743
...
...
@@ -36,7 +36,6 @@
#include "wine/list.h"
#include "wine/unicode.h"
#include "cfgmgr32.h"
#include "initguid.h"
#include "winioctl.h"
#include "rpc.h"
#include "rpcdce.h"
...
...
@@ -181,7 +180,7 @@ static void SETUPDI_FreeInterfaceInstances(struct InterfaceInstances *instances)
* Returns FALSE if not found.
*/
static
BOOL
SETUPDI_FindInterface
(
const
struct
DeviceInfo
*
devInfo
,
const
GUID
*
InterfaceClassGuid
,
struct
InterfaceInstances
**
i
nterface
)
const
GUID
*
InterfaceClassGuid
,
struct
InterfaceInstances
**
i
face_ret
)
{
BOOL
found
=
FALSE
;
struct
InterfaceInstances
*
iface
;
...
...
@@ -193,12 +192,12 @@ static BOOL SETUPDI_FindInterface(const struct DeviceInfo *devInfo,
{
if
(
IsEqualGUID
(
&
iface
->
guid
,
InterfaceClassGuid
))
{
*
i
nterface
=
iface
;
*
i
face_ret
=
iface
;
found
=
TRUE
;
break
;
}
}
TRACE
(
"returning %d (%p)
\n
"
,
found
,
found
?
*
i
nterface
:
NULL
);
TRACE
(
"returning %d (%p)
\n
"
,
found
,
found
?
*
i
face_ret
:
NULL
);
return
found
;
}
...
...
@@ -1985,7 +1984,7 @@ end:
}
static
void
SETUPDI_AddDeviceInterfaces
(
SP_DEVINFO_DATA
*
dev
,
HKEY
key
,
const
GUID
*
interface
)
const
GUID
*
guid
)
{
DWORD
i
,
len
;
WCHAR
subKeyName
[
MAX_PATH
];
...
...
@@ -2003,8 +2002,7 @@ static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key,
if
(
*
subKeyName
==
'#'
)
{
/* The subkey name is the reference string, with a '#' prepended */
SETUPDI_AddInterfaceInstance
(
dev
,
interface
,
subKeyName
+
1
,
&
iface
);
SETUPDI_AddInterfaceInstance
(
dev
,
guid
,
subKeyName
+
1
,
&
iface
);
l
=
RegOpenKeyExW
(
key
,
subKeyName
,
0
,
KEY_READ
,
&
subKey
);
if
(
!
l
)
{
...
...
@@ -2027,7 +2025,7 @@ static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key,
}
static
void
SETUPDI_EnumerateMatchingInterfaces
(
HDEVINFO
DeviceInfoSet
,
HKEY
key
,
const
GUID
*
interface
,
LPCWSTR
enumstr
)
HKEY
key
,
const
GUID
*
guid
,
LPCWSTR
enumstr
)
{
struct
DeviceInfoSet
*
set
=
DeviceInfoSet
;
DWORD
i
,
len
;
...
...
@@ -2085,8 +2083,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
if
(
SETUPDI_AddDeviceToSet
(
set
,
&
deviceClass
,
0
/* FIXME: DevInst */
,
deviceInst
,
FALSE
,
&
dev
))
SETUPDI_AddDeviceInterfaces
(
dev
,
subKey
,
interface
);
SETUPDI_AddDeviceInterfaces
(
dev
,
subKey
,
guid
);
}
RegCloseKey
(
deviceKey
);
}
...
...
@@ -2103,12 +2100,12 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
}
static
void
SETUPDI_EnumerateInterfaces
(
HDEVINFO
DeviceInfoSet
,
const
GUID
*
interface
,
LPCWSTR
enumstr
,
DWORD
flags
)
const
GUID
*
guid
,
LPCWSTR
enumstr
,
DWORD
flags
)
{
HKEY
interfacesKey
=
SetupDiOpenClassRegKeyExW
(
interface
,
KEY_READ
,
HKEY
interfacesKey
=
SetupDiOpenClassRegKeyExW
(
guid
,
KEY_READ
,
DIOCR_INTERFACE
,
NULL
,
NULL
);
TRACE
(
"%p, %s, %s, %08x
\n
"
,
DeviceInfoSet
,
debugstr_guid
(
interface
),
TRACE
(
"%p, %s, %s, %08x
\n
"
,
DeviceInfoSet
,
debugstr_guid
(
guid
),
debugstr_w
(
enumstr
),
flags
);
if
(
interfacesKey
!=
INVALID_HANDLE_VALUE
)
...
...
@@ -2152,7 +2149,7 @@ static void SETUPDI_EnumerateInterfaces(HDEVINFO DeviceInfoSet,
* interface's key, so just pass that long
*/
SETUPDI_EnumerateMatchingInterfaces
(
DeviceInfoSet
,
interfacesKey
,
interface
,
enumstr
);
interfacesKey
,
guid
,
enumstr
);
}
RegCloseKey
(
interfacesKey
);
}
...
...
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