ReactOS  0.4.14-dev-115-g4576127
devclass.c File Reference
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "cfgmgr32.h"
#include "setupapi.h"
#include "wine/test.h"
Include dependency graph for devclass.c:

Go to the source code of this file.

Macros

#define ok_lasterr(err)
 

Functions

static const chardebugstr_guid (const GUID *guid)
 
static void test_SetupDiBuildClassInfoList (void)
 
static void test_SetupDiClassGuidsFromNameA (void)
 
static void test_SetupDiClassNameFromGuidA (void)
 
static void test_SetupDiGetClassDescriptionA (void)
 
static void test_SetupDiGetClassDevsA (void)
 
static void test_SetupDiGetClassDevsExW (void)
 
static void test_SetupDiOpenClassRegKeyExA (void)
 
 START_TEST (devclass)
 

Variables

static GUID test_class_guid = { 0x4d36e967, 0xe325, 0x11ce, { 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 } }
 
static char test_class_name [MAX_CLASS_NAME_LEN] = "DiskDrive"
 

Macro Definition Documentation

◆ ok_lasterr

#define ok_lasterr (   err)
Value:
ok( GetLastError() == (err), \
"Expected error %lx, got %lx\n", (DWORD)(err), GetLastError() )
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
unsigned long DWORD
Definition: ntddk_ex.h:95
#define err(...)
#define ok(value,...)
Definition: atltest.h:57

Definition at line 35 of file devclass.c.

Function Documentation

◆ debugstr_guid()

static const char* debugstr_guid ( const GUID guid)
static

Definition at line 42 of file devclass.c.

43 {
44  static char guidSTR1[39];
45  static char guidSTR2[39];
46  char* guidSTR;
47  static BOOL index;
48 
49  if (!guid) return NULL;
50 
51  index = !index;
52  guidSTR = index ? guidSTR1 : guidSTR2;
53 
54  snprintf(guidSTR, sizeof(guidSTR1),
55  "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
56  guid->Data1, guid->Data2, guid->Data3,
57  guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
58  guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
59  return guidSTR;
60 }
#define snprintf
Definition: wintirpc.h:48
const GUID * guid
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
#define index(s, c)
Definition: various.h:29

Referenced by SetupDiGetClassImageIndex(), SetupDiInstallClassExW(), test_SetupDiClassGuidsFromNameA(), and test_SetupDiClassNameFromGuidA().

◆ START_TEST()

START_TEST ( devclass  )

Definition at line 343 of file devclass.c.

344 {
352 }
static void test_SetupDiBuildClassInfoList(void)
Definition: devclass.c:62
static void test_SetupDiGetClassDevsA(void)
Definition: devclass.c:226
static void test_SetupDiGetClassDescriptionA(void)
Definition: devclass.c:188
static void test_SetupDiClassNameFromGuidA(void)
Definition: devclass.c:146
static void test_SetupDiOpenClassRegKeyExA(void)
Definition: devclass.c:292
static void test_SetupDiClassGuidsFromNameA(void)
Definition: devclass.c:100
static void test_SetupDiGetClassDevsExW(void)
Definition: devclass.c:273

◆ test_SetupDiBuildClassInfoList()

static void test_SetupDiBuildClassInfoList ( void  )
static

Definition at line 62 of file devclass.c.

63 {
65  DWORD required_size, size;
66 
67  SetLastError( 0xdeadbeef );
69  "Fail expected" );
71 
72  SetLastError( 0xdeadbeef );
73  ok( !SetupDiBuildClassInfoList( 0, NULL, 0, &required_size ),
74  "Fail expected\n" );
76 
77  guid_list = HeapAlloc( GetProcessHeap(), 0, ( required_size + 1 ) * sizeof( GUID ) );
78  if ( !guid_list )
79  return;
80 
81  SetLastError( 0xdeadbeef );
82  ok( SetupDiBuildClassInfoList( 0, guid_list, required_size, &size ),
83  "Error reported %lx\n", GetLastError() );
84  ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size );
85  SetLastError( 0xdeadbeef );
86  ok( SetupDiBuildClassInfoList( 0, guid_list, required_size + 1, &size ),
87  "Error reported %lx\n", GetLastError() );
88  ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size );
89 
90  if ( size > 0 )
91  {
92  /* That's better to use the first class found, as we know for sure that it exists */
93  memcpy(&test_class_guid, &guid_list[0], sizeof( GUID ) );
95  "Error reported %lx\n", GetLastError() );
96  }
98 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
BOOL WINAPI SetupDiClassNameFromGuidA(const GUID *ClassGuid, PSTR ClassName, DWORD ClassNameSize, PDWORD RequiredSize)
Definition: devinst.c:1062
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static GUID test_class_guid
Definition: devclass.c:39
BOOL WINAPI SetupDiBuildClassInfoList(DWORD Flags, LPGUID ClassGuidList, DWORD ClassGuidListSize, PDWORD RequiredSize)
Definition: devinst.c:643
smooth NULL
Definition: ftsmooth.c:416
static char test_class_name[MAX_CLASS_NAME_LEN]
Definition: devclass.c:40
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ok(value,...)
Definition: atltest.h:57
static const GUID * guid_list[]
Definition: metadata.c:2260
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ok_lasterr(err)
Definition: devclass.c:35
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by START_TEST().

