Commit graph

86373 commits

Author SHA1 Message Date
winesync
d3d00be596
[WINESYNC] setupapi: Use the ARRAY_SIZE() macro.
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>
2024-10-24 14:54:05 +02:00
Hermès Bélusca-Maïto
be832c6f79
** !! ** ONLY SYNC misc.c and stubs.c FOR NOW ON ** !! ** 2024-10-24 14:54:04 +02:00
winesync
334d173305
****** Heavily adapted for ReactOS -- TODO: Investigate: Code around copy_device_iface_data may be simplified?
[WINESYNC] 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>

wine commit id 86d26dded5560d6d8adb195372f0676d1f7229b0 by Zebediah Figura <z.figura12@gmail.com>

SYNC NOTE: Only changes applicable to ReactOS have been added:
namely, the copy_device_iface_data() inline helper.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-10-24 14:54:03 +02:00
winesync
dc578f4808
****** FIXME: INSPECT: necessary for the interface thing
[WINESYNC] 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>

wine commit id ad9e1883ef558886607037592f48e6c5d216d4e1 by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 14:54:02 +02:00
winesync
ef6869a15e
****** Heavily adapted for ReactOS
[WINESYNC] 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>

wine commit id 11d09c299e5df47cadda7473d03a49244c846634 by Zebediah Figura <z.figura12@gmail.com>

SYNC NOTE: Only changes applicable to ReactOS have been added:
namely, the copy_device_data() inline helper.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-10-24 14:54:01 +02:00
winesync
6674fe54a4
***** This commit does not apply for ReactOS
[WINESYNC] 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>

wine commit id 5d7b123d094ba2de40237f310ec43f4b06b560a3 by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 14:54:00 +02:00
winesync
53200573ae
****** Commit useless for ROS
[WINESYNC] 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>

wine commit id b5b09649e6be0154154174b2641bca23a7216f96 by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 14:53:59 +02:00
winesync
d25b82e830
[WINESYNC] 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>

wine commit id f840bcc6f7dfdfda507e4fc89d9ed2fdc6ca3a94 by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 14:53:58 +02:00
winesync
14b331bdae
[WINESYNC] setupapi: Remove a pointless cast.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id a3cedc1f3a2ca66c9ed15fe054413fb9566326c6 by Zebediah Figura <z.figura12@gmail.com>
2024-10-24 14:53:58 +02:00
winesync
7eb63d6fd3
[WINESYNC] 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>

wine commit id d45e6814d67c1f1a2eb6023f0fb5574d560fd9b8 by Austin English <austinenglish@gmail.com>
2024-10-24 14:53:57 +02:00
winesync
6ec980b745
[WINESYNC] 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>

wine commit id 074345edd6147a44b1311780c073f13d8114b726 by Tim Wanders <timwanders241@gmail.com>
2024-10-24 14:53:56 +02:00
winesync
7e9fa0ee8a
[WINESYNC] 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>

wine commit id c9308b8d6b1e2f4dd39b19a6890423cd42fd4620 by Hugh McMaster <hugh.mcmaster@outlook.com>
2024-10-24 14:53:55 +02:00
winesync
936f020646
******* TODO: Check whether I want to remove this switch (lerror) thing and use code more similar to Wine's...
[WINESYNC] setupapi: Fix SetupDiGetDeviceRegistryProperty if property does not exist.

Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id e4645d60d72a9fbfbd745e275d4f90110bdceb4d by Andrew Wesie <awesie@gmail.com>

