Commit graph

86400 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
183eecdac4
[SETUPAPI] .spec file: Add NT6+ stubs and -version info for some functions.
Note that the exports are sorted by _ordinal_ and not by name, for
compatibility with Windows' setupapi.dll.

Cross-checked with:
- https://abi-laboratory.pro/compatibility/Windows_5.0_to_Windows_6.0/x86_64/compat_reports/setupapi.dll/abi_compat_report.html
- http://redplait.blogspot.com/2010/11/setupapidll-exports.html
- https://blog.airesoft.co.uk/apichanges/changes-Vista%20SP2-To-7%20SP0.xml#setupapi.dll
- https://blog.airesoft.co.uk/apichanges/changes-7%20SP1-To-8%20SP0.xml#setupapi.dll
- https://blog.airesoft.co.uk/apichanges/changes-8%20SP0-To-8.1.xml#setupapi.dll
- https://windows10dll.nirsoft.net/setupapi_dll.html

and manually with setupapi.dll from Win2k3, Vista, Windows 7 and 10.
2024-10-24 15:14:57 +02:00
Hermès Bélusca-Maïto
0632def000
[SETUPAPI] Add missing NULL parameter checks in SetupOpenInfFileW and SetupDiGetINFClassW.
Based on PR #5673, ROSTESTS-388

Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
2024-10-24 15:14:56 +02:00
Hermès Bélusca-Maïto
2788057a2d
[SETUPAPI] diskspace.c: Fix memory allocations.
- The allocated file element should use the CRT allocator, as it is how
  it gets freed in SetupDestroyDiskSpaceList (and SetupDuplicateDiskSpaceListW)

- GetFullPathNameW() takes the buffer size in number of characters, not
  in bytes.

Fix for wine-staging commit:
setupapi: Implement SetupAddToDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>
2024-10-24 15:14:55 +02:00
winesync
b023d5b821
[WINESYNC]: setupapi is partially in sync, and setupapi_winetest is in sync with wine-staging wine-8.15
- dialog.c
- dirid.c
- diskspace.c
- parser.c
- query.c
- queue.c
- setupcab.c
- stringtable_wine.c
- setupapi_winetest
2024-10-24 15:14:54 +02:00
winesync
acf459ecc7
[WINESYNC] setupapi: Implement SetupAddInstallSectionToDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>
2024-10-24 15:14:53 +02:00
winesync
8c0d311d9f
[WINESYNC] setupapi: ImplementSetupAddSectionToDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>
2024-10-24 15:14:52 +02:00
winesync
b0cecb370b
[WINESYNC] setupapi: Ignore deletion of added files in SetupAddToDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>
2024-10-24 15:14:51 +02:00
winesync
91c46d82c3
[WINESYNC] setupapi: Implement SetupQueryDrivesInDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>

+ Add the .spec exports.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-10-24 15:14:50 +02:00
winesync
a405f58d89
[WINESYNC] setupapi: Implement SetupAddToDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>
2024-10-24 15:14:49 +02:00
winesync
d154ec0984
[WINESYNC] setupapi: Rewrite DiskSpaceList logic using lists.
wine-staging patch by Michael Müller <michael@fds-team.de>
2024-10-24 15:14:48 +02:00
winesync
2e0ec8451d
[WINESYNC] setupapi: Use CRT functions for memory allocation where possible.
The big win here is getting rid of the reimplementation of wcsdup.

wine commit id c293cd781fb4b330b7d93171501134f86a5138b8 by Alex Henrie <alexhenrie24@gmail.com>

+ Similar adaptations in ReactOS-specific code.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-10-24 15:14:47 +02:00
Hermès Bélusca-Maïto
306ee9d36e
[SETUPAPI] Add a temporary private implementation of _recalloc.
Needed for the next commit.

Code has been copied and adapted from sdk/lib/crt/wine/heap.c.
This is because this NT6+ function is not currently exported
from MSVCRT.DLL, and it is not possible to static-link parts
of the CRT lib while also using the dll.
2024-10-24 15:14:46 +02:00
winesync
11d2757e13
[WINESYNC] setupapi: Use standard va_list instead of __ms_va_list.
wine commit id d3a9fa181cbf81f6b920d6ddc3760e78d1d18601 by Alexandre Julliard <julliard@winehq.org>
2024-10-24 15:14:46 +02:00
winesync
92dc4627bc
[WINESYNC] setupapi: Create the registry value if it doesn't exist in append_multi_sz_value().
wine commit id 38e36e8fdaf6dc682ce5af7b5b00cb795fffd967 by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:14:45 +02:00
winesync
85cafd0c49
[WINESYNC] setupapi: Fail installation when trying to append to a registry value of the wrong type.
wine commit id 0ab56b88dfdca442ab0820eacc14f6397f628924 by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:14:44 +02:00
winesync
ca9d4ee535
[WINESYNC] setupapi/tests: Add tests for FLG_ADDREG_APPEND.
wine commit id d7c8279c08c25e2afddb33184522386e928d5497 by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:14:43 +02:00
winesync
d89cb3dc29
[WINESYNC] setupapi/tests: Don't test function directly when reporting GetLastError().
wine commit id 4b09ed1486b4c880c7ed1cbbfd3d9b1335f4d4ab by André Zwing <nerv@dawncrow.de>
2024-10-24 15:14:42 +02:00
Hermès Bélusca-Maïto
3edf03cbf2
[INTL][NETSHELL][SYSDM] Include setupapi_undoc.h for IsUserAdmin(). 2024-10-24 15:14:41 +02:00
Hermès Bélusca-Maïto
4ee3bed423
[DEVMGR][HOTPLUG][NEWDEV][SYSSETUP] Include setupapi_undoc.h for pSetup* functions. 2024-10-24 15:14:40 +02:00
winesync
c84e8f87c4
[WINESYNC] setupapi: Move prototypes not in Windows's setupapi.h to setupapi_private.h.
And delete the ones we don't need.

