mirror of
https://github.com/reactos/reactos.git
synced 2025-01-09 15:51:16 +00:00
[SETUPAPI_APITEST]
- Add a test that shows that SetupDiGetClassDevsExW doesn't fail on non-existing GUID svn path=/trunk/; revision=63642
This commit is contained in:
parent
c19093060f
commit
58edad6809
1 changed files with 21 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* SetupAPI device class-related functions tests
|
||||
*
|
||||
* Copyright 2006 Hervé Poussineau
|
||||
* Copyright 2006 Herv<EFBFBD> Poussineau
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public Licence as
|
||||
|
@ -269,6 +269,25 @@ static void test_SetupDiGetClassDevsA(void)
|
|||
"Error reported %lx\n", GetLastError() );
|
||||
}
|
||||
|
||||
static void test_SetupDiGetClassDevsExW(void)
|
||||
{
|
||||
const GUID not_existing_guid = { 0xdeadbeef, 0xdead, 0xbeef, { 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff } };
|
||||
HDEVINFO dev_info;
|
||||
BOOL ret;
|
||||
SP_DEVINFO_DATA info;
|
||||
|
||||
dev_info = SetupDiGetClassDevsExW(¬_existing_guid, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE, NULL, NULL, NULL);
|
||||
ok(dev_info != INVALID_HANDLE_VALUE, "Expected success\n");
|
||||
|
||||
ZeroMemory(&info, sizeof(info));
|
||||
info.cbSize = sizeof(info);
|
||||
ret = SetupDiEnumDeviceInfo(dev_info, 0, &info);
|
||||
ok (!ret, "Expected failure.\n");
|
||||
ok_lasterr(ERROR_NO_MORE_ITEMS);
|
||||
|
||||
SetupDiDestroyDeviceInfoList(dev_info);
|
||||
}
|
||||
|
||||
static void test_SetupDiOpenClassRegKeyExA(void)
|
||||
{
|
||||
HKEY hkey;
|
||||
|
@ -328,4 +347,5 @@ START_TEST(devclass)
|
|||
test_SetupDiGetClassDescriptionA();
|
||||
test_SetupDiGetClassDevsA();
|
||||
test_SetupDiOpenClassRegKeyExA();
|
||||
test_SetupDiGetClassDevsExW();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue