35#define ok_lasterr(err) \
36 ok( GetLastError() == (err), \
37 "Expected error %lx, got %lx\n", (DWORD)(err), GetLastError() )
39static GUID test_class_guid = { 0x4d36e967, 0xe325, 0x11ce, { 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 } };
44 static char guidSTR1[39];
45 static char guidSTR2[39];
52 guidSTR =
index ? guidSTR1 : guidSTR2;
55 "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
84 ok(
size == required_size,
"Expected size %lu, got %lu\n", required_size,
size );
88 ok(
size == required_size,
"Expected size %lu, got %lu\n", required_size,
size );
118 ok( required_size == 0,
"Expected 0, got %lu\n", required_size );
124 ok( required_size > 0,
"Expected > 0, got %lu\n", required_size );
133 ok(
size == required_size,
"Expected size %lu, got %lu\n", required_size,
size );
139 ok(
size == required_size,
"Expected size %lu, got %lu\n", required_size,
size );
165 ok( required_size > 0,
"Expected > 0, got %lu\n", required_size );
175 ok(
size == required_size,
"Expected size %lu, got %lu\n", required_size,
size );
181 ok(
size == required_size,
"Expected size %lu, got %lu\n", required_size,
size );
207 ok( required_size > 0,
"Expected > 0, got %lu\n", required_size );
217 ok(
size == required_size,
"Expected size %lu, got %lu\n", required_size,
size );
221 ok(
size == required_size,
"Expected size %lu, got %lu\n", required_size,
size );
275 const GUID not_existing_guid = { 0xdeadbeef, 0xdead, 0xbeef, { 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff } };
286 ok (!
ret,
"Expected failure.\n");
int strcmp(const char *String1, const char *String2)
#define RegCloseKey(hKey)
#define MAX_CLASS_NAME_LEN
#define ERROR_INSUFFICIENT_BUFFER
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define ERROR_NO_MORE_ITEMS
#define HeapFree(x, y, z)
BOOL WINAPI SetupDiBuildClassInfoList(DWORD Flags, LPGUID ClassGuidList, DWORD ClassGuidListSize, PDWORD RequiredSize)
BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO devinfo, DWORD index, PSP_DEVINFO_DATA info)
BOOL WINAPI SetupDiClassNameFromGuidA(const GUID *ClassGuid, PSTR ClassName, DWORD ClassNameSize, PDWORD RequiredSize)
BOOL WINAPI SetupDiGetClassDescriptionA(const GUID *ClassGuid, PSTR ClassDescription, DWORD ClassDescriptionSize, PDWORD RequiredSize)
BOOL WINAPI SetupDiClassGuidsFromNameA(LPCSTR ClassName, LPGUID ClassGuidList, DWORD ClassGuidListSize, PDWORD RequiredSize)
HDEVINFO WINAPI SetupDiGetClassDevsExW(CONST GUID *class, PCWSTR enumstr, HWND parent, DWORD flags, HDEVINFO deviceset, PCWSTR machine, PVOID reserved)
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
HKEY WINAPI SetupDiOpenClassRegKeyExA(const GUID *ClassGuid, REGSAM samDesired, DWORD Flags, PCSTR MachineName, PVOID Reserved)
#define memcpy(s1, s2, n)
static void test_SetupDiGetClassDevsA(void)
static void test_SetupDiBuildClassInfoList(void)
static char test_class_name[MAX_CLASS_NAME_LEN]
static void test_SetupDiOpenClassRegKeyExA(void)
static void test_SetupDiGetClassDevsExW(void)
static void test_SetupDiGetClassDescriptionA(void)
static void test_SetupDiClassNameFromGuidA(void)
static void test_SetupDiClassGuidsFromNameA(void)
static GUID test_class_guid
#define IsEqualIID(riid1, riid2)
#define ERROR_INVALID_CLASS
#define DIGCF_DEVICEINTERFACE
#define SetupDiGetClassDevs
DWORD WINAPI GetLastError(void)
#define ERROR_INVALID_FLAGS
#define ERROR_INVALID_DATA
#define HKEY_LOCAL_MACHINE