wine commit id 1172e66e5b7fa96decf89f8866e71b77e5773ec7 by Alex Henrie <alexhenrie24@gmail.com>

+ ReactOS: Private exports prototypes are added in sdk setupapi_undoc.h

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-10-24 15:14:39 +02:00
winesync
e54b749628
[WINESYNC] setupapi: Use _S_I(READ|WRITE) from sys/stat.h instead of redefining them.
wine commit id a1ae33a3efb7231adf683484e9de66f84abb04d1 by Alex Henrie <alexhenrie24@gmail.com>
2024-10-24 15:14:38 +02:00
winesync
a0cd4e9ed2
[WINESYNC] setupapi: Fill the required size in SetupDiGetDeviceInterfaceDetail() also on success.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53387

wine commit id d15262e464ba3536567ad73f68d95e6b7f88f3aa by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:14:37 +02:00
winesync
59c5186fe7
[WINESYNC] setupapi: Correctly calculate the required size in SetupDiGetDeviceInterfaceDetailA().
Don't include the null terminator twice.

wine commit id 5711f03e8479936ac5e3bc71ba7987f6b7cb5586 by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:14:36 +02:00
winesync
a90335af46
[WINESYNC] setupapi/tests: Add more tests for buffer size handling in SetupDiGetDeviceInterfaceDetail().
wine commit id 60af599bb916260e8bb8a2f5d0111815f741fef4 by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:14:35 +02:00
winesync
9d4aa050d8
[WINESYNC] uuid: Add devguid.h.
Needed to compile Tera Term.

wine commit id e72a16b57f66b63a16bb3d1619ac4d42632cb141 by Alex Henrie <alexhenrie24@gmail.com>
2024-10-24 15:14:34 +02:00
winesync
1d5abc569a
[WINESYNC] setupapi: Add SetupQueryInfVersionInformationA/W stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52616
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id dc0aa67ce690f67ae8c12d7bed0a449c1af8c693 by Gijs Vermeulen <gijsvrm@gmail.com>
2024-10-24 15:14:33 +02:00
winesync
c2dbf04926
[WINESYNC] setupapi/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b73e3102009cc7151ab58321800aeded24c1307f by Eric Pouech <eric.pouech@gmail.com>
2024-10-24 15:14:30 +02:00
winesync
df68b4507d
[WINESYNC] setupapi/tests: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 0e4c108490db8d1c7b3c5d016979ace327d2c8ab by Eric Pouech <eric.pouech@gmail.com>
2024-10-24 15:11:29 +02:00
Hermès Bélusca-Maïto
05b2083e41
[SETUPAPI] Use long type also in SetupGetInfDriverStoreLocationA
Addendum for the previous commit.
2024-10-24 15:11:28 +02:00
winesync
a0042f6a62
[WINESYNC] setupapi: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id e498e0ec9bf5a3f9cdb965f8668888697ac642ae by Eric Pouech <eric.pouech@gmail.com>
2024-10-24 15:11:27 +02:00
winesync
15bb5460ce
[WINESYNC] setupapi: Also handle DelFiles and RenFiles directives in SetupInstallFilesFromInfSection().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 506ce2ae6bc2fc1395da402a8ed0de4527fa7e24 by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:11:26 +02:00
winesync
b52603471e
[WINESYNC] setupapi: Use the source path if the target path is missing in SetupQueueRename().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 47111ff6b08dc019456d0f3c910a924deb1267d2 by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:11:25 +02:00
winesync
82e53cbe9e
[WINESYNC] setupapi/tests: Add more tests for SetupInstallFilesFromInfSection().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 63cdb0b91a80d6e4bfd7528131157a3f20f2de6f by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:11:24 +02:00
winesync
decb32ce9e
[WINESYNC] setupapi/tests: Test queuing the same copy operation twice.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id ef77468b5e041d55db3821778665a2a406ed72ea by Zebediah Figura <zfigura@codeweavers.com>
2024-10-24 15:11:23 +02:00
winesync
46d62d8b37
[WINESYNC] setupapi: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id fd8d0babe1ba8efde1d5a251deee43994d2d8eec by Eric Pouech <eric.pouech@gmail.com>
2024-10-24 15:11:22 +02:00
winesync
4f8c213738
[WINESYNC] setupapi/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 87acd4021848afffc4c2060c0494db1045c060d6 by Fabian Maurer <dark.shadow4@web.de>
2024-10-24 15:11:22 +02:00
winesync
2b28938ebd
[WINESYNC] setupapi/tests: Add some service installation flags tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 919ee014b93ba633ead2cfe44bcf475dbda55ecd by Rémi Bernon <rbernon@codeweavers.com>
2024-10-24 15:11:21 +02:00
winesync
a5cd00eeb1
[WINESYNC] setupapi/tests: Add possible test_need_media results for Win10.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 68b83a8a093d59d9ee085574c4c1ef64e6b28807 by Rémi Bernon <rbernon@codeweavers.com>
2024-10-24 15:11:20 +02:00
winesync
a3ae613de4
[WINESYNC] setupapi: Use lowercase device paths.
Some games are doing case sensitive matches on the device paths obtained from
Setup API and expect them to be lowercase.

This fixes Virginia not being able to discover DualShock 4.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 30a026d2454b2de93257e9eb895573ce8c56dc05 by Arkadiusz Hiler <ahiler@codeweavers.com>
2024-10-24 15:11:19 +02:00
winesync
e971dfba66
[WINESYNC] setupapi/tests: Add display device interface tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 5030f4cf26c31bc709d6565182b51af1165953a6 by Zhiyi Zhang <zzhang@codeweavers.com>

SYNC NOTE: These display GUIDs are Vista+, so temporarily elevate
NTDDI_VERSION to Vista.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-10-24 15:11:18 +02:00
winesync
e3ce4be868
[WINESYNC] setupapi: Rank drivers according to their id match.
And as described on MSDN "Driver Rank Example".

In order to safely remove the hardcoded XBox gamepad ID list from
winebus.sys, and list their hardware IDs in the (future) xinput.sys
driver INF.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id cfddd2c1e24fc03ad570f771093fd08bbf8b9575 by Rémi Bernon <rbernon@codeweavers.com>
2024-10-24 15:11:17 +02:00
winesync
7226c17ca8
[WINESYNC] setupapi: Create only one driver per driver id match.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id eb94d7aea85b13197f8d678baeca414adc05aaed by Rémi Bernon <rbernon@codeweavers.com>
2024-10-24 15:11:16 +02:00
winesync
5c19acf2b1
[WINESYNC] setupapi/tests: Add more driver / device id match tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 9b2a25232312a073f288d683d48f9366d54654d3 by Rémi Bernon <rbernon@codeweavers.com>
2024-10-24 15:11:15 +02:00
winesync
eaadd619e0
[WINESYNC] setupapi: Remove all device interfaces in SetupDiRemoveDevice().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 0b8c1d69e66094d72e00f30f370ec3f69fb43dfd by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 15:11:14 +02:00
winesync
05855c8f6d
[WINESYNC] setupapi: Add a few printer directory ids.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 00b9c975d4bd3a24ae41c99057d7a1a32f329c00 by Alexandre Julliard <julliard@winehq.org>

SYNC NOTE: This commit also reverts wine commit 000136ac301327a85fecbd0aef788bc1629b6121
"setupapi: Add support for DIRID_PRINTPROCESSOR." by Andrey Turkin <andrey.turkin@gmail.com>
2024-10-24 15:11:13 +02:00
winesync
fdec248ec1
[WINESYNC] setupapi: Pass the full cabinet path as the second parameter to SPFILENOTIFY_FILEINCABINET.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 8cb6e9585eefd4b0c0257f549d738f6a10f0d097 by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 15:11:12 +02:00
winesync
a7f9d23f69
[WINESYNC] setupapi: Set the Source field to the full cabinet path for SPFILENOTIFY_FILEEXTRACTED.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b67deb0d2f03f7963f3247e4a4477b668a7ace35 by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 15:11:11 +02:00
winesync
eeadccb1f6
[WINESYNC] setupapi: Set the CabinetFile field to the name of the next cabinet.
Verified through manual testing.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 811da7bf1a37fc4e3851971a7e96e28b445efebc by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 15:11:10 +02:00
winesync
a286c44380
[WINESYNC] setupapi/tests: Expand tests for SetupIterateCabinet().
Partially based on a patch by Sebastian Lackner.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 978cc1d856c7f62191bf6b1b64ddecf737ea5eea by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 15:11:09 +02:00
winesync
4c9e5df9cf
[WINESYNC] setupapi: Make the FDI handle a local variable.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b70b153c59e2aa9365beecc94ef63f6fefb19b9f by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 15:11:09 +02:00