kernel32: Move dll load path initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2607bfa28f
commit
fd3735cf4d
|
@ -1028,7 +1028,6 @@ void * CDECL __wine_kernel_init(void)
|
|||
RTL_USER_PROCESS_PARAMETERS *params = peb->ProcessParameters;
|
||||
HANDLE boot_events[2];
|
||||
BOOL got_environment = TRUE;
|
||||
WCHAR *load_path, *dummy;
|
||||
|
||||
/* Initialize everything */
|
||||
|
||||
|
@ -1058,9 +1057,6 @@ void * CDECL __wine_kernel_init(void)
|
|||
TRACE( "starting process name=%s argv[0]=%s\n",
|
||||
debugstr_w(main_exe_name), debugstr_w(__wine_main_wargv[0]) );
|
||||
|
||||
LdrGetDllPath( main_exe_name, 0, &load_path, &dummy );
|
||||
RtlInitUnicodeString( &NtCurrentTeb()->Peb->ProcessParameters->DllPath, load_path );
|
||||
|
||||
if (boot_events[0])
|
||||
{
|
||||
DWORD timeout = 2 * 60 * 1000, count = 1;
|
||||
|
|
|
@ -1140,7 +1140,7 @@ static inline void get_unicode_string( UNICODE_STRING *str, WCHAR **src, UINT le
|
|||
*/
|
||||
void init_user_process_params( SIZE_T data_size )
|
||||
{
|
||||
WCHAR *src;
|
||||
WCHAR *src, *load_path, *dummy;
|
||||
SIZE_T info_size, env_size;
|
||||
NTSTATUS status;
|
||||
startup_info_t *info = NULL;
|
||||
|
@ -1160,6 +1160,9 @@ void init_user_process_params( SIZE_T data_size )
|
|||
get_image_path( __wine_main_argv[0], ¶ms->ImagePathName );
|
||||
set_library_wargv( __wine_main_argv, ¶ms->ImagePathName );
|
||||
build_command_line( __wine_main_wargv, ¶ms->CommandLine );
|
||||
LdrGetDllPath( params->ImagePathName.Buffer, 0, &load_path, &dummy );
|
||||
RtlCreateUnicodeString( ¶ms->DllPath, load_path );
|
||||
RtlReleasePath( load_path );
|
||||
|
||||
if (isatty(0) || isatty(1) || isatty(2))
|
||||
params->ConsoleHandle = (HANDLE)2; /* see kernel32/kernel_private.h */
|
||||
|
|
Loading…
Reference in New Issue