Commit graph

85238 commits

Author SHA1 Message Date
winesync e72847baa8
[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>
2024-02-20 16:39:01 +01:00
winesync f3b19fe099
[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>
2024-02-20 16:39:00 +01:00
winesync e2517f2a6f
[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>
2024-02-20 16:38:59 +01:00
winesync 70a3840a3a
[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>
2024-02-20 16:38:59 +01:00
winesync 3e97c17d9d
[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>
2024-02-20 16:38:58 +01:00
winesync a6b763a45e
[WINESYNC] 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>

wine commit id e26f8464e90462654d846657bf15938f1f287664 by Zebediah Figura <z.figura12@gmail.com>
2024-02-20 16:38:57 +01:00
winesync df3a46577e
[WINESYNC]: revert wine-staging patchset for setupapi 2024-02-20 16:38:56 +01:00
Hermès Bélusca-Maïto 6f524b5113
[WINESYNC] Initial bootstrap for setupapi winetest partial sync.
- Initial sync config file;
- Add reconstructed WineStaging v4.0 setupapi patches that were originally
  applied (and need to be reverted).
2024-02-20 16:38:55 +01:00
winesync 01c7e4b88f
[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>
2024-02-20 16:38:54 +01:00
winesync ab19b30220
[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-02-20 16:38:53 +01:00
Hermès Bélusca-Maïto d98469cf15
[WINESYNC] Initial bootstrap for setupapi parser.c partial sync.
Start syncing at Wine-2.2
2024-02-20 16:38:52 +01:00
Hermès Bélusca-Maïto 50371bc6e7
[SETUPAPI] parser.c: Improve the ReactOS-specific code.
In particular, directly use unicode strings instead of the old ugly
Wine-construction. Indeed they are also slowly phasing it out in their
own code.
2024-02-20 16:38:51 +01:00
winesync 567fcbd651
[WINESYNC]: revert wine-staging patchset for setupapi 2024-02-20 16:38:50 +01:00
Hermès Bélusca-Maïto bf7e7d1e0f
[WINESYNC] Initial bootstrap for setupapi dialog.c partial sync.
Start syncing at wine-1.9.15
2024-02-20 16:38:49 +01:00
Hermès Bélusca-Maïto fa7632116e
[WINESYNC] Initial bootstrap for setupapi partial sync.
Start syncing at wine-1.9.4 for:
- query.c
- setupcab.c
2024-02-20 16:38:48 +01:00
winesync 38b46df6a8
[WINESYNC] setupapi: Remove dead code (Clang).
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 9edfb14c6be13f599aafe5e300986f10e6fb999d by André Hentschel <nerv@dawncrow.de>

NOTE: Already committed in ReactOS in commit cd73072e5 (r72565)
2024-02-20 16:38:47 +01:00
winesync 4df741193b
[WINESYNC] setupapi: Make default context structure layout compatible.
wine commit id dcab5fe61bed87b291901ceff686894a64871d98 by Nikolay Sivov <nsivov@codeweavers.com>
2024-02-20 16:38:46 +01:00
Hermès Bélusca-Maïto e32aaa6ac0
[SETUPAPI] Guard in __WINESRC__ original Wine code that has been improved in ReactOS.
See commit 1cda0af51 (r27896) for more details.
2024-02-20 16:38:45 +01:00
Hermès Bélusca-Maïto 1ae2375f90
******** Now compile wine's stringtable.c for testing purposes 2024-02-20 16:38:44 +01:00
Hermès Bélusca-Maïto 5f2aad632c
[WINESYNC] setupapi: Implement a binary compatible string table.
wine commit id 8802f84c8cc473d5617c134c16973b1cb2c4b53e by Nikolay Sivov <nsivov@codeweavers.com>
2024-02-20 16:38:43 +01:00
Hermès Bélusca-Maïto 82d828b6d2
[SETUPAPI][WINESYNC] Continue Wine-syncing stringtable.c to a separate file.
Past Wine 1.7.18, the string table internal structure changed to one
claimed to be "binary compatible" (with Windows' one), see wine commit
8802f84c8cc473d5617c134c16973b1cb2c4b53e , with a "weak" justification
that may be found in
https://bugs.winehq.org/show_bug.cgi?id=26016
and
https://bugs.winehq.org/show_bug.cgi?id=32554

Until we hit actual problems with our stringtable implementation, keep
it in its original file, while this new Wine implementation goes into
a separate file, that could be tested manually by changing which one is
compiled in the CMakeLists.txt file.
2024-02-20 16:38:42 +01:00
Hermès Bélusca-Maïto 6ba11f67c3
[SETUPAPI] stringtable.c: Code simplification and bugfix.
- Reimplement StringTableInitialize around StringTableInitializeEx
- Fix buffer over-read in StringTableGetExtraData in case the user-specified
  dwExtraDataSize is larger than the dwSize of the pStringTable pData buffer.
2024-02-20 16:38:41 +01:00
winesync 9c2186e6d9
[WINESYNC]: setupapi/stringtable.c is now in sync with wine-staging wine-1.7.18 2024-02-20 16:38:40 +01:00
winesync 1242c0bb46
[WINESYNC] setupapi: Avoid memory leaks (coverity).
wine commit id 4d796458d0ed517d45adc57a1aedaf1c3bdde232 by André Hentschel <nerv@dawncrow.de>
2024-02-20 16:38:39 +01:00
winesync 3a01cdb3cd
[WINESYNC] setupapi: Avoid hardcoding the Unicode string literal lengths.
wine commit id 9097fa132e56cc542fa3ea77706fea79353d2f4a by Francois Gouget <fgouget@free.fr>
2024-02-20 16:38:38 +01:00
winesync b30218b154
[WINESYNC] setupapi: Destination directory defaults to system directory.
wine commit id 1b8ba2537111f0d691d2592bb4ffb6bc4fe4f20e by Hans Leidekker <hans@codeweavers.com>
2024-02-20 16:38:37 +01:00
winesync dda601fc43
[WINESYNC] setupapi: Fix memory leak.
Found by Valgrind.

wine commit id 63231be8044441218fb82899e748900e1ace3d0d by Huw Davies <huw@codeweavers.com>

NOTE: Some of the code was already present as part of ReactOS-specific
changes. It has been slightly adapted to suit Wine changes.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:38:37 +01:00
winesync 3a9df253a1
[WINESYNC] setupapi: Remove superfluous pointer casts.
wine commit id ffae0123ac46ba6dfac74d7c84422073fd53b580 by Michael Stefaniuc <mstefani@redhat.de>
2024-02-20 16:38:36 +01:00
winesync 6b26c5b37d
[WINESYNC] setupapi: Implement SetupInstallFileExA/W.
wine commit id bd9c265cc26a4cf2c9141a99dadb2f9ccf4b6f8c by Hans Leidekker <hans@codeweavers.com>
2024-02-20 16:38:35 +01:00
winesync 268b193327
[WINESYNC] setupapi: Implement StringTableLookUpStringEx.
wine commit id 18b5366c35f95eb6e7fc6e19c50c371a81d5a980 by Hans Leidekker <hans@codeweavers.com>

[WINESYNC] setupapi: Add some tests for StringTableLookUpStringEx. Make them pass.

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

[WINESYNC] setupapi: Fix the StringTableLookUpStringEx() prototype.

wine commit id 916d6a44500735b3fecf0e7c485c2aa7e8025644 by Francois Gouget <fgouget@free.fr>

These commits have been grouped together, since all of these were
partially already present in the forked stringtable.c code.
2024-02-20 16:38:34 +01:00
winesync 1112a6a701
[WINESYNC] setupapi: Fix typo in StringTableGetExtraData.
wine commit id d8dad22c9783e1868ec4bb72d8051dd0a5f4f0a7 by Hans Leidekker <hans@codeweavers.com>
2024-02-20 16:38:33 +01:00
winesync 5cd932f1e2
[WINESYNC] setupapi: Implement StringTableAddStringEx.
wine commit id c2f99f30143e1180620980f3d5713456392c8ecf by Hans Leidekker <hans@codeweavers.com>

+ Re-integrate existing ReactOS bug fixes
+ Add missing dwExtraDataSize && lpExtraData zero/NULL checks in StringTableAddStringEx

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:38:32 +01:00
winesync 75a69f3b69
[WINESYNC] setupapi: Implement SetupInstallFile{A, W}.
wine commit id 19764fcf4c7c05d5badbef54be64170c2ebadd83 by Hans Leidekker <hans@codeweavers.com>

NOTE: Already committed in ReactOS in commit 336ef53fa (r37876).
The lost memory cleanup on failure will be recovered by wine commit
4d796458d0ed517d45adc57a1aedaf1c3bdde232
2024-02-20 16:38:31 +01:00
winesync 9b52894cb6
[WINESYNC] setupapi: Do not cast NULL.
wine commit id d62b48df2acece81b533a92fbca566cc4023be43 by Michael Stefaniuc <mstefani@redhat.de>
2024-02-20 16:38:30 +01:00
winesync a2ac7886cc
[WINESYNC] setupapi: Remove unneeded address-of operator from array name.
wine commit id ce2184e2f14e6ace87cd50c938b5e99d35ca80c1 by Andrew Talbot <andrew.talbot@talbotville.com>
2024-02-20 16:38:29 +01:00
winesync cf47417e5c
[WINESYNC] setupapi: Move strdupW and strdupWtoA to the setupapi_private.h header.
wine commit id 44ab294e0b6f285f1aab5fc8533a36e852be38fa by Alexandre Julliard <julliard@winehq.org>
2024-02-20 16:38:28 +01:00
Hermès Bélusca-Maïto cfa77bf906
[WINESYNC] Initial bootstrap for setupapi queue.c partial sync.
Start sync at wine-0.9.59

Start sync at wine commit 44ab294e0b6f285f1aab5fc8533a36e852be38fa
"setupapi: Move strdupW and strdupWtoA to the setupapi_private.h header."
by Alexandre Julliard, April 16, 2008
2024-02-20 16:38:27 +01:00
Hermès Bélusca-Maïto 66ba252ba4
[SETUPAPI] Prepare for partial Wine sync.
- Add __REACTOS__ for ReactOS-specific copied files security descriptor support.
- Add missing __REACTOS__ guard + restoring original wine code in CopyFileW call.

- Remove erroneous casts: input parameters are already strings.
  Revert unnecessary changes from commit fc10b038f (r16937).
2024-02-20 16:38:26 +01:00
winesync 4e94c7d340
[WINESYNC] setupapi: setupapi.h must not define HSTRING_TABLE and the StringTable* prototypes.
wine commit id 7ab6d8522b614f6e9d9773fa86151ab05fb05a19 by Francois Gouget <fgouget@free.fr>

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2024-02-20 16:38:25 +01:00
Hermès Bélusca-Maïto 39c4c9d51b
[WINESYNC] Initial bootstrap for setupapi stringtable.c partial sync.
Start syncing at wine-0.9.24
2024-02-20 16:38:24 +01:00
Hermès Bélusca-Maïto 66001626e7
Partially revert commit 30810893ad.
[SETUPAPI]
- Add 'pSetup'-Prefix to the string table functions according to the new naming convention.
- Remove the obsolete function StringTableTrim.
2024-02-20 16:38:23 +01:00
Hermès Bélusca-Maïto ed82ef20e0
[SETUPAPI] Prepare Wine syncing.
- Rename global hInstance to SETUPAPI_hInstance;
- Add ARRAY_SIZE in case it is not defined.

- Use the CRT oldnames library.
  Remove the '-Dwcsnicmp=_wcsnicmp' and use the alias in the oldnames lib.
  This will also fix wcslwr() usage in the next commits.
2024-02-20 16:38:22 +01:00
Hermès Bélusca-Maïto 59e6a591ee
[SETUPAPI][SETUPAPI_WINETEST] Use conforming swprintf 2024-02-20 16:38:21 +01:00
Hermès Bélusca-Maïto 9c98483f92
[SDK:WINE] Improve wine/unicode.h (v)sprintfW defines, regarding the (v)swprintf functions.
These defines assumed that the (v)swprintf functions were the
non-conformant ones (that don't take a 'count' 2nd parameter).
Because of that, use instead the _(v)swprintf functions. However,
those exist only in NT6+. Therefore, redefine these locally
using the _(v)snprintf functions.

NOTE: wine/unicode.h has been removed in wine commit
348eebae872e90a735041a153635d00b01178cfa from July 13, 2022
2024-02-20 16:38:20 +01:00
Hermès Bélusca-Maïto 11175a120d
[SDK:WINE] Some minor additions to wine/test.h
- Add two missing debugstr_w* helpers. These will be needed for
  future winetest syncs.

Note that such change would be unnecessary, would wine/test.h and
wine/debug.h be also updated with latest Wine versions. Indeed,
wine/debug.h is now allowed to be included in wine tests since
wine commit:
```
include: Allow using debug.h in tests.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>

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

- Since our wine/test.h doesn't include wine/debug.h for now, include
  instead stdio.h for the time being, in order to get support for
  s(w)printf() in tests that don't include stdio.h
2024-02-20 16:38:19 +01:00
Hermès Bélusca-Maïto b7ad4a2298
[SETUPLIB][USETUP] Some cleanup for partition code.
- Make the Create*Partition helpers take a size in bytes, not in sectors.

  This allows them to be easier to use by the caller, alleviating the
  need for making the size conversion into sectors. Instead it is done
  internally by the helpers.

- Introduce helper macros to easily retrieve the size of a partition
  entry or a disk in bytes, from their internal representation in number
  of sectors.

- The 'AutoCreate' variable being USETUP-specific, remove it from the
  PARTENTRY structure and use instead a flag set into the 'New' member.

- Rename IsDiskSizeValid to IsPartitionLargeEnough, to better describe
  what the function is for.
2024-02-20 15:52:37 +01:00
Katayama Hirofumi MZ b2ec78673d
[MSCTFIME] Restructuring (#6505)
Improve code flexibility. 3700+
lines of msctfime.cpp was too long.
JIRA issue: CORE-19360
- Split msctfime.cpp code to some
  source files and header files.
2024-02-20 21:11:08 +09:00
Jérôme Gardou 0610bcb3f9 [DBGHELP] Avoid call of wine_get_dos_file_name
CORE-19444
2024-02-20 08:56:53 +01:00
Jérôme Gardou e706083d50 [LIBWINE] Return empty path when given a UNIX path
CORE-19444
2024-02-20 08:56:53 +01:00
Katayama Hirofumi MZ 6bc40d36f8
[CTFMON][MSCTFIME][MSCTF][MSUTB][CICERO] Fix TFUninitLib (#6504)
Supporting the Language bar...
JIRA issue: CORE-19363
- Delete TFInitLib and TFUninitLib
  calls from ctfmon.exe.
- Delete TFUninitLib from Cicero
  library.
- Implement InitDisplayAttrbuteLib
  in msctfime.ime.
- Improve CIC_LIBTHREAD structure.
2024-02-20 14:36:24 +09:00