Commit graph

800 commits

Author SHA1 Message Date
Alexandre Julliard
ccd9640493 kernelbase: Use RtlGetNativeSystemInformation() to implement GetNativeSystemInfo(). 2023-03-22 20:03:51 +01:00
Alexandre Julliard
687068e7d6 include: Declare some missing ntdll functions, and fix the sorting. 2023-03-22 20:03:51 +01:00
Sven Baars
88fa3459b9 kernelbase: Also call NtOpenKeyEx() on empty key names.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54691
2023-03-17 14:12:33 +01:00
Sven Baars
b5a0759b15 kernelbase: Restructure the create_key() loop. 2023-03-15 16:12:31 +01:00
Sven Baars
6b7adb3d5d kernelbase: Add a fast path to create_key(). 2023-03-15 16:12:31 +01:00
Sven Baars
5d7bbb56c1 kernelbase: Move create_key() below open_key(). 2023-03-15 16:12:31 +01:00
Sven Baars
0badf072e0 kernelbase: Factor opening a subkey out of open_key(). 2023-03-15 16:12:31 +01:00
Sven Baars
31ee0b309b kernelbase: Always try to open the Wow6432Node in open_key(). 2023-03-15 16:12:31 +01:00
Sven Baars
0da843f082 kernelbase: Restructure the open_key() loop. 2023-03-15 16:12:31 +01:00
Sven Baars
e146c33351 kernelbase: Pass the key name to create_key(). 2023-03-15 16:12:31 +01:00
Sven Baars
076fb381a9 kernelbase: Pass the root key to create_key(). 2023-03-15 16:12:31 +01:00
Sven Baars
75aa00a557 kernelbase: Pass the key name to open_key(). 2023-03-15 16:12:31 +01:00
Sven Baars
a31d0e6c62 kernelbase: Pass the root key to open_key(). 2023-03-15 16:12:30 +01:00
Brendan Shanks
d7d94ed0df kernelbase: Implement DiscardVirtualMemory(). 2023-03-08 17:49:00 +01:00
Torge Matthies
2db94ca8f9 kernelbase: Fix WaitForThreadpoolIoCallbacks spec entry.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
2023-02-27 10:53:15 +01:00
Torge Matthies
4d0d7e49b9 kernelbase: Reuse the previous iteration's pos and sortkey state if possible in find_substring.
We don't have to reset pos and the sortkey state for every iteration of
the for-loop. In most cases the previous iteration's values are still
valid, and can be re-used, skipping a lot of duplicate work.

Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
2023-02-23 21:43:59 +01:00
Torge Matthies
01146582cc kernelbase: Break out of inner for-loop early in find_substring.
If I'm interpreting this code correctly, once either of these two
if-conditions are true once, they will also be true at some point
during all of the remaining iterations of the for-loop. Thus, we can
just stop the for-loop here.

Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
2023-02-23 21:43:06 +01:00
Alexandre Julliard
89bb2622d2 kernelbase: Set ERROR_ALREADY_EXISTS for existing pipe in CreateNamedPipeW().
Reported by Dávid Török.
2023-02-21 11:18:13 +01:00
Alexandre Julliard
d74b084e45 ntdll: Pass the NtCreateNamedPipeFile disposition to the server. 2023-02-21 10:48:16 +01:00
Eric Pouech
df5f6f66de kernelbase: Re-implement EnumProcessModules on top of EnumProcessModulesEx.
Note: this patch changes the results of EnumProcessModules for a wow64
target process called from a 64bit process.

It now returns:
- main module and all loaded 64bit modules (Wine multi-arch wow64 and
  Windows)
- main module only (Wine "old" wow64).
It used to return all the 32bit modules.
You now must use EnumProcessModulesEx(..., LIST_MODULES_32BIT) to get
that result.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-02-15 21:48:33 +01:00
Alex Henrie
9cbbcb409c kernelbase: Avoid calling RtlInitUnicodeString on a static constant. 2023-02-15 19:55:12 +01:00
Eric Pouech
115fbf632a kernelbase: Let GetModuleInformation succeed on 64bit modules in wow64.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-02-13 17:09:32 +01:00
Eric Pouech
c66e876037 kernelbase: Let GetModuleFileNameEx succeed on 64bit modules in wow64.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-02-13 17:09:31 +01:00
Eric Pouech
07efff4e9f kernelbase: Let GetModuleBaseName succeed on 64bit modules in wow64.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-02-13 17:09:31 +01:00
Eric Pouech
c56971ffbd kernelbase: Implement EnumProcessModulesEx.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-02-13 17:09:31 +01:00
Gabriel Ivăncescu
8d02e4e2e9 kernelbase: Fix grouping repeat for number formatting.
Fixes a regression introduced by 56099a3124.

LOCALE_SGROUPING's string and the `Grouping` field in NUMBERFMTW are
confusingly different. The former, which is what is fixed here, treats a '0'
as a repeat of the previous grouping. But a 0 at the end of the `Grouping`
field prevents it from repeating (it repeats by default otherwise) so
it's the opposite. Note that without a '0' in the LOCALE_SGROUPING string,
it shouldn't even repeat in the first place.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-02-07 17:58:52 +01:00
Mohamad Al-Jaf
e1f45229db kernelbase: Partially implement QueryUnbiasedInterruptTimePrecise.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54338
2023-02-07 17:46:44 +01:00
Brendan Shanks
99fc289b90 kernelbase: Partially implement QueryInterruptTimePrecise.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54338
2023-02-07 17:46:43 +01:00
Brendan Shanks
474e8e0dd2 kernelbase: Implement QueryInterruptTime. 2023-02-07 17:46:43 +01:00
Alexandre Julliard
a6451971a2 kernelbase: Report correct errors in GetModuleHandleExA(). 2023-02-02 19:09:23 +01:00
Brendan Shanks
edc479eea9 kernelbase: Implement and add tests for QueryProcessCycleTime. 2023-02-02 10:56:43 +01:00
Alexandre Julliard
448e68ab5b kernelbase: Fix FindNLSStringEx for strings with no primary weights.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53583
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53837
2023-01-09 16:44:08 +01:00
Alexandre Julliard
46e5dd3967 kernelbase/tests: Fix an uninitialized variable warning. 2022-12-08 18:12:18 +01:00
Alexandre Julliard
48aec00477 include: Use proper dllimports for shlwapi functions. 2022-12-07 13:51:37 +01:00
Alexandre Julliard
d92b59717d include: Use proper dllimports for user32 functions. 2022-12-07 13:51:37 +01:00
Alexandre Julliard
fcf5e8c45b include: Use proper dllimports for advapi32 functions. 2022-12-07 13:51:37 +01:00
Alexandre Julliard
a90df92a3c kernelbase: Update timezone data to version 2022g. 2022-12-06 17:04:50 +01:00
Rémi Bernon
4979ae5a94 kernelbase: Restore HEAP_REALLOC_IN_PLACE_ONLY usage in LocalReAlloc.
This effectively reverts 2be9b0ff4a, which
incorrectly removed the flag, when the reallocation failures the tests
showed were coming from an underlying LFH in-place reallocation failure.

Thus, it restores todo_wine where appropriate while removing other todos
for sizes outside of the LFH block size range.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53996
2022-11-30 20:38:27 +01:00
Nikolay Sivov
b544bf188c kernelbase: Forward GetThreadIdealProcessorEx() to ntdll.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-22 18:41:02 +01:00
Nikolay Sivov
cf6705a8ca kernelbase: Forward thread priority boost functions to ntdll.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-22 18:40:13 +01:00
Nikolay Sivov
421b3867e0 kernelbase: Forward SetThreadIdealProcessor() to ntdll.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-22 18:40:13 +01:00
Rémi Bernon
03ad947420 kernelbase: Only discard HLOCAL with LMEM_MOVEABLE and if not locked.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53474
2022-11-22 18:27:31 +01:00
Rémi Bernon
f43fc5121b kernelbase: Avoid moving locked HLOCAL pointer without LMEM_MOVEABLE.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53474
2022-11-22 18:27:31 +01:00
Rémi Bernon
c2c6536926 kernelbase: Handle LMEM_DISCARDABLE flag specifically in LocalReAlloc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53474
2022-11-22 18:27:31 +01:00
Rémi Bernon
86d09091e6 kernelbase: Handle LMEM_MODIFY flag first in LocalReAlloc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53474
2022-11-22 18:27:31 +01:00
Rémi Bernon
2be9b0ff4a kernelbase: Don't try in-place HeapReAlloc in LocalReAlloc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53474
2022-11-22 18:27:31 +01:00
Santino Mazza
d5385c7177 kernelbase: Implement GetGeoInfoEx. 2022-11-22 18:27:30 +01:00
Santino Mazza
f51c752c43 kernelbase: Create GetGeoInfoEx stub. 2022-11-22 18:27:30 +01:00
Nikolay Sivov
ce91ef6426 kernelbase: Add SetProcessInformation().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53954
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-21 13:09:41 +01:00
Rémi Bernon
e0ea231892 kernelbase: Validate pointers before calling heap functions. 2022-11-15 18:05:07 +01:00