◆ test_SetupDiClassGuidsFromNameA()

static void test_SetupDiClassGuidsFromNameA ( void  )
static

Definition at line 100 of file devclass.c.

101 {
103  DWORD required_size, size;
104 
105  SetLastError( 0xdeadbeef );
107  "Fail expected\n" );
109 
110  SetLastError( 0xdeadbeef );
111  ok( !SetupDiClassGuidsFromNameA( NULL, NULL, 0, &required_size ),
112  "Fail expected\n" );
114 
115  SetLastError( 0xdeadbeef );
116  ok( SetupDiClassGuidsFromNameA( "", NULL, 0, &required_size ),
117  "Error reported %lx\n", GetLastError() );
118  ok( required_size == 0, "Expected 0, got %lu\n", required_size );
119 
120  SetLastError( 0xdeadbeef );
121  ok( !SetupDiClassGuidsFromNameA( test_class_name, NULL, 0, &required_size ),
122  "Fail expected\n" );
124  ok( required_size > 0, "Expected > 0, got %lu\n", required_size );
125 
126  guid_list = HeapAlloc( GetProcessHeap(), 0, ( required_size + 1 ) * sizeof( GUID ) );
127  if ( !guid_list )
128  return;
129 
130  SetLastError( 0xdeadbeef );
132  "Error reported %lx\n", GetLastError() );
133  ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size );
135  "Expected %s, got %s for class %s\n", debugstr_guid( &test_class_guid ), debugstr_guid( &guid_list[0] ), test_class_name );
136  SetLastError( 0xdeadbeef );
137  ok( SetupDiClassGuidsFromNameA( test_class_name, guid_list, required_size + 1, &size ),
138  "Error reported %lx\n", GetLastError() );
139  ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size );
141  "Expected %s, got %s for class %s\n", debugstr_guid( &test_class_guid ), debugstr_guid( &guid_list[0] ), test_class_name );
142 
144 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static GUID test_class_guid
Definition: devclass.c:39
smooth NULL
Definition: ftsmooth.c:416
static char test_class_name[MAX_CLASS_NAME_LEN]
Definition: devclass.c:40
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
BOOL WINAPI SetupDiClassGuidsFromNameA(LPCSTR ClassName, LPGUID ClassGuidList, DWORD ClassGuidListSize, PDWORD RequiredSize)
Definition: devinst.c:863
#define ok(value,...)
Definition: atltest.h:57
static const char * debugstr_guid(const GUID *guid)
Definition: devclass.c:42
static const GUID * guid_list[]
Definition: metadata.c:2260
#define HeapFree(x, y, z)
Definition: compat.h:394
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define ok_lasterr(err)
Definition: devclass.c:35
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by START_TEST().

◆ test_SetupDiClassNameFromGuidA()

static void test_SetupDiClassNameFromGuidA ( void  )
static

Definition at line 146 of file devclass.c.

147 {
148  CHAR* class_name = NULL;
149  DWORD required_size, size;
150 
151  SetLastError( 0xdeadbeef );
153  "Fail expected\n" );
155 
156  SetLastError( 0xdeadbeef );
157  ok( !SetupDiClassNameFromGuidA( NULL, NULL, 0, &required_size ),
158  "Fail expected\n" );
160 
161  SetLastError( 0xdeadbeef );
162  ok( !SetupDiClassNameFromGuidA( &test_class_guid, NULL, 0, &required_size ),
163  "Fail expected\n" );
165  ok( required_size > 0, "Expected > 0, got %lu\n", required_size );
166  ok( required_size < MAX_CLASS_NAME_LEN, "Expected < %u, got %lu for GUID %s\n", MAX_CLASS_NAME_LEN, required_size, debugstr_guid( &test_class_guid ) );
167 
168  class_name = HeapAlloc( GetProcessHeap(), 0, required_size );
169  if ( !class_name )
170  return;
171 
172  SetLastError( 0xdeadbeef );
173  ok( SetupDiClassNameFromGuidA( &test_class_guid, class_name, required_size, &size ),
174  "Error reported %lx\n", GetLastError() );
175  ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size );
176  ok( !strcmp( class_name, test_class_name ),
177  "Expected %s, got %s\n", test_class_name, class_name );
178  SetLastError( 0xdeadbeef );
179  ok( SetupDiClassNameFromGuidA( &test_class_guid, class_name, required_size + 1, &size ),
180  "Error reported %lx\n", GetLastError() );
181  ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size );
182  ok( !strcmp( class_name, test_class_name ),
183  "Expected %s, got %s\n", test_class_name, class_name );
184 
185  HeapFree( GetProcessHeap(), 0, class_name );
186 }
char CHAR
Definition: xmlstorage.h:175
BOOL WINAPI SetupDiClassNameFromGuidA(const GUID *ClassGuid, PSTR ClassName, DWORD ClassNameSize, PDWORD RequiredSize)
Definition: devinst.c:1062
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static GUID test_class_guid
Definition: devclass.c:39
smooth NULL
Definition: ftsmooth.c:416
static char test_class_name[MAX_CLASS_NAME_LEN]
Definition: devclass.c:40
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
#define ERROR_INVALID_CLASS
Definition: setupapi.h:297
#define ok(value,...)
Definition: atltest.h:57
static const char * debugstr_guid(const GUID *guid)
Definition: devclass.c:42
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define MAX_CLASS_NAME_LEN
Definition: cfgmgr32.h:52
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ok_lasterr(err)
Definition: devclass.c:35
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by START_TEST().

◆ test_SetupDiGetClassDescriptionA()

static void test_SetupDiGetClassDescriptionA ( void  )
static

Definition at line 188 of file devclass.c.

189 {
190  CHAR* class_desc = NULL;
191  DWORD required_size, size;
192 
193  SetLastError( 0xdeadbeef );
195  "Fail expected\n" );
197 
198  SetLastError( 0xdeadbeef );
199  ok( !SetupDiGetClassDescriptionA( NULL, NULL, 0, &required_size ),
200  "Fail expected\n" );
202 
203  SetLastError( 0xdeadbeef );
204  ok( !SetupDiGetClassDescriptionA( &test_class_guid, NULL, 0, &required_size ),
205  "Fail expected\n" );
207  ok( required_size > 0, "Expected > 0, got %lu\n", required_size );
208  ok( required_size < LINE_LEN, "Expected < %u, got %lu\n", LINE_LEN, required_size );
209 
210  class_desc = HeapAlloc( GetProcessHeap(), 0, required_size );
211  if ( !class_desc )
212  return;
213 
214  SetLastError( 0xdeadbeef );
215  ok( SetupDiGetClassDescriptionA( &test_class_guid, class_desc, required_size, &size ),
216  "Error reported %lx\n", GetLastError() );
217  ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size );
218  SetLastError( 0xdeadbeef );
219  ok( SetupDiGetClassDescriptionA( &test_class_guid, class_desc, required_size + 1, &size ),
220  "Error reported %lx\n", GetLastError() );
221  ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size );
222 
223  HeapFree( GetProcessHeap(), 0, class_desc );
224 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
char CHAR
Definition: xmlstorage.h:175
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static GUID test_class_guid
Definition: devclass.c:39
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define LINE_LEN
Definition: setupapi.h:20
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
BOOL WINAPI SetupDiGetClassDescriptionA(const GUID *ClassGuid, PSTR ClassDescription, DWORD ClassDescriptionSize, PDWORD RequiredSize)
Definition: devinst.c:2063
#define ok(value,...)
Definition: atltest.h:57
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ok_lasterr(err)
Definition: devclass.c:35
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by START_TEST().

◆ test_SetupDiGetClassDevsA()

static void test_SetupDiGetClassDevsA ( void  )
static

Definition at line 226 of file devclass.c.

227 {
228  HDEVINFO device_info;
229 
230  SetLastError( 0xdeadbeef );
231  device_info = SetupDiGetClassDevs( NULL, NULL, NULL, 0 );
232  ok( device_info == INVALID_HANDLE_VALUE,
233  "Fail expected\n" );
235 
236  SetLastError( 0xdeadbeef );
237  device_info = SetupDiGetClassDevs( NULL, NULL, NULL, DIGCF_ALLCLASSES );
238  ok( device_info != INVALID_HANDLE_VALUE,
239  "Error reported %lx\n", GetLastError() );
240  SetLastError( 0xdeadbeef );
241  ok( SetupDiDestroyDeviceInfoList( device_info ),
242  "Error reported %lx\n", GetLastError() );
243 
244  SetLastError( 0xdeadbeef );
246  ok( device_info == INVALID_HANDLE_VALUE,
247  "Fail expected\n" );
249 
250  SetLastError( 0xdeadbeef );
251  device_info = SetupDiGetClassDevs( &test_class_guid, NULL, NULL, 0 );
252  ok( device_info != INVALID_HANDLE_VALUE,
253  "Error reported %lx\n", GetLastError() );
254  SetLastError( 0xdeadbeef );
255  ok( SetupDiDestroyDeviceInfoList( device_info ),
256  "Error reported %lx\n", GetLastError() );
257 
258  SetLastError( 0xdeadbeef );
259  device_info = SetupDiGetClassDevs( NULL, "(invalid enumerator)", NULL, DIGCF_ALLCLASSES );
260  ok( device_info == INVALID_HANDLE_VALUE,
261  "Fail expected\n" );
263 
264  SetLastError( 0xdeadbeef );
265  device_info = SetupDiGetClassDevs( NULL, "Root", NULL, DIGCF_ALLCLASSES );
266  ok( device_info != INVALID_HANDLE_VALUE,
267  "Error reported %lx\n", GetLastError() );
268  SetLastError( 0xdeadbeef );
269  ok( SetupDiDestroyDeviceInfoList( device_info ),
270  "Error reported %lx\n", GetLastError() );
271 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static GUID test_class_guid
Definition: devclass.c:39
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2898
#define SetLastError(x)
Definition: compat.h:409
#define DIGCF_ALLCLASSES
Definition: setupapi.h:172
#define SetupDiGetClassDevs
Definition: setupapi.h:2588
#define ERROR_INVALID_DATA
Definition: winerror.h:116
#define ok(value,...)
Definition: atltest.h:57
#define DIGCF_DEVICEINTERFACE
Definition: setupapi.h:174
#define ok_lasterr(err)
Definition: devclass.c:35

Referenced by START_TEST().

◆ test_SetupDiGetClassDevsExW()

static void test_SetupDiGetClassDevsExW ( void  )
static

Definition at line 273 of file devclass.c.

274 {
275  const GUID not_existing_guid = { 0xdeadbeef, 0xdead, 0xbeef, { 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff } };
276  HDEVINFO dev_info;
277  BOOL ret;
279 
280  dev_info = SetupDiGetClassDevsExW(&not_existing_guid, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE, NULL, NULL, NULL);
281  ok(dev_info != INVALID_HANDLE_VALUE, "Expected success\n");
282 
283  ZeroMemory(&info, sizeof(info));
284  info.cbSize = sizeof(info);
285  ret = SetupDiEnumDeviceInfo(dev_info, 0, &info);
286  ok (!ret, "Expected failure.\n");
288 
290 }
BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO devinfo, DWORD index, PSP_DEVINFO_DATA info)
Definition: devinst.c:1792
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:95
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
#define ZeroMemory
Definition: winbase.h:1642
struct _test_info info[]
Definition: SetCursorPos.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2898
int ret
#define ok(value,...)
Definition: atltest.h:57
#define DIGCF_DEVICEINTERFACE
Definition: setupapi.h:174
HDEVINFO WINAPI SetupDiGetClassDevsExW(CONST GUID *class, PCWSTR enumstr, HWND parent, DWORD flags, HDEVINFO deviceset, PCWSTR machine, PVOID reserved)
Definition: devinst.c:2310
#define ok_lasterr(err)
Definition: devclass.c:35
#define DIGCF_PRESENT
Definition: setupapi.h:171

Referenced by START_TEST().

◆ test_SetupDiOpenClassRegKeyExA()

static void test_SetupDiOpenClassRegKeyExA ( void  )
static

Definition at line 292 of file devclass.c.

293 {
294  HKEY hkey;
295  LONG err;
296 
297  SetLastError( 0xdeadbeef );
298  hkey = SetupDiOpenClassRegKeyExA( NULL, 0, 0, NULL, NULL );
299  ok( hkey == INVALID_HANDLE_VALUE,
300  "Fail expected\n" );
302 
303  SetLastError( 0xdeadbeef );
305  ok( hkey == INVALID_HANDLE_VALUE,
306  "Fail expected\n" );
308 
309  SetLastError( 0xdeadbeef );
311  ok( hkey == INVALID_HANDLE_VALUE,
312  "Fail expected\n" );
314 
315  SetLastError( 0xdeadbeef );
317  ok( hkey == INVALID_HANDLE_VALUE,
318  "Fail expected\n" );
320 
321  SetLastError( 0xdeadbeef );
323  ok( hkey != INVALID_HANDLE_VALUE, "Got error %lx\n", GetLastError() );
324  err = RegCloseKey( hkey );
325  ok( err == ERROR_SUCCESS, "Got error %lx\n", err );
326 
327  SetLastError( 0xdeadbeef );
329  ok( hkey != INVALID_HANDLE_VALUE, "Got error %lx\n", GetLastError() );
330  err = RegCloseKey( hkey );
331  ok( err == ERROR_SUCCESS, "Got error %lx\n", err );
332 
333  SetLastError( 0xdeadbeef );
335  ok( hkey != INVALID_HANDLE_VALUE, "Got error %lx\n", GetLastError() );
336  err = RegCloseKey( hkey );
337  ok( err == ERROR_SUCCESS, "Got error %lx\n", err );
338 
339  err = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Class", 0, KEY_SET_VALUE, &hkey);
340  ok( err == ERROR_SUCCESS, "Got error %lx\n", err );
341 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define KEY_SET_VALUE
Definition: nt_native.h:1017
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
Definition: reg.c:3331
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static GUID test_class_guid
Definition: devclass.c:39
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
long LONG
Definition: pedump.c:60
#define DIOCR_INSTALLER
Definition: setupapi.h:176
smooth NULL
Definition: ftsmooth.c:416
HKEY WINAPI SetupDiOpenClassRegKeyExA(const GUID *ClassGuid, REGSAM samDesired, DWORD Flags, PCSTR MachineName, PVOID Reserved)
Definition: devinst.c:3635
#define SetLastError(x)
Definition: compat.h:409
#define err(...)
#define DIOCR_INTERFACE
Definition: setupapi.h:177
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define ERROR_INVALID_CLASS
Definition: setupapi.h:297
#define ok(value,...)
Definition: atltest.h:57
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583
#define ok_lasterr(err)
Definition: devclass.c:35
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by START_TEST().

Variable Documentation

◆ test_class_guid

GUID test_class_guid = { 0x4d36e967, 0xe325, 0x11ce, { 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 } }
static

◆ test_class_name

char test_class_name[MAX_CLASS_NAME_LEN] = "DiskDrive"
static