Commit Graph

342 Commits

Author SHA1 Message Date
Zhiyi Zhang 64c09819cf setupapi: Set phantom value after device creation.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 11:49:04 +01:00
Zhiyi Zhang 35673c7e8e setupapi/tests: Test phantom value after device creation.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 11:48:57 +01:00
Francois Gouget 9f2baf1dd4 setupapi/tests: Add a trailing '\n' to a couple of ok() calls.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 17:42:42 +01:00
Zebediah Figura bb4a6da373 setupapi: Search for substituted strings in SetupFindNextMatchLine().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 20:49:37 +01:00
Zebediah Figura f703c7f22d setupapi: Handle error translation in SetupDiOpenDevRegKey().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 12:51:21 +01:00
Zebediah Figura 486fffa45c setupapi: Return the "Device Parameters" subkey for DIREG_DEV.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=21023
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 12:51:21 +01:00
Alexandre Julliard d70d6b8486 setupapi/tests: Avoid sizeof in traces.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 20:26:25 +01:00
Zhiyi Zhang 307812c30d setupapi: Implement SetupDiGetDevicePropertyW.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 10:30:51 +01:00
Zhiyi Zhang afac1c405d setupapi: Implement SetupDiSetDevicePropertyW.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 10:30:49 +01:00
Zebediah Figura 7e4c1a2074 setupapi: Also remove the driver key in remove_device().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:40:26 +01:00
Zebediah Figura 00c8c27032 setupapi/tests: Create the setup class key before trying to create the driver key.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:40:24 +01:00
Zebediah Figura e26f8464e9 setupapi: Store the path to the driver key in the device key.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:40:18 +01:00
Zhiyi Zhang 06a86134ab setupapi/tests: Fix return value checking.
SetupDiCreateDeviceInfoList returns INVALID_HANDLE_VALUE(~0) on error
instead of NULL.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-18 10:24:44 +01:00
Alexandre Julliard bcab6625ab setupapi/tests: Fix a test failure on latest Windows 10.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-11 15:54:06 +01:00
Michael Müller 2d6704ba99 setupapi: Always return device info from SetupDiGetDeviceInterfaceDetail() if requested.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-06 08:57:42 +01:00
Zebediah Figura 03e9ef38a7 setupapi: Implement SetupDiDeleteDeviceInfo().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43211
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 10:02:23 +01:00
Zebediah Figura d6a504eaf0 setupapi: Implement SetupDiDeleteDeviceInterfaceData().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 10:02:17 +01:00
Zebediah Figura 8fff6eeb76 setupapi: Delete all empty parent keys of a removed device key.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 10:51:05 +01:00
Zebediah Figura 24736edfa8 setupapi: Implement SetupDiRemoveDevice().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 10:50:50 +01:00
Zebediah Figura fa823476c6 setupapi: Completely remove unregistered device interfaces.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 10:50:44 +01:00
Zebediah Figura 3ff9874034 setupapi: Implement SetupDiRemoveDeviceInterface().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 10:50:39 +01:00
Zebediah Figura 8289c651c0 setupapi: Enforce a maximum device instance ID length.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 09:35:24 +01:00
Zebediah Figura 48be283250 setupapi/tests: Remove workarounds in test_SetupDiOpenClassRegKeyExA().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:30:13 +01:00
Zebediah Figura bc8a117747 setupapi/tests: Remove workarounds in test_SetupDiCreateDeviceInfoListEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:30:11 +01:00
Zebediah Figura 3fef0ace16 setupapi/tests: Remove workarounds in testSetupDiGetINFClassA().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:30:08 +01:00
Zebediah Figura ca2cd98334 setupapi/tests: Remove workarounds in testDeviceRegistryPropertyW().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-23 12:51:37 +01:00
Zebediah Figura 1b032c2b12 setupapi/tests: Remove workarounds in testDeviceRegistryPropertyA().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-23 12:51:20 +01:00
Zebediah Figura af1362c8c8 setupapi/tests: Remove workarounds in testRegisterAndGetDetail().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-23 12:51:16 +01:00
Zebediah Figura c471e4cff4 setupapi/tests: Remove workarounds in testDevRegKey().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-23 12:51:10 +01:00
Zebediah Figura c9c646e9bb setupapi/tests: Remove workarounds in testGetDeviceInterfaceDetail().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-22 11:48:20 +01:00
Zebediah Figura 75a91c4e63 setupapi/tests: Add more tests for device interfaces.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-22 11:48:18 +01:00
Zebediah Figura 72cbe53bd8 setupapi/tests: Remove workarounds in testCreateDeviceInterface().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-22 11:48:17 +01:00
Zebediah Figura 9ac9e4b955 setupapi/tests: Add some more tests for SetupDiRegisterDeviceInfo().
Changed USB\BOGUS to the testcase used elsewhere since it fails on Windows 8.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-21 17:05:31 +01:00
Zebediah Figura 4e9b306e06 setupapi/tests: Remove workarounds in testRegisterDeviceInfo().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-21 17:05:30 +01:00
Zebediah Figura 16eb2b267c setupapi/tests: Remove workarounds in testGetDeviceInstanceId().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-21 17:05:28 +01:00
Zebediah Figura f86e796574 setupapi/tests: Add more tests for creating and removing devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 09:59:01 +01:00
Zebediah Figura 3af97988f1 setupapi/tests: Remove workarounds in testCreateDeviceInfo().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 09:58:59 +01:00
Zebediah Figura 7201eb5d79 setupapi/tests: Remove workarounds in testInstallClass().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 09:58:58 +01:00
Zebediah Figura 9b767ad6bb setupapi: Correctly implement SetupDiDeleteDeviceInterfaceRegKey().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:11:01 +02:00
Zebediah Figura 1d17352ce2 setupapi: Correctly implement SetupDiCreateDeviceInterfaceRegKey().
This family of functions manipulates the "Device Parameters" subkey, not its
parent.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:10:58 +02:00
Zebediah Figura f840bcc6f7 setupapi: Use a handle table to allocate device nodes.
The size of DEVINST is DWORD, so using the pointer directly won't work on
64-bit.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:10:38 +02:00
Gijs Vermeulen 87acb93586 setupapi/tests: Add SetupInstallFromInfSectionA test.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Michael Stefaniuc 94d8ba78b8 setupapi/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-15 12:56:48 +02:00
Alex Henrie 02acc6514a setupapi/tests: Drop install test workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-16 19:19:44 +01:00
Hugh McMaster c9308b8d6b setupapi: Recursively remove any subkeys before calling NtDeleteKey().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 10:24:47 +02:00
Andrew Wesie e4645d60d7 setupapi: Fix SetupDiGetDeviceRegistryProperty if property does not exist.
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-02 11:18:36 +02:00
Hans Leidekker 53b7a36319 setupapi/tests: Skip InstallHinfSection tests if the user doesn't have admin rights.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-20 13:02:36 +01:00
Hans Leidekker 0e3a0e13ef setupapi/tests: Skip SetupGetInfInformation tests if the user doesn't have admin rights.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-20 13:02:34 +01:00
Hans Leidekker 162a40e145 setupapi/tests: Skip devinst tests if the user doesn't have admin rights.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-19 12:13:59 +01:00
Hans Leidekker 0922deda93 setupapi/tests: Skip SetupCopyOEMInfA tests if the user doesn't have admin rights.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-19 12:13:54 +01:00
Hans Leidekker c84080fb59 setupapi/tests: Clean up properly after each device test.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-07 11:57:46 +01:00
André Hentschel 55efd7cfe4 setupapi/tests: Try to delete pre-existing key.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-13 12:52:15 +09:00
André Hentschel cfcffd9799 setupapi/tests: Also check for ERROR_CALL_NOT_IMPLEMENTED at the second call to SetupDiCreateDeviceInfoListExW.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-07 22:19:40 +09:00
Nikolay Sivov af533d1eeb setupapi: Added CM_Get_Version().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 12:11:12 +09:00
Andrey Gusev 3e8d4e3103 setupapi/tests: Fix a typo in comment.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-23 22:50:00 +09:00
Sebastian Lackner e8aa851fe4 setupapi: Fix parsing of inf files containing garbage at the beginning of the file.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-16 21:59:42 +09:00
Frédéric Delanoy 5c2cff30aa setupapi/tests: Use todo_wine_if() in tests.
Signed-off-by: Frédéric Delanoy <frederic.delanoy@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-22 17:37:10 +09:00
Vincent Povirk 295346f81d setupapi: Add a manifest to indicate the tests don't need elevation.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-16 17:14:31 +09:00
Huw Davies 45c987d962 setupapi/tests: Use RegQueryValueEx so that tests run on Win XP.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-15 01:08:52 +09:00
Vincent Povirk f0009e17e4 setupapi/tests: Add tests for dirid values.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
2015-10-01 16:28:49 +09:00
Nikolay Sivov 98b991fdcf setupapi/tests: Skip a test if user is not allowed to open logging. 2015-05-25 21:52:40 +09:00
Nikolay Sivov 21b9c5f023 setupapi/tests: Trace error codes when SetupOpenLog fails. 2015-05-01 21:12:35 +09:00
Thomas Faber 655e7f98db setupapi/tests: Avoid side-effect in an assert. 2015-04-03 17:07:38 +09:00
Pierre Schweitzer a1edebefdf setupapi/tests: Add tests for the SetupOpenLog(), SetupLogErrorA(), SetupCloseLog() functions. 2015-03-27 00:12:20 +09:00
Nikolay Sivov dcab5fe61b setupapi: Make default context structure layout compatible. 2014-05-12 10:53:16 +02:00
Nikolay Sivov 8802f84c8c setupapi: Implement a binary compatible string table. 2014-05-06 16:42:44 +02:00
André Hentschel 0d688c7d52 setupapi/tests: Remove dead code. 2014-01-27 17:01:54 +01:00
Frédéric Delanoy 4ec00cb2c2 setupapi/tests: Use BOOL type where appropriate. 2014-01-06 17:15:45 +01:00
Alexandre Julliard 99ef0d6ff0 makefiles: Get rid of the MAKE_TEST_RULES variable. 2014-01-02 12:13:16 +01:00
Stefan Leichter adbc691d20 setupapi/tests: Test signature $Windows NT$ in SetupDiGetINFClassA too. 2013-12-18 11:33:31 +01:00
Nikolay Sivov 9d03aa328f setupapi/tests: Enable compilation with -D__WINESRC__. 2013-10-29 20:07:07 +01:00
Michael Stefaniuc 0e681027a2 tests: Compile the tests by default with -D__WINESRC__. 2013-10-02 11:04:02 +02:00
Michael Stefaniuc 09524be583 setupapi: Avoid using CONST. 2013-09-23 11:54:55 +02:00
Francois Gouget ce64b90c97 setupapi/tests: Remove a pointless use of assert(). 2013-07-03 21:20:03 +02:00
Hans Leidekker da922769c5 setupapi: SetupInstallServicesFromInfSection doesn't fail if there are no AddService or DelService directives in the section. 2012-07-09 15:06:26 -04:00
Francois Gouget 3de330db54 tests: Remove unneeded assert.h includes. 2011-09-27 10:59:56 +02:00
Christian Inci 309914f315 setupapi: Fix return behaviour when the device key doesn't exist. 2011-07-09 11:48:06 +02:00
Juan Lang 4fe8cc6164 setupapi: Make sure machine name is non-empty before failing. 2011-06-10 10:44:12 +02:00
Austin English 270298191d setupapi/tests: Remove win9x hacks. 2011-03-01 13:21:58 +01:00
André Hentschel c7cb92f1f2 setupapi/tests: Don't test function directly when reporting GetLastError(). 2010-12-30 14:59:57 +01:00
Greg Geldorp f6990085cc setupapi/tests: Uninstall .pnf if uninstall of .inf failed. 2010-12-29 12:03:48 +01:00
André Hentschel 57aa778e2d setupapi/tests: Don't test function directly when reporting GetLastError(). 2010-12-27 15:39:37 +01:00
André Hentschel 424fa9a7f3 setupapi/tests: Better clean up if SetupUninstallOEMInf fails. 2010-12-27 15:39:37 +01:00
André Hentschel 9c02760647 setupapi/tests: Fix wow64 failures. 2010-10-13 11:31:26 +02:00
Stefan Leichter 05a1416c93 setupapi: Implement SetupDiGetINFClassA on top of SetupDiGetINFClassW. 2010-10-05 13:04:26 +02:00
Alexandre Julliard 5c4c6544ae setupapi/tests: Make some variables static. 2010-10-01 13:37:28 +02:00
Stefan Leichter 637fd3735a setupapi: Added more tests for SetupDiGetINFClassA. 2010-09-30 11:15:49 +02:00
Alexandre Julliard 81b8ee863e makefiles: Add a standard header for all makefiles to replace the common variable initializations. 2010-09-19 12:36:48 +02:00
Stefan Leichter 7e8ab4c8b4 setupapi: Added tests for SetupDiGetINFClassA. 2010-09-14 13:31:46 -05:00
Andrew Nguyen 3eb4985231 setupapi: Implement SetupDuplicateDiskSpaceListA/W. 2010-09-07 16:00:42 +02:00
Andrew Nguyen beb3018bd5 setupapi: Improve parameter validation in SetupQuerySpaceRequiredOnDriveA/W. 2010-09-07 16:00:30 +02:00
Andrew Nguyen 188ed272dc setupapi: Improve parameter validation for SetupCreateDiskSpaceListA/W. 2010-09-07 15:58:20 +02:00
Alexandre Julliard b86d515ed6 dlls: Remove explicit imports of kernel32 and ntdll. 2010-07-21 17:38:36 +02:00
Austin English f7f38c5def setupapi/tests: Remove unused variable. 2010-07-21 13:23:59 +02:00
Andrew Nguyen a44506b563 setupapi: Only extract the first MSZIP cabinet file in SetupDecompressOrExtractFile. 2010-06-16 20:13:12 +02:00
Andrew Nguyen 53a563bb38 setupapi: Exhaustively test the invalid parameter handling of SetupDecompressOrCopyFileA. 2010-06-16 20:13:04 +02:00
Andrew Nguyen 813024d492 setupapi/tests: Add simple enumeration tests for SetupIterateCabinetW. 2010-06-16 20:13:02 +02:00
Andrew Nguyen d0e93cd3ab setupapi/tests: Add simple enumeration tests for SetupIterateCabinetA. 2010-06-16 20:13:00 +02:00
Andrew Nguyen abf63710da setupapi/tests: Add tests to show that SetupIterateCabinet handles callback exceptions on newer Windows. 2010-06-16 20:12:58 +02:00
Andrew Nguyen debe525f3f setupapi: Validate the cabinet filename parameter in SetupIterateCabinetW. 2010-06-16 20:12:54 +02:00