Author: akhaldi Date: Wed Sep 7 22:43:09 2016 New Revision: 72614
URL: http://svn.reactos.org/svn/reactos?rev=72614&view=rev Log: [SETUPAPI_WINETEST] Sync with Wine Staging 1.9.18.
Modified: trunk/rostests/winetests/setupapi/devinst.c trunk/rostests/winetests/setupapi/misc.c
Modified: trunk/rostests/winetests/setupapi/devinst.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/devinst... ============================================================================== --- trunk/rostests/winetests/setupapi/devinst.c [iso-8859-1] (original) +++ trunk/rostests/winetests/setupapi/devinst.c [iso-8859-1] Wed Sep 7 22:43:09 2016 @@ -833,6 +833,7 @@ "\\?\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}"; static const char path_w2k[] = "\\?\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\"; + SP_DEVINFO_DATA devinfo; LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size); SP_DEVICE_INTERFACE_DETAIL_DATA_A *detail = (SP_DEVICE_INTERFACE_DETAIL_DATA_A *)buf; @@ -860,9 +861,12 @@ !lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n", detail->DevicePath); /* Check SetupDiGetDeviceInterfaceDetailW */ - ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL); + memset(&devinfo, 0, sizeof(devinfo)); + devinfo.cbSize = sizeof(devinfo); + ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, &devinfo); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got error code: %d\n", GetLastError()); + ok(devinfo.DevInst, "Expected DevInst to be set\n"); ok(expectedsize == size || (expectedsize + sizeof(WCHAR)) == size /* W2K adds a backslash */, "SetupDiGetDeviceInterfaceDetailW returned wrong reqsize, got %d\n",
Modified: trunk/rostests/winetests/setupapi/misc.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/misc.c?... ============================================================================== --- trunk/rostests/winetests/setupapi/misc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/setupapi/misc.c [iso-8859-1] Wed Sep 7 22:43:09 2016 @@ -29,6 +29,7 @@ #include "winuser.h" #include "winreg.h" #include "setupapi.h" +#include "cfgmgr32.h"
#include "wine/test.h"
@@ -816,6 +817,14 @@ SetupCloseLog(); }
+static void test_CM_Get_Version(void) +{ + WORD ret; + + ret = CM_Get_Version(); + ok(ret == 0x0400, "got version %#x\n", ret); +} + START_TEST(misc) { HMODULE hsetupapi = GetModuleHandleA("setupapi.dll"); @@ -849,4 +858,5 @@ test_defaultcallback();
test_SetupLogError(); -} + test_CM_Get_Version(); +}