SYNC NOTE: Adapted for ReactOS code.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-10-24 14:53:54 +02:00
winesync
42c39fb66a
[WINESYNC] setupapi: Add SetupDiEnumDriverInfoA/W stubs.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 852cd999f3de5b95444b99a1912ed6900a64a37b by Austin English <austinenglish@gmail.com>
2024-10-24 14:53:53 +02:00
winesync
00ce5edd18
[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-10-24 14:53:52 +02:00
winesync
66349e77a7
[WINESYNC] setupapi: Add CM_Get_Sibling_Ex stub.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 1ce40299941f03fb14ca73e771c1d6ea0090165a by Andrey Gusev <andrey.goosev@gmail.com>
2024-10-24 14:53:51 +02:00
winesync
f7e4faf32d
[WINESYNC] setupapi: Add CM_Get_Child_Ex stub.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id afa920a73fbcea3fd9459b1b53976ab1b6e99735 by Andrey Gusev <andrey.goosev@gmail.com>
2024-10-24 14:53:50 +02:00
winesync
78a5baade1
[WINESYNC] setupapi: Stub CM_Open_DevNode_Key and CM_Get_Child.
Signed-off-by: Christoph Brill <egore911@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 6b055830059bfd7afeb4e63e44f32eb28afc6c98 by Christoph Brill <egore911@gmail.com>
2024-10-24 14:53:50 +02:00
winesync
6e9bc4a610
[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-10-24 14:53:49 +02:00
winesync
919f83e1eb
[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-10-24 14:53:48 +02:00
winesync
dc766ab7ea
[WINESYNC] setupapi: Added CM_Get_Version().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id af533d1eebd382d7ee72eaaef1cf7461356da9e5 by Nikolay Sivov <nsivov@codeweavers.com>
2024-10-24 14:53:47 +02:00
winesync
7ad5790cb5
[WINESYNC] setupapi: Add stub for setupapi.dll.CM_Get_DevNode_Status.
Signed-off-by: Rob Walker <bob.mt.wya@gmail.com>
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 10058e7c4efb472a372b09705c16d312d62d6b0c by Rob Walker <bob.mt.wya@gmail.com>
2024-10-24 14:53:46 +02:00
winesync
497eba88d1
[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-10-24 14:53:45 +02:00
winesync
1b31fefa5b
[WINESYNC] setupapi: Add SetupDiSetDeviceInstallParamsW stub.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id f820c0942854c14fcd063c83225af03e73286334 by Austin English <austinenglish@gmail.com>
2024-10-24 14:53:44 +02:00
winesync
5912f30fe4
[WINESYNC] setupapi: Add SetupDiSelectBestCompatDrv stubs.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 9ad0bc63725bc32176b5bb75b58c7341c7bdebcb by Austin English <austinenglish@gmail.com>
2024-10-24 14:53:44 +02:00
winesync
c0f5a09155
[WINESYNC] setupapi: SetupDiCreateDeviceInfoListEx returns INVALID_HANDLE_VALUE on error.
wine commit id ab92627e19f10d7ad23abb101b21ec7bd122628c by Dmitry Timoshkov <dmitry@baikal.ru>
2024-10-24 14:53:43 +02:00
winesync
0383a63fe4
[WINESYNC] setupapi: SetupDiGetClassDevsEx returns INVALID_HANDLE_VALUE on error.
wine commit id afa912b4f2bd31b2ba58a607f310ab3b761b58e9 by Dmitry Timoshkov <dmitry@baikal.ru>
2024-10-24 14:53:42 +02:00
winesync
7307b879d8
[WINESYNC] setupapi: Avoid shadowing devInst variable.
wine commit id 14650b939cf4ccae964337a3e0ff07945fb4f84f by Dmitry Timoshkov <dmitry@baikal.ru>
2024-10-24 14:53:41 +02:00
winesync
2142736d50
**** Investigate this more, but I don't think we need this commit in ROS
[WINESYNC] setupapi: Restore close brace before using guid string as reg key.

wine commit id a3487ad3169f5d323ffec2ded6754c3357640161 by Aric Stewart <aric@codeweavers.com>
2024-10-24 14:53:40 +02:00
winesync
87208b0f26
[WINESYNC] setupapi: Implement SetupLogErrorA(), SetupLogErrorW().
wine commit id a851aaa4248b9f38c0c6e3b1c04e54f95de163b3 by Pierre Schweitzer <pierre@reactos.org>
2024-10-24 14:53:39 +02:00
winesync
08d9508f13
[WINESYNC] setupapi: Implement SetupOpenLog(), SetupCloseLog().
wine commit id 799dfa6ada18ee9bf748d5c55e1a4118396b05ba by Pierre Schweitzer <pierre@reactos.org>
2024-10-24 14:53:38 +02:00
winesync
6520795699
[WINESYNC] setupapi: Add stubs for CM_Get_Device_Interface_List_SizeA/W.
wine commit id f272c126072dc96da2c1fce1118b09e9126c3013 by André Hentschel <nerv@dawncrow.de>
2024-10-24 14:53:38 +02:00
winesync
90bacd3e90
[WINESYNC] setupapi: Add a stub for SetupDiSetClassInstallParamsW.
wine commit id 3013b6c6da9f02fa7afc3b49a036d063d4c4837a by Austin English <austinenglish@gmail.com>
2024-10-24 14:53:37 +02:00
winesync
d5ec851016
[WINESYNC] setupapi: Add CM_Get_DevNode_Registry_Property wrapper around CM_Get_DevNode_Registry_Property_Ex.
wine commit id cfb81f2c606c17ff005fce87a2e79e1d27b8224a by Mark Harmstone <hellas@burntcomma.com>
2024-10-24 14:53:36 +02:00
winesync
adf9ac9cae
[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-10-24 14:53:35 +02:00
winesync
7aad3cb7fc
[WINESYNC] setupapi: Make sure DeviceInterfaceData->cbSize is initialized in SetupDiEnumDeviceInterfaces.
wine commit id 8d854a4830776aaacb70161709db315d54eb77f0 by Austin English <austinenglish@gmail.com>
2024-10-24 14:53:34 +02:00
winesync
1840084e75
[WINESYNC] setupapi: Use BOOL type where appropriate.
wine commit id 9c76ccfda124ca471b3de4d8a04aed1e15a6b9f2 by Frédéric Delanoy <frederic.delanoy@gmail.com>
2024-10-24 14:53:33 +02:00
winesync
da2842bd79
[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-10-24 14:53:32 +02:00
winesync
244774bbd4
[WINESYNC] setupapi: Constify a character string.
wine commit id 7102459c60be38e9aaf7501d0eca4134f48420d3 by Frédéric Delanoy <frederic.delanoy@gmail.com>
2024-10-24 14:53:32 +02:00
winesync
3dfdd263b0
[WINESYNC] setupapi: Support signature $Windows NT$ in SetupDiGetINFClassA/W too.
wine commit id 6aace3014d355d355e802299d62a34e8865951ba by Stefan Leichter <Stefan.Leichter@camline.com>
2024-10-24 14:53:31 +02:00
winesync
fb30edf4cb
[WINESYNC] setupapi: Use BOOL type where appropriate.
wine commit id cef6b07372bb29cb491721f64d2c1017f960b45b by Frédéric Delanoy <frederic.delanoy@gmail.com>
2024-10-24 14:53:30 +02:00
winesync
db042ace3f
[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-10-24 14:53:29 +02:00
winesync
03625ba405
[WINESYNC] setupapi: Add a stub for SetupDiSetDeviceInstallParamsA.
wine commit id a829c2b3ad5ac82ad658a22722f169a7d19dea75 by Stefan Leichter <Stefan.Leichter@camline.com>
2024-10-24 14:53:28 +02:00
winesync
cfd27f5e10
[WINESYNC] setupapi: Add stub keyword to some FIXMEs.
wine commit id f8c77fbd628a62221f985755baf7de675d4f31f0 by André Hentschel <nerv@dawncrow.de>
2024-10-24 14:53:27 +02:00
winesync
1ad18d52e6
[WINESYNC] setupapi: Add stubs for CM_Reenumerate_DevNode and CM_Reenumerate_DevNode_Ex.
wine commit id f79fa294c9f7c15286e575c6a38aa2827ff06d1e by André Hentschel <nerv@dawncrow.de>
2024-10-24 14:53:26 +02:00
winesync
580a7ee187
[WINESYNC] setupapi: Add CM_Get_Device_ID_ExA stub.
wine commit id 32fb489f1c603b112e62e0e103ae23d390b9cc1a by André Hentschel <nerv@dawncrow.de>
2024-10-24 14:53:25 +02:00
winesync
f835b381db
[WINESYNC] setupapi: Add stub for SetupAddToSourceListW.
wine commit id 8a0442124462ac37273b94b22c35b6ccb8dc6145 by Sylvain Petreolle <spetreolle@yahoo.fr>
2024-10-24 14:53:25 +02:00
winesync
1d8d3ed7bb
[WINESYNC] setupapi: Fix total size when appending multi-string values.
wine commit id 4b7085fdd499ca39a7e0ae47bd27323876103df0 by Alexandre Julliard <julliard@winehq.org>
2024-10-24 14:53:24 +02:00
winesync
9ee6b27fda
****** FIXME: This commit also touches SetupGetInfFileListW
[WINESYNC] setupapi: Avoid memory leaks (coverity).

wine commit id 4d796458d0ed517d45adc57a1aedaf1c3bdde232 by André Hentschel <nerv@dawncrow.de>
2024-10-24 14:53:23 +02:00
winesync
c167b3dafc
[WINESYNC] setupapi: Add a stub for SetupDiGetDeviceInstallParamsW.
wine commit id 7b32809890a148346648d7dd06084ada83479850 by André Hentschel <nerv@dawncrow.de>
2024-10-24 14:53:22 +02:00