Commit Graph

979 Commits

Author SHA1 Message Date
Zebediah Figura cedbdf4387 setupapi: Avoid passing a NULL source root path to SetupQueueDefaultCopy() and SetupQueueCopySection().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-02 17:10:36 +02:00
Zebediah Figura 02df7eeb5b setupapi/tests: Add some tests for SetupInstallFilesFromInfSection().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:46:52 +02:00
Zebediah Figura 2d13b6b74c setupapi/tests: Avoid assert().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:46:52 +02:00
Zebediah Figura fccb7552eb setupapi: Extract individual files from cabinets.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:46:52 +02:00
Andrey Gusev 5466df6957 setupapi: Add DECLSPEC_HOTPATCH to SetupDiEnumDeviceInfo().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46971
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Alexandre Julliard 7204f0f67f setupapi/tests: Avoid using snprintf().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Alexandre Julliard 510e746718 setupapi: Add support for installing PE builtins as fake dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 14:08:18 +02:00
Zebediah Figura 5480031653 setupapi: Also check devices not in the set when using DICD_GENERATE_ID.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 11:33:05 +02:00
Zhiyi Zhang 1fa7782c08 setupapi: Check registered device duplicate in SetupDiCreateDeviceInfo().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 11:50:15 +01:00
Zhiyi Zhang 7876234e3a setupapi/tests: Add more SetupDiCreateDeviceInfo() tests.
SetupDiCreateDeviceInfo() should report last error
ERROR_DEVINST_ALREADY_EXISTS when an registered instance exists
when creating a device for an empty set.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 11:50:10 +01:00
Zhiyi Zhang 0b9b1cbf56 setupapi/tests: Add SetupDiOpenDeviceInfo() tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 11:50:07 +01:00
Zhiyi Zhang 17d58c93f3 setupapi: Implement SetupDiOpenDeviceInfoA().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 11:50:01 +01:00
Zhiyi Zhang cb5d191064 setupapi: Implement SetupDiOpenDeviceInfoW().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 11:49:54 +01:00
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
Alistair Leslie-Hughes 96ab88e139 setupapi: Add SetupDiRegisterCoDeviceInstallers stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:19:50 +01:00
Alistair Leslie-Hughes 4d81d41899 setupapi: Add SetupDiInstallDeviceInterfaces.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45963
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:19:42 +01:00
Alistair Leslie-Hughes 343e486e83 setupapi: Added CM_Request_Device_EjectA/W stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45879
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:19:31 +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 8c12672b06 setupapi: Handle error translation in SetupDiCreateDevRegKey().
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 922bc932c8 setupapi: Handle error translation in SetupDiDeleteDevRegKey().
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 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
Sven Baars afe83a7bbe setupapi: Add a missing return statement (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 15:53:18 +01:00
Vijay Kiran Kamuju 01b8a79595 setupapi: Add stub for CM_Get_Sibling.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +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 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
Zebediah Figura 86d26dded5 setupapi: Merge the InterfaceInfo and InterfaceInstances structs.
It seems the original motivation for separating these was to facilitate easy
enumeration of specific classes using SetupDiEnumDeviceInterfaces(), but it
makes other things unnecessarily complex [including an eventual
implementation of SetupDiRemoveDeviceInterface()] and the implementation
provided here seems quite simple enough.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:10:55 +02:00
Zebediah Figura ad9e1883ef setupapi: Add helper functions to get the path of the device instance keys.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:10:52 +02:00
Zebediah Figura 11d09c299e setupapi: Don't use SP_DEVINFO_DATA in internal structs.
And especially don't use a pointer to one, since there's no guarantee it'll
remain stable.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:10:49 +02:00
Zebediah Figura 5d7b123d09 setupapi: Merge the DeviceInstance and DeviceInfo structs.
These are two different representations of the same underlying object;
there's no reason to keep them separate.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:10:46 +02:00
Zebediah Figura b5b09649e6 setupapi: Add an internal helper for SetupDiSetDeviceRegistryProperty().
This essentially follows the model used in MSI. The next patch makes use of
this helper.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:10:43 +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
Zebediah Figura a3cedc1f3a setupapi: Remove a pointless cast.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:10:35 +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
Austin English d45e6814d6 setupapi: Set LastError on success in SetupInstallFromInfSectionW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45167
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
Tim Wanders 074345edd6 setupapi: Return CR_NO_SUCH_DEVNODE from CM_Get_Parent stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-02 20:47:11 +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
Alexandre Julliard 35719665d7 setupapi: Use correct architecture for fake dlls on ARM and ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-01 23:16:07 +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
Austin English 852cd999f3 setupapi: Add SetupDiEnumDriverInfoA/W stubs.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 18:53:30 +01:00
André Hentschel a0ec931a1b setupapi: Fix some more spec file entries.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-23 13:15:44 +01:00
Nikolay Sivov 01080e6750 setupapi: Use sizeof() instead of numerical constants for buffer sizes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-08 16:00:49 +01:00
Andrey Gusev 1ce4029994 setupapi: Add CM_Get_Sibling_Ex stub.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 13:07:35 +01:00
Andrey Gusev afa920a73f setupapi: Add CM_Get_Child_Ex stub.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 13:06:33 +01:00
André Hentschel 122aea9405 setupapi: Fix some spec file entries.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-27 16:31:43 +01:00