Juan Lang : setupapi: Partially implement SetupDiGetClassDevsExW.
Alexandre Julliard
julliard at winehq.org
Tue Sep 25 07:50:49 CDT 2007
Module: wine
Branch: master
Commit: 4e06874117497e28006d6d91861054d9e952b9a3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e06874117497e28006d6d91861054d9e952b9a3
Author: Juan Lang <juan.lang at gmail.com>
Date: Mon Sep 24 13:00:42 2007 -0700
setupapi: Partially implement SetupDiGetClassDevsExW.
---
dlls/setupapi/devinst.c | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 85ef0ac..0df3b70 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -2098,8 +2098,36 @@ HDEVINFO WINAPI SetupDiGetClassDevsExW(
PCWSTR machine,
PVOID reserved)
{
- FIXME("stub\n");
- return NULL;
+ static const DWORD unsupportedFlags = DIGCF_DEFAULT | DIGCF_PRESENT |
+ DIGCF_PROFILE;
+ HDEVINFO set;
+
+ TRACE("%s %s %p 0x%08x %p %s %p\n", debugstr_guid(class),
+ debugstr_w(enumstr), parent, flags, deviceset, debugstr_w(machine),
+ reserved);
+
+ if (!(flags & DIGCF_ALLCLASSES) && !class)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return NULL;
+ }
+ if (flags & unsupportedFlags)
+ WARN("unsupported flags %08x\n", flags & unsupportedFlags);
+ if (deviceset)
+ set = deviceset;
+ else
+ set = SetupDiCreateDeviceInfoListExW(class, parent, machine, reserved);
+ if (set)
+ {
+ if (machine)
+ FIXME("%s: unimplemented for remote machines\n",
+ debugstr_w(machine));
+ else if (flags & DIGCF_DEVICEINTERFACE)
+ SETUPDI_EnumerateInterfaces(set, class, enumstr, flags);
+ else
+ SETUPDI_EnumerateDevices(set, class, enumstr, flags);
+ }
+ return set;
}
/***********************************************************************
More information about the wine-cvs
mailing list