Commit Graph

900 Commits

Author SHA1 Message Date
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 dca175b256 setupapi: Don't use the devnode to allocate driver keys.
The devnode is a local handle, but driver keys should be unique to the
device. (Note that MSDN, confusingly, refers to this number as a "device
instance ID".)

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:40:21 +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 26dd015fdd setupapi: Use strtoulW().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-06 08:57:38 +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 ac1d89fa13 setupapi: Get rid of the redundant cDevices parameter to struct device.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 10:02:19 +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
Alex Henrie 837b4aa429 setupapi: Turn several constants and variables into static constants.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-30 19:36:51 +01:00
Marcus Meissner 161d02fd5d setupapi: Fix size passed to MultiByteToWideChar.
Signed-off-by: Marcus Meissner <meissner@suse.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Zebediah Figura 0c0aa90a90 setupapi: Avoid unnecessary buffer allocation in SETUPDI_EnumerateMatchingDeviceInstances().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 09:35:44 +01:00
Zebediah Figura 462c74bcdb setupapi: Avoid unnecessary buffer allocation in SetupDiCreateDeviceInfoW().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 09:35:42 +01:00
Zebediah Figura 81d2b419b8 setupapi: Avoid unnecessary buffer allocation in SetupDiGetDeviceInstanceIdA().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 09:35:35 +01:00
Zebediah Figura ad5314040b setupapi: Avoid unnecessary buffer allocation in SetupDiCreateDeviceInfoA().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 09:35:32 +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 72c5f3b57d setupapi: Store the class and reference string keys in the device_iface structure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-27 09:00:22 +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 aba3ed75f1 setupapi/devinst: Factor out get_device_set().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:21:59 +01:00
Zebediah Figura cdb486ae0a setupapi/devinst: Factor out get_device_iface().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:21:57 +01:00
Zebediah Figura 62bf00b94f setupapi/devinst: Factor out get_device().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:21:53 +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
Alistair Leslie-Hughes 8533516988 setupapi: Fix broken control definition.
Based on a patch by Mark Jansen.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 00:10:14 +01:00
Huw Davies a6d89db615 setupapi: For consistency use __x86_64__ instead of __x86_64.
Spotted by Ken Thomases.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 12:34:57 +02:00
Michael Stefaniuc d33f067460 setupapi: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-17 15:40:32 +02:00
Zebediah Figura 9ccf51e3c1 setupapi: Only delete unregistered device interfaces when deleting a device.
Fixes a regression introduced by 86d26dded5.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-20 09:08:46 +02:00
Zebediah Figura 3fa12ba3a5 setupapi: Implement DIGCF_PRESENT.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:53:42 +02:00
Zebediah Figura f48e726e51 setupapi: Implement SPINT_LINKED.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:53:40 +02: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