Commit graph

168 commits

Author SHA1 Message Date
winesync d2a1c13b49
[WINESYNC] 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>

wine commit id 01080e6750abcad22ac30df0e4efe669b458f8ab by Nikolay Sivov <nsivov@codeweavers.com>
2024-02-20 16:46:34 +01:00
winesync a30a992340
[WINESYNC] setupapi: Add a stub implementation of SetupDiRemoveDeviceInterface.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id cdb72f3997174afeb9bc6a8ecafc5de7b5d25afa by Hans Leidekker <hans@codeweavers.com>

SYNC NOTE: Move our already-existing stub to the correct file.
See commit 25b44b332 (r75031)

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:46:30 +01:00
winesync c3161ba3df
[WINESYNC] setupapi: Add SetupDiGetDevicePropertyW stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b32a0eaab9971af4045d6def9c4b2ebaa336636a by Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2024-02-20 16:46:29 +01:00
winesync a812357122
[WINESYNC] setupapi: Fix a typo in comment.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id bf9d01edd6b96ebeaeaa092e62d4b666045d0d9e by Andrey Gusev <andrey.goosev@gmail.com>
2024-02-20 16:46:26 +01:00
winesync 9cd60c5288
[WINESYNC] setupapi: Fix buffer overflow in SetupGetFileCompressionInfoW.
wine commit id b8c42020a98e3a5f486cbd03ef80302d6d605871 by Thomas Faber <thomas.faber@reactos.org>

SYNC NOTE: Already in ReactOS but reformatted following Wine.
See commit dcb9fa585 (r58019)

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:46:15 +01:00
winesync d8efd058a8
[WINESYNC] setupapi: Make sure DeviceInterfaceData->cbSize is initialized in SetupDiEnumDeviceInterfaces.
wine commit id 8d854a4830776aaacb70161709db315d54eb77f0 by Austin English <austinenglish@gmail.com>
2024-02-20 16:46:14 +01:00
winesync ca81cc071b
[WINESYNC] setupapi: Use BOOL type where appropriate.
wine commit id 9c76ccfda124ca471b3de4d8a04aed1e15a6b9f2 by Frédéric Delanoy <frederic.delanoy@gmail.com>
2024-02-20 16:46:13 +01:00
winesync d671a6c70e
[WINESYNC] setupapi: Stub SetupDiDestroyDriverInfoList.
wine commit id bdadd760a3b0685d828a3cfa09ed8a82df72e48c by Vincent Povirk <vincent@codeweavers.com>

SYNC NOTE: Fixed 1st parameter type in .spec file.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:46:12 +01:00
winesync 22eb5aa6a5
[WINESYNC] setupapi: Avoid using CONST.
wine commit id 09524be58380b612d0a9d2ba023ac25791e3fe03 by Michael Stefaniuc <mstefani@redhat.de>

