setupapi: Implement SetupDiGetClassDevsExA.
This commit is contained in:
parent
1b023ff69d
commit
06547f129f
|
@ -1769,6 +1769,53 @@ end:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetupDiGetClassDevsExA (SETUPAPI.@)
|
||||||
|
*/
|
||||||
|
HDEVINFO WINAPI SetupDiGetClassDevsExA(
|
||||||
|
const GUID *class,
|
||||||
|
PCSTR enumstr,
|
||||||
|
HWND parent,
|
||||||
|
DWORD flags,
|
||||||
|
HDEVINFO deviceset,
|
||||||
|
PCSTR machine,
|
||||||
|
PVOID reserved)
|
||||||
|
{
|
||||||
|
HDEVINFO ret;
|
||||||
|
LPWSTR enumstrW = NULL, machineW = NULL;
|
||||||
|
|
||||||
|
if (enumstr)
|
||||||
|
{
|
||||||
|
int len = MultiByteToWideChar(CP_ACP, 0, enumstr, -1, NULL, 0);
|
||||||
|
enumstrW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||||
|
if (!enumstrW)
|
||||||
|
{
|
||||||
|
ret = (HDEVINFO)INVALID_HANDLE_VALUE;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, enumstr, -1, enumstrW, len);
|
||||||
|
}
|
||||||
|
if (machine)
|
||||||
|
{
|
||||||
|
int len = MultiByteToWideChar(CP_ACP, 0, machine, -1, NULL, 0);
|
||||||
|
machineW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||||
|
if (!machineW)
|
||||||
|
{
|
||||||
|
HeapFree(GetProcessHeap(), 0, enumstrW);
|
||||||
|
ret = (HDEVINFO)INVALID_HANDLE_VALUE;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, machine, -1, machineW, len);
|
||||||
|
}
|
||||||
|
ret = SetupDiGetClassDevsExW(class, enumstrW, parent, flags, deviceset,
|
||||||
|
machineW, reserved);
|
||||||
|
HeapFree(GetProcessHeap(), 0, enumstrW);
|
||||||
|
HeapFree(GetProcessHeap(), 0, machineW);
|
||||||
|
|
||||||
|
end:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key,
|
static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key,
|
||||||
const GUID *interface)
|
const GUID *interface)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,17 +49,6 @@ DWORD WINAPI suErrorToIds16( WORD w1, WORD w2 )
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* (SETUPAPI.@)
|
|
||||||
*
|
|
||||||
* NO WINAPI in description given
|
|
||||||
*/
|
|
||||||
HDEVINFO WINAPI SetupDiGetClassDevsExA(const GUID *class, PCSTR filter, HWND parent, DWORD flags, HDEVINFO deviceset, PCSTR machine, PVOID reserved)
|
|
||||||
{
|
|
||||||
FIXME("filter %s machine %s\n",debugstr_a(filter),debugstr_a(machine));
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CM_Connect_MachineW (SETUPAPI.@)
|
* CM_Connect_MachineW (SETUPAPI.@)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue