MCPcopy Create free account
hub / github.com/JHRobotics/softgpu / loadSETUAPI

Function loadSETUAPI

windrv.c:419–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417#endif
418
419BOOL loadSETUAPI()
420{
421#ifdef SETUPAPI_DYN
422 /* shut up this cast warning */
423# if __GNUC__ > 4
424# pragma GCC diagnostic ignored "-Wcast-function-type"
425# endif
426
427 if(version_compare(&sysver, &WINVER98) >= 0)
428 {
429 hSETUPAPI = LoadLibraryA("SETUPAPI.dll");
430 }
431
432 if(hSETUPAPI == NULL)
433 {
434 hSETUPAPI = LoadLibraryA("redist\\SETUPAPI.dll");
435 }
436
437 if(hSETUPAPI != NULL)
438 {
439 #define SETUPAPI_FUNC(_t, _n, _a) \
440 h##_n = (f##_n)GetProcAddress(hSETUPAPI, #_n); \
441 if(h##_n == NULL){REPORT("GetProcAddress(SETUPAPI.dll, %s) = %ld", #_n, GetLastError()); return FALSE;}
442
443 #include "setupapi_list.h"
444
445 #undef SETUPAPI_FUNC
446 return TRUE;
447 }
448 else
449 {
450 REPORT("LoadLibraryA(SETUPAPI.dll): %ld", GetLastError());
451 }
452
453 return FALSE;
454#else
455 return TRUE;
456#endif
457}
458
459void freeSETUAPI()
460{

Callers 1

mainFunction · 0.85

Calls 1

version_compareFunction · 0.85

Tested by

no test coverage detected