SYNC NOTE: Minus the uglier parameters formatting.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:46:08 +01:00
winesync d5d9f88581
[WINESYNC] setupapi: Add stub keyword to some FIXMEs.
wine commit id f8c77fbd628a62221f985755baf7de675d4f31f0 by André Hentschel <nerv@dawncrow.de>
2024-02-20 16:46:06 +01:00
winesync 82fece3243
[WINESYNC] setupapi: Add support for a WinePreInstall section for registry keys that need to be created before anything else.
wine commit id 9a6a1126b9b8b4b5f17b16249eba761063be4be8 by Alexandre Julliard <julliard@winehq.org>
2024-02-20 16:45:58 +01:00
winesync f9d8e345de
[WINESYNC] setupapi: Print the debug string and not the pointer to it.
wine commit id 8f6801fdc02ff8307d81368be5d231505c78a35a by Michael Stefaniuc <mstefani@redhat.de>
2024-02-20 16:45:54 +01:00
winesync c17b8bc8ca
[WINESYNC] setupapi: Correctly handle errors in fake_dlls_callback (Coverity).
wine commit id edd9066d5b676104c036cb621574f36ea055951b by Frédéric Delanoy <frederic.delanoy@gmail.com>
2024-02-20 16:45:53 +01:00
winesync 942e02e6a3
[WINESYNC] setupapi: Add stub for SetupDiDrawMiniIcon.
wine commit id 8fc7a01a2c4f023672f34d907be607d6e5948f0e by Stefan Leichter <Stefan.Leichter@camline.com>
2024-02-20 16:45:47 +01:00
winesync 237a8a8550
[WINESYNC] setupapi: Add stub for SetupDiGetClassBitmapIndex.
wine commit id 649d0f85ba45870ac9238bfbc4e9233d4d33d5e6 by Stefan Leichter <Stefan.Leichter@camline.com>
2024-02-20 16:45:46 +01:00
winesync cb0ee40890
[WINESYNC] setupapi: Specify the correct binary file name when registering an executable.
wine commit id f9c8afd320a71ed4a04fbbd199844738a84068b5 by Alexandre Julliard <julliard@winehq.org>
2024-02-20 16:45:45 +01:00
Hermès Bélusca-Maïto e81fc3d72c
[SETUPAPI] Prepare for wine sync -- __REACTOS__-specific code 2024-02-20 16:45:42 +01:00
winesync 1f8cfa86dc
[WINESYNC] setupapi: Delay freeing registered dlls until they have all been processed.
wine commit id a192b707f2d102374771ed90e6c94ea40e79a08a by Alexandre Julliard <julliard@winehq.org>
2024-02-20 16:45:41 +01:00
winesync 8ff4632229
****** ROS-specific code sync too
[WINESYNC] setupapi: Make sure machine name is non-empty before failing.

wine commit id 4fe8cc61642c462883e748b566f93f984e3b4f2a by Juan Lang <juan.lang@gmail.com>

SYNC NOTE: Applied to ReactOS-specific code, with adaptations.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:45:38 +01:00
winesync 52d2567f80
[WINESYNC] setupapi: Always initialize output parameter to avoid crash in buggy applications.
wine commit id 53b287530961beaaae89bd063bc0d63ef41036ff by Juan Lang <juan.lang@gmail.com>
2024-02-20 16:45:37 +01:00
winesync 29456f347f
[WINESYNC] setupapi: Avoid shadowing a parameter.
wine commit id a326c9ee67d5a66b9634ae8e0850a99ba5fec26c by Austin English <austinenglish@gmail.com>
2024-02-20 16:45:36 +01:00
winesync c6ea951cc2
[WINESYNC] setupapi: Add stubs SetupQueryDrivesInDiskSpaceList{A,W}.
wine commit id 53aef28e36078f0eb28d925c01a9f81e9aeb94ad by Julius Schwartzenberg <julius.schwartzenberg@gmail.com>
2024-02-20 16:45:30 +01:00
winesync ab69e27031
[WINESYNC] setupapi: Add a few traces for SetupDecompressOrCopyFileW.
wine commit id 6456e14055584db1d67238a5e70c3bc42c881695 by Andrew Nguyen <anguyen@codeweavers.com>
2024-02-20 16:45:27 +01:00
Hermès Bélusca-Maïto 1080113889
[SETUPAPI] Prepare for wine sync 2024-02-20 16:45:25 +01:00
winesync ed312cfd56
[WINESYNC] setupapi: Only cleanup fake dlls once the whole section has been executed.
wine commit id 6836990e0b1143cad40d6f9cf54d85483e353cf5 by Alexandre Julliard <julliard@winehq.org>
2024-02-20 16:45:23 +01:00
Hermès Bélusca-Maïto 055142badb
[SETUPAPI] Prepare for wine sync -- FIXME: Move at the bottom position 2024-02-20 16:45:21 +01:00
winesync e669113b13
[WINESYNC] setupapi: Add support for creating registry symlinks from a .inf file.
wine commit id f6b3dba7a08a718f633804da508e4586ae72e6f5 by Alexandre Julliard <julliard@winehq.org>

