setupapi/tests: Prevent crash on NT4.
authorPaul Vriens <paul.vriens.wine@gmail.com>
Mon, 23 Jun 2008 14:16:43 +0000 (16:16 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 23 Jun 2008 17:46:29 +0000 (19:46 +0200)
dlls/setupapi/tests/devinst.c

index db323af1de49fa7610cfae0f8e208cdaf9053aa5..64035d707e188e565c062b35d8c51020b385db66 100644 (file)
@@ -992,6 +992,13 @@ static void testRegisterAndGetDetail(void)
      '1','1','d','b','-','b','7','0','4','-',
      '0','0','1','1','9','5','5','c','2','b','d','b','}',0};
 
+    if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiEnumDeviceInterfaces ||
+        !pSetupDiGetDeviceInterfaceDetailA)
+    {
+        skip("Needed functions are not available\n");
+        return;
+    }
+
     SetLastError(0xdeadbeef);
     set = pSetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_ALLCLASSES);
     ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsA failed: %08x\n",