setupapi: Implement SetupDiGetClassDevsW on top of SetupDiGetClassDevsExW.

This commit is contained in:
Juan Lang 2007-09-24 13:02:01 -07:00 committed by Alexandre Julliard
parent 4e06874117
commit e45f840944
1 changed files with 2 additions and 23 deletions

View File

@ -2061,29 +2061,8 @@ HDEVINFO WINAPI SetupDiGetClassDevsW(
HWND parent,
DWORD flags)
{
static const DWORD unsupportedFlags = DIGCF_DEFAULT | DIGCF_PRESENT |
DIGCF_PROFILE;
HDEVINFO set;
TRACE("%s %s %p 0x%08x\n", debugstr_guid(class), debugstr_w(enumstr), parent, flags);
if (!(flags & DIGCF_ALLCLASSES) && !class)
{
SetLastError(ERROR_INVALID_PARAMETER);
return NULL;
}
if (flags & unsupportedFlags)
WARN("unsupported flags %08x\n", flags & unsupportedFlags);
/* WinXP always succeeds, returns empty list for unknown classes */
set = SetupDiCreateDeviceInfoList(class, parent);
if (set)
{
if (flags & DIGCF_DEVICEINTERFACE)
SETUPDI_EnumerateInterfaces(set, class, enumstr, flags);
else
SETUPDI_EnumerateDevices(set, class, enumstr, flags);
}
return set;
return SetupDiGetClassDevsExW(class, enumstr, parent, flags, NULL, NULL,
NULL);
}
/***********************************************************************