SYNC NOTE: This is Wine-specific functionality, placed in __WINESRC__
REG_LINK is _NOT_ supported by (official) Windows INF AddReg section.
See the WDK ChkInf.pm tool (from Win2003 up to Win10), for example at:
https://github.com/skycipher/CNGProvider/blob/master/Windows%20Kits/10/Tools/x86/ChkInf/chkinf.pm#L3870
2024-02-20 16:45:20 +01:00
Hermès Bélusca-Maïto 082862f673
[SETUPAPI] registry_callback: Surround ReactOS-specific code in __REACTOS__
This code was added in commit 3dce4b048 (r24493).
2024-02-20 16:45:19 +01:00
winesync 3438acb6ab
[WINESYNC] setupapi: Add stub for SetupLogFile{A,W}.
wine commit id c7d4b0c69fb8de9a2344c7d9d4bcda6e3feef094 by Vitaly Perov <vitperov@etersoft.ru>
2024-02-20 16:45:18 +01:00
winesync 41039c3daf
[WINESYNC] setupapi: Create fake dlls before performing dll registration.
wine commit id 4ae262df8efbcf4cd2e213a1899801c09d6b5047 by Alexandre Julliard <julliard@winehq.org>
2024-02-20 16:45:12 +01:00
winesync 076b4ec9ad
[WINESYNC] setupapi: Use a global buffer to read fake dll files and free it only once we are done with all the fake dlls.
wine commit id 11d66a87887d6155850c1f5f0c889bfefe6add87 by Alexandre Julliard <julliard@winehq.org>
2024-02-20 16:45:11 +01:00
Hermès Bélusca-Maïto a5db8c36c8
[SETUPAPI] SetupCopyOEMInfW: Simplify by directly calling pSetupInstallCatalog. 2024-02-20 16:45:09 +01:00
Hermès Bélusca-Maïto 33a90b5a09
[SETUPAPI] pSetupInstallCatalog: Ensure the last error is reset, before relying on it as return value. 2024-02-20 16:45:08 +01:00
Hermès Bélusca-Maïto f6879cd3e1
[SETUPAPI] pSetupInstallCatalog: Call CryptCATAdminAcquireContext with DRIVER_ACTION_VERIFY GUID.
For compatibility with Windows' setupapi.
https://learn.microsoft.com/en-us/windows/win32/api/mscat/nf-mscat-cryptcatadminacquirecontext
> A pointer to the GUID that identifies the subsystem. DRIVER_ACTION_VERIFY
> represents the subsystem for operating system components and third party
> drivers. This is the subsystem used by most implementations.

This is also what SetupCopyOEMInfW uses too.
2024-02-20 16:45:07 +01:00
winesync e58a7ca526
****** ROS-specific code sync too
[WINESYNC] setupapi: Remove superfluous pointer casts.

wine commit id ffae0123ac46ba6dfac74d7c84422073fd53b580 by Michael Stefaniuc <mstefani@redhat.de>

SYNC NOTE: Applied to ReactOS-specific code.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:45:05 +01:00
winesync 01211c2016
[WINESYNC] setupapi: Remove some superfluous casts.
wine commit id 02d1154bab37c1cc6915c0a657189bf4153acd22 by Michael Stefaniuc <mstefani@redhat.de>
2024-02-20 16:45:03 +01:00
winesync 29da75098f
**** NOTE: A lstrlenW -> strlenW change done in SetupDiGetDeviceInstanceIdW
[WINESYNC] setupapi: Sign-compare warnings fix.

wine commit id 1c64c934db07bf9e6431ee43c6e9a53e58c78120 by Andrew Talbot <andrew.talbot@talbotville.com>
2024-02-20 16:45:00 +01:00
winesync f659a4edb8
[WINESYNC] setupapi: Implement installing catalog files.
wine commit id c19b967cd8561357ee7a519a937454e703a10bd8 by Maarten Lankhorst <maarten@codeweavers.com>
2024-02-20 16:44:57 +01:00
winesync f3ca28edff
[WINESYNC] setupapi: Constify a variable.
wine commit id 581a0e091cc87e027e48b835011b024a34506854 by Andrew Talbot <andrew.talbot@talbotville.com>
2024-02-20 16:44:56 +01:00
winesync a3a815aca7
****** ROS-specific code sync too
[WINESYNC] setupapi: Install services in InstallHinfSection.

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

SYNC NOTE: Adapted to ReactOS-specific code.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:44:54 +01:00
winesync ca354ef614
****** FIXME: INSPECT: The ROS-equivalent of SetupInstallServicesFromInfSection(Ex)W is missing the DelService case! Not implemented
[WINESYNC] setupapi: Implemented SetupInstallServicesFromInfSectionW.

wine commit id cf78e6c38c6815cc9ef805b791414bd67acbb992 by Alexandre Julliard <julliard@winehq.org>
2024-02-20 16:44:53 +01:00
winesync 924a321a1c
****** ROS-specific code sync too
[WINESYNC] setupapi: Assign to structs instead of using memcpy.

wine commit id bd0fec2511cc33fe1bbbc311d5c48f83a909a7fc by Andrew Talbot <andrew.talbot@talbotville.com>

SYNC NOTE: Applied to ReactOS-specific code.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:44:51 +01:00
winesync 52a86e2daf
****** ROS-specific code sync too
[WINESYNC] setupapi: Remove unneeded casts.

wine commit id e48bbc23e40ddb05d1b4205b7793abe38297058d by Andrew Talbot <andrew.talbot@talbotville.com>

SYNC NOTE: Applied to ReactOS-specific code.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:44:49 +01:00
winesync db4dab577e
*********** SYNC ALTERNATIVE FOR WINE SYNC
[WINESYNC] setupapi: Implement SetupDiGetClassDevsW.

wine commit id f841667cac1558d2131543c5dc9baba1c6418b01 by Juan Lang <juan.lang@gmail.com>

SYNC NOTE: The functions added there (and still existing in Wine's code up to now)
have our own equivalent (see comments):

SETUPDI_EnumerateDevices    --> SETUP_CreateDevicesList
SETUPDI_EnumerateInterfaces --> SETUP_CreateInterfaceList

The other SETUPDI_* are internal helpers for the previous ones:
SETUPDI_EnumerateMatchingDevices
SETUPDI_EnumerateMatchingInterfaces

TODO: Sync the name and functionality?
2024-02-20 16:44:32 +01:00
Hermès Bélusca-Maïto a6594545e0
************ [SETUPAPI] Re-estimate the section name buffer size in InstallHinfSectionW
This follows a similar change by Wine commit:
```
Added support for optional section.ntx86 and section.nt in
InstallHinfSection when current version is set to NT.

wine commit id 4f128fa874dc632ebc83da94afa9fd15ba9269ca by Alexandre Julliard <julliard@winehq.org>
```
2024-02-20 16:44:30 +01:00
winesync 7b1daaeca6
[WINESYNC] setupapi: Add a FIXME in SetupCopyOEMInfW for when we should be copying a catalog file.
wine commit id 34556854eda0de9d098968e8d948090d44030d25 by Rob Shearman <rob@codeweavers.com>

SYNC NOTE: Adapted for ReactOS code.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:44:27 +01:00
Hermès Bélusca-Maïto 0abf7e0ed3
********** SetupCopyOEMInfW: Close the opened dest_file (fix handle leak) 2024-02-20 16:44:25 +01:00
Hermès Bélusca-Maïto 6399c1525b
********** Wine-ify parts of SetupCopyOEMInfW to make it closer to Wine counterpart 2024-02-20 16:44:24 +01:00
Hermès Bélusca-Maïto 14375f7877
********* [SETUPAPI] Use OEM_INDEX_LIMIT instead of hardcoding the maximum index in SetupCopyOEMInfW, as done in Wine (but our value is compatible with Windows') 2024-02-20 16:44:21 +01:00
winesync 7c83e1230c
[WINESYNC] setupapi: Remove debug traces from allocation routines.
wine commit id c26a816f199a27dec5fa2b18c97c155933f5fe19 by Hans Leidekker <hans@it.vu.nl>
2024-02-20 16:44:18 +01:00