- 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>
wine-staging patch by Michael Müller <michael@fds-team.de>
[WINESYNC] setupapi: Implement SetupAddToDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>
[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>
[WINESYNC] setupapi: Ignore deletion of added files in SetupAddToDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>
[WINESYNC] setupapi: ImplementSetupAddSectionToDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>
[WINESYNC] setupapi: Implement SetupAddInstallSectionToDiskSpaceList.
wine-staging patch by Michael Müller <michael@fds-team.de>
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>
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.
wine commit id 4b09ed1486b4c880c7ed1cbbfd3d9b1335f4d4ab by André Zwing <nerv@dawncrow.de>
[WINESYNC] setupapi/tests: Add tests for FLG_ADDREG_APPEND.
wine commit id d7c8279c08c25e2afddb33184522386e928d5497 by Zebediah Figura <zfigura@codeweavers.com>
[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>
[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>
[WINESYNC] setupapi: Use standard va_list instead of __ms_va_list.
wine commit id d3a9fa181cbf81f6b920d6ddc3760e78d1d18601 by Alexandre Julliard <julliard@winehq.org>
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>
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>
[WINESYNC] uuid: Add devguid.h.
Needed to compile Tera Term.
wine commit id e72a16b57f66b63a16bb3d1619ac4d42632cb141 by Alex Henrie <alexhenrie24@gmail.com>
[WINESYNC] setupapi/tests: Add more tests for buffer size handling in SetupDiGetDeviceInterfaceDetail().
wine commit id 60af599bb916260e8bb8a2f5d0111815f741fef4 by Zebediah Figura <zfigura@codeweavers.com>
[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>
[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>
[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>
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>
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>
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>
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>
[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>
[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>
[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>
[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>
[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>
[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>
[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>
[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>
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>
[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>
[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>
[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>
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>
Source filename is NULL for files to be deleted.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fac1e40aaf0726a3e328a922cb496927548190cf by Hans Leidekker <hans@codeweavers.com>
[WINESYNC] setupapi: Implement SetupIterateCabinetW() on top of SetupIterateCabinetA().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 85afec5f2d09286d835c69bcc519780f6c103f22 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Link directly to cabinet.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id ad59a006ac9839c8bd29e4c4c6b80e6fc736136d by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Remove some superfluous traces.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 0b4d3dc2e8d4097997e69dd27ede7bbd8d92af05 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Remove unnecessary error handling from cabinet callbacks.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6b248f788c251223e2b7123cad90a25f55e13337 by Zebediah Figura <z.figura12@gmail.com>
[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>
[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>
[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>
[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>
[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>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 5696c3c23d5be9f5ce57ef7e361d88722120da09 by Alexandre Julliard <julliard@winehq.org>
NOTE: This commit is a Wine-specific feature, that does not exist in
Windows, thus should not exist in ReactOS: surrounded in __WINESRC__.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48639
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6971dfcfc21e887e4b5724d4f32e29d012e1b5be by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Implement SetupDiGetDriverInfoDetail().
Needed by the Windows Device Framework co-installer.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 5cff8c9e2e926edcc74202fa3354c2a4bb5ebef3 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Store the original INF file path in a .pnf file.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 547d62da228a3846cf058bcc71fc8974356a96b8 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Change return values from coinst functions.
As co_error and class_error both return 0xdeadbeef, use of 0xdeadbeef as
a canary value as well can lead to ambiguous tests results.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id cfde18c4904cd76eff40336e064cba86b9831633 by Jeff Smith <whydoubt@gmail.com>
[WINESYNC] setupapi/tests: Add error tests for SetupDiDestroyDeviceInfoList.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f9028142d1e57322f893d7e47d846f72a8c6c72c by Jeff Smith <whydoubt@gmail.com>
[WINESYNC] setupapi: Clear error on SetupDiDestroyDeviceInfoList success.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49332
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id babb1019d1a6adaa5a52398c192b55a083327f45 by Jeff Smith <whydoubt@gmail.com>
[WINESYNC] setupapi/tests: Add explicit field for inf contents size.
To make testing embedded NULs possible.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 43115a74f94293994904c9857996e9576dc3a8eb by Dmitry Timoshkov <dmitry@baikal.ru>
[WINESYNC] setupapi: Treat trailing \0 in field values same way as trailing spaces.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 5b7fac05d95fd2cd0c274f1342fb96d0f7152848 by Dmitry Timoshkov <dmitry@baikal.ru>
[WINESYNC] setupapi: Add a few more dirids.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 354aabd77e4ff3747446b2402de89d804001bd3f by Alexandre Julliard <julliard@winehq.org>
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36059
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 87b2af73baf3cc26fe5ed135cbd6ed494a9003be by Michael Müller <michael@fds-team.de>
+ Adaptation for ReactOS-specific code: the temporary file is already
created because of the LZOpenFileW steps from above, introduced by
commit e0e3c56ec (r68659), so we can directly call
MoveFileExW(..., MOVEFILE_DELAY_UNTIL_REBOOT);
with suitable parameters.
Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e0b5da7b34e9f38990939bd20cf4b2fa749c3f6e by Zebediah Figura <zfigura@codeweavers.com>
[WINESYNC] setupapi: Initialize COM if necessary when registering DLLs.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e75d5b8dc7e4751ddce84a379306a5deb89ca29b by Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id b3abc343c373ee5fd0764a3ceedeef52589c0ab2 by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] setupapi/tests: Remove an unused variable.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id dc968dae42e3b3162e2767ed32b0f91ae9b23ad3 by Thomas Faber <thomas.faber@reactos.org>
[WINESYNC] setupapi: Add support for IDF_CHECKFIRST flag in SetupPromptForDiskW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=20465
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 0422c6c4d0224c4e619771a0d22f4a5a1575f3f3 by Michael Müller <michael@fds-team.de>
[WINESYNC] setupapi/tests: Add test for IDF_CHECKFIRST and SetupPromptForDiskA/W.
With modifications from Hermes Belusca-Maito.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 14d782d18ac61baac2fc479c2bb19fb45cc98883 by Michael Müller <michael@fds-team.de>
[WINESYNC] guiddef.h: Remove GUID_NULL declaration.
It's declared in cguid.h with proper extern "C".
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id c041605b0074e6b12e5ea1df0cc645e772a220a7 by Jacek Caban <jacek@codeweavers.com>
[WINESYNC] setupapi: Implement SetupDiOpenDeviceInterfaceRegKey().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 4a3cd01bd150c27d7fd40d04fc92b173f2f988af by Zhiyi Zhang <zzhang@codeweavers.com>
[WINESYNC] setupapi: Fix hex digit check in SetupGetBinaryField.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d580d2c2fdad7f6f00dd12923e475298c019b660 by Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id afba7d9d93b38e91ef41b4ae3027dca6b468d237 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Implement class co-installers in SetupDiCallClassInstaller().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8b1050c7f4b73d8b0703bc8f6423f3b8f2c92a29 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Clean up and expand tests for SetupCopyOEMInf().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 097e224af72f50f036ce5e1ac4c8ef49b19feb64 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Check all INF files in SetupCopyOEMInf().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 29f65bc6a209643c56330b63aefbe36cb96d7cbe by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Always fill output parameters in SetupCopyOEMInfA().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 56aab6aaf83098115014512e0a6a5ab7e78bbef3 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Fix error handling in SetupInstallServicesFromInfSection().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6b2b6cde8bbd18ab1645cbf31435eb7a8ceec91e by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Avoid size_t in traces.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d5b77f5a161d1bf4176cf956e46ddf13139c897a by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] setupapi/tests: Test calling SetupDiEnumDeviceInterfaces() with a NULL device.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id bf09cca85090094121a390b2f83b1a10b5862aa2 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Add some tests for SetupDiGetClassDevs().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 301f66bf9661fbdd9f1ec73ed5c540ec5ee0f27c by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Add some tests for DIGCF_DEVICEINTERFACE.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 676e19f399cb9da6a1f85b241206f2af6e6f93e2 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Add some tests for SetupDiGetDeviceInfoListDetail().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id eca57ed672e97009108f7cc265fd21122e32d46f by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Avoid adding duplicate devices in SetupDiGetClassDevs().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e2194b93b5a77a2e11700833223d4504dba738c1 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Don't test functions directly when reporting GetLastError().
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id dae160ceda33598632597527cb56090acf58f60d by André Hentschel <nerv@dawncrow.de>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fce26e60cc2400f3f3da27c221dce95593dd400e by Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 88e28d971bd119f214e29d4ebfa819af9f18f5b7 by Józef Kucia <jkucia@codeweavers.com>
[WINESYNC] setupapi: Handle an empty string for the source file in SetupQueueCopySection().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47185
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 86724af01241b257a4b4b39682031c9c7a3aaeaa by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Add some basic tests for SetupDi{Get, Set}DeviceInstallParams().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 45d199023f440209c5753e055db233924664df22 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Add tests for SetupDiGetActualSectionToInstall().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6244f05941f13bf330d68208849d74ae54f116a0 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Return the section name in SetupDiGetActualSectionToInstall() even if it doesn't exist.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 23320d05b628575ab9ccb44e4482a30268e9a93e by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Add some tests for SetupInstallFile().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2ddc60c8f0276c739b2f512397d32e1b9425e4b0 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Retrieve the default destination path in SetupInstallFile().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d5f6d6419b16ef81ce882f01a318189251320fcb by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Clear the Win32 error if no copy was necessary.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id a748f685a502891bc8fa5f4719f80b6feb39ac9c by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Don't fail a queued copy if no copy was necessary.
This fixes a regression introduced by 3e5c9798a80641e0e39e95e4467c60405b22b062.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47219
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8bc25b24af0276985ad080c8364c11cfff3a1fe5 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Add tests for building and enumerating driver lists.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 57c3ebec7c803857f39a6cb1033f8a67e3949190 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Add a basic implementation of SetupDiCallClassInstaller().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 43ee138d4747722cfc7d27e59014a47c3003a898 by Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d5a6a2675c250cffd7b37a27d61fc2031b1d7b21 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Add magic bytes to struct file_queue and validate them in SetupCloseFileQueue().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=12332
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id c65d98065c0038e0919f40bec4a9dc978fb2ade9 by Zebediah Figura <z.figura12@gmail.com>
Emit an error line in the debug log and break out of the resolution loop.
Don't use a message box for now, since the problem happens also during
2nd-stage setup, for which an automated handling of such msgbox in our
test bots would not be possible.
We now get the following during 2nd-stage:
```
[...]
(base\services\umpnpmgr\install.c:118) Installing: ACPI\ACPI0003\0
err:(dll\win32\setupapi\queue.c:1696) ** Could not find source install media! ** copy error 0 L"C:\\ReactOS\\inf\\cmbatt.sys" -> L"C:\\ReactOS\\System32\\drivers\\cmbatt.sys"
err:(dll\win32\setupapi\queue.c:1696) ** Could not find source install media! ** copy error 0 L"C:\\ReactOS\\inf\\battc.sys" -> L"C:\\ReactOS\\System32\\drivers\\battc.sys"
err:(dll\win32\setupapi\queue.c:1696) ** Could not find source install media! ** copy error 0 L"C:\\ReactOS\\inf\\compbatt.sys" -> L"C:\\ReactOS\\System32\\drivers\\compbatt.sys"
[...]
err:(dll\win32\setupapi\queue.c:1696) ** Could not find source install media! ** copy error 0 L"C:\\ReactOS\\inf\\" -> L"C:\\ReactOS\\System32\\drivers\\cdrom.sys"
[...]
err:(dll\win32\setupapi\queue.c:1696) ** Could not find source install media! ** copy error 0 L"C:\\ReactOS\\inf\\" -> L"C:\\ReactOS\\System32\\drivers\\disk.sys"
```
(Note that the source paths without any file, in the last two example
lines, is strange...)
---
The previous Wine commit, that implements install source media resolution
feature, causes ReactOS to apparently hang during the 2nd-stage setup.
This is caused by an infinite "loop" while trying to resolve the install
source for our drivers we "install" during 2nd-stage setup.
Testing by replacing our setupapi.dll with Windows', reveals that this is
basically what's happening, except that the dialog for finding the install
media shows up now.
The "infinite loop" would effectively be obtained by pressing OK, failing,
pressing OK again, etc. indefinitely.
The only difference is that Wine's setupapi.dll doesn't have any dialog
for that, so nothing shows up and it just infinitely loops there.
(The dialog would be the equivalent to the IDPROMPTFORDISK one.)
Now, the reason why this happens in ReactOS is because we use .inf files
that derive their installation source from a layout.inf file... that we
do not support (ours is a stub). Further, Wine's setupapi doesn't support
LayoutInf as well.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 46dc6dddf3d1ef02aa773d0e25c121b8643d4bba by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Implement W -> A mapping of SPFILENOTIFY_NEEDMEDIA.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e8c4dbcec21d9b65cb680c6c773e560f761d42f8 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Properly null-terminate the path in concat_W().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id db8e2388d940f908db009f34f620da1ac8b46d07 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Use the source file name if the destination file name is NULL.
Do not do the reverse. Windows crashes if SourceFilename is NULL.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id cfe4ce28ebc0f381eb2f561ad3111eef71505546 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Implement source media path resolution.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47107
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 3e5c9798a80641e0e39e95e4467c60405b22b062 by Zebediah Figura <z.figura12@gmail.com>
So as to centralize SPFILENOTIFY_COPYERROR callbacks into one place.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 3cb621e6ca78064adeb2415bf3467e476e9eba6a by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Keep track of source media in a separate list.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 31bb0097ad85090b1e006ade020c68aa5582dc0c by Zebediah Figura <z.figura12@gmail.com>
setupapi: Remove implementation for LayoutInf parameter of SP_FILE_COPY_PARAMS.
Tests demonstrate that the existing implementation is not correct, and I was
unable to find an arrangement of parameters such that it was respected on
Windows. Most likely it has to do with the undocumented parameters used in
the "master" C:\windows\inf\layout.inf.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id ee36f923c59d9ba51b429247df90e0ed30592e62 by Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2d13b6b74cfa4a21f2b575081331619fb6cebfed by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi/tests: Add some tests for SetupInstallFilesFromInfSection().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 02df7eeb5bbed4f94840cec4cd8c3d0ad3da9eda by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Fill out all source file parameters in SetupQueueCopySection().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f9f25ee227a60c335ea8767e8b09d2f3bc3d53f7 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Fill out all source file parameters in SetupQueueDefaultCopy().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 705d3eed86f3ff96ee1190dbc694148c21c4939c by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Implement SetupQueueCopyIndirectA() on top of the W variant.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 466b80786fbf7ced695358af3ee87302ed00eb1b by Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fccb7552ebe81ea2c0c17bc747a920f90e2537a5 by Zebediah Figura <z.figura12@gmail.com>
NOTE: Already committed in ReactOS in commit 5c8ec78b7 (PR #5233).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e26f8464e90462654d846657bf15938f1f287664 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] 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>
wine commit id 00c8c270321f75d34c08f77300bd7082df761e42 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] 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>
wine commit id 7e4c1a20740c8b2e2a46c3bd906d07213598aa41 by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Implement SetupDiSetDevicePropertyW.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id afac1c405d0d82839df7c0c3d6299921bdd26a89 by Zhiyi Zhang <zzhang@codeweavers.com>
[WINESYNC] setupapi: Implement SetupDiGetDevicePropertyW.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 307812c30d2d9a037e3ebfc9c392bfe11fe39112 by Zhiyi Zhang <zzhang@codeweavers.com>
[WINESYNC] setupapi/tests: Avoid sizeof in traces.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d70d6b8486fc880e8fd72f6d409464deb518a639 by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] 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>
wine commit id 486fffa45c47fa102a40f88ea4f46c74fbd7640c by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Handle error translation in SetupDiOpenDevRegKey().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f703c7f22d5da5596c9abc91400191d3e12c3cbc by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] setupapi: Search for substituted strings in SetupFindNextMatchLine().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id bb4a6da373d7fdb4a61743ee0632298f6a2f333f by Zebediah Figura <z.figura12@gmail.com>
[WINESYNC] 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>
wine commit id 9f2baf1dd49590a0f8dada5a050719b7e2be697c by Francois Gouget <fgouget@free.fr>
[WINESYNC] setupapi/tests: Test phantom value after device creation.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 35673c7e8e0709276fe6f0bb2727da3da438ec11 by Zhiyi Zhang <zzhang@codeweavers.com>
[WINESYNC] setupapi: Set phantom value after device creation.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 64c09819cf937b87344b41d049d43e4b8754fb64 by Zhiyi Zhang <zzhang@codeweavers.com>
[WINESYNC] setupapi/tests: Add SetupDiOpenDeviceInfo() tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 0b9b1cbf56a035a78cce6003392b95d4c43a3144 by Zhiyi Zhang <zzhang@codeweavers.com>
[WINESYNC] 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>
wine commit id 7876234e3ad3f664bdc02e976458dc87fb00f0a5 by Zhiyi Zhang <zzhang@codeweavers.com>
[WINESYNC] setupapi: Check registered device duplicate in SetupDiCreateDeviceInfo().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1fa7782c080e5d4719bb230110992a0705f9b224 by Zhiyi Zhang <zzhang@codeweavers.com>
[WINESYNC] setupapi/tests: Avoid using snprintf().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 7204f0f67f9fbd8765fce86c4195269c4f5aa876 by Alexandre Julliard <julliard@winehq.org>
- Initial sync config file;
- Add reconstructed WineStaging v4.0 setupapi patches that were originally
applied (and need to be reverted).
[WINESYNC]: revert wine-staging patchset for setupapi
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d33f06746050984c622366ffbc19219ec1f5aa7d by Michael Stefaniuc <mstefani@winehq.org>
[WINESYNC] 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>
wine commit id a6d89db61566b5dcccd66cb1cb5a51dfa0cc0f0a by Huw Davies <huw@codeweavers.com>