Commit Graph

378 Commits

Author SHA1 Message Date
Alexandre Julliard f64e34b014 ntdll: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:19 +02:00
Nikolay Sivov 064c7bdbb4 ntdll: Fix trace pointer returned from RtlGetUnloadEventTraceEx().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 11:41:05 +02:00
Alexandre Julliard e003b9884e ntdll: Use wcslen() instead of strlenW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard 4b5cd5e66d ntdll: Use wcstoul() instead of strtoulW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard 285c5490a4 ntdll: Use wcsrchr() instead of strrchrW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard 6de0ab276b ntdll: Use wcschr() instead of strchrW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard 80005ee016 ntdll: Use wcscat() instead of strcatW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard 18411a19b4 ntdll: Use wcscpy() instead of strcpyW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard 6fc9088789 ntdll: Avoid using memrchrW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 23:10:06 +02:00
Alexandre Julliard 7a974814cd ntdll: Avoid using tolowerW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 23:10:06 +02:00
Alexandre Julliard 0d3ba59e13 ntdll: Use the ascii_to_unicode() helper to compare relay module names.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Alexandre Julliard 2f7cc584ce ntdll: Use RtlCompareUnicodeStrings() instead of strncmpiW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Alexandre Julliard 4d93bafe96 ntdll: Use RtlEqualUnicodeString() instead of strcmpiW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Alexandre Julliard 3e049b6b96 ntdll: Use wcsicmp() instead of strcmpiW() where possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Jacek Caban 1a05b7da63 ntdll: Support device paths in LdrGetDllPath.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48698
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:26:33 +01:00
Kevin Puetz b6e91fa44b ntdll: Allow NULL lpAssemblyDirectoryName in find_actctx_dll.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:32:00 +01:00
Alexandre Julliard c599ec1494 libwine: Make some loader functions obsolete.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:14:54 +01:00
Alexandre Julliard f391ae901e ntdll: Fix loading the main binary as PE file with an explicit dll override.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Alexandre Julliard 30e5f1215e kernel32: Remove __wine_kernel_init().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 18:24:32 +01:00
Alexandre Julliard 7ac7a902c8 ntdll: Implement RtlLocaleNameToLcid().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard 4538a137e0 ntdll: Move locale functions to a new locale.c file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard 83e520f556 kernel32: Move exec process functionality to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Alexandre Julliard b0199ea2fe ntdll: Load the main binary directly in ntdll when possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 19:24:19 +01:00
Alexandre Julliard 608d086f1b ntdll: Move some initializations out of thread_init().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 17:05:56 +01:00
Alexandre Julliard b7db0b52ce ntdll: Initialize earlier things that need the executable name.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 16:54:31 +01:00
Alexandre Julliard 3dadd980bf ntdll: Directly allocate the final process parameters structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 13:25:03 +01:00
Brendan Shanks aa51aee1a9 ntdll: Enable WoW64 filesystem redirection when loading libraries.
This matches the behavior seen on Windows 7/2008R2 and newer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47912
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 21:11:48 +01:00
Alexandre Julliard 075741b681 kernel32: Move image path name initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Vijay Kiran Kamuju 1aff1e6a37 ntdll: Fix the SYSTEM_MODULE struct field names.
Based on https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/rtl/ldrreloc/process_module_information.htm?ts=0,44

Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 19:56:26 +02:00
Alexandre Julliard a5d45e9ae5 kernel32: Move exe path functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:06 +02:00
Alexandre Julliard 619bd16e7a kernel32: Move dll path functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:56:14 +02:00
Alexandre Julliard a0a2b25a44 kernel32: Move Get/SetDllDirectory() implementation to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard 5f938bb51b ntdll: Implement RtlGetSearchPath().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard 444933ae04 ntdll: Implement RtlSetSearchPathMode().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 09:43:27 +02:00
Sebastian Lackner b45d612549 ntdll: Execute queued APCs before starting a process.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35561
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Rémi Bernon 1aa963efd7 ntdll: Add alloc_type parameter to virtual_map_section and top_down to map_image.
NtMapViewOfSection also accepts the MEM_TOP_DOWN parameter that can
be used in combination with zero_bits to map memory on the highest
possible address.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:11:02 +02:00
Alexandre Julliard 9b6d2d3310 ntdll: Silence FIXME for LdrResolveDelayLoadedAPI().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:25 +02:00
Fabian Maurer 6525a16673 ntdll: Check the activation context before looking for the module basename.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:50:53 +02:00
Alexandre Julliard 91bbc46c99 ntdll: Try to use the name of the PE file also when loading .so builtin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:50:53 +02:00
Alexandre Julliard a226e2b7a9 ntdll: Use .so builtin if found instead of falling back to the installed PE file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 11:47:34 +02:00
Zebediah Figura 90c3b78bec ntdll: Implement RtlCreateUserStack() and RtlFreeUserStack().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:50:10 +02:00
Alexandre Julliard c36b3d3e4a ntdll: Don't use native subsystem heuristic against builtin modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:15:31 +02:00
Alexandre Julliard 9019c12fac ntdll: Load the file we got when we can't locate the corresponding builtin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 21:40:55 +02:00
Alexandre Julliard 370abd32d1 ntdll: Add a helper function to load a dll from a .so file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 21:40:55 +02:00
Alexandre Julliard 295f10aa80 ntdll: Add a helper function to find a module from its dlopen handle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 17:26:35 +02:00
Alexandre Julliard d96fd000d3 ntdll: Fix off-by-one allocation error.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47311
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 10:28:29 +02:00
Alexandre Julliard 1943fb29bf ntdll: Don't pass DLL_WINE_PREATTACH to the TLS callbacks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 11:25:44 +02:00
Alexandre Julliard b8743f1f0b ntdll: Set LDR_WINE_INTERNAL flag also for PE builtins.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-20 10:15:17 +02:00
Alexandre Julliard 6c41cc6152 winebuild: Support relay debugging for PE builtin dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 22:55:50 +02:00
Martin Storsjo 044461e8a6 ntdll: Avoid truncating a nonzero exit code to zero in unix.
On Windows, the exit codes can use the full 32 bit range, while
on unix, they are truncated to the lowest 8 bits. If the intended
exit code is nonzero, to indicate failure, but the lower 8 bits
are zero (like when winedbg tries to exit with EXCEPTION_WINE_STUB,
80000100), the observed exit code used to be zero, indicating
successful execution.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 22:04:39 +02:00