setupapi: Set last error on invalid input.

This commit is contained in:
Juan Lang 2007-09-21 11:35:46 -07:00 committed by Alexandre Julliard
parent 15eba01660
commit 707fca6cbc
1 changed files with 3 additions and 0 deletions

View File

@ -1108,7 +1108,10 @@ BOOL WINAPI SetupDiEnumDeviceInfo(
TRACE("%p %d %p\n", devinfo, index, info);
if(info==NULL)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (devinfo && devinfo != (HDEVINFO)INVALID_HANDLE_VALUE)
{
struct DeviceInfoSet *list = (struct DeviceInfoSet *)devinfo;