diff --git a/reactos/dll/ntdll/ldr/actctx.c b/reactos/dll/ntdll/ldr/actctx.c index 80e15ae8e91..c859e6bc7ce 100644 --- a/reactos/dll/ntdll/ldr/actctx.c +++ b/reactos/dll/ntdll/ldr/actctx.c @@ -66,8 +66,8 @@ NTSTATUS find_actctx_dll( LPCWSTR libname, WCHAR *fullname ) size = needed; } - DPRINT1("manafestpath === %S\n", info->lpAssemblyManifestPath); - DPRINT1("DirectoryName === %S\n", info->lpAssemblyDirectoryName); + DPRINT("manafestpath === %S\n", info->lpAssemblyManifestPath); + DPRINT("DirectoryName === %S\n", info->lpAssemblyDirectoryName); if (!info->lpAssemblyManifestPath || !info->lpAssemblyDirectoryName) { status = STATUS_SXS_KEY_NOT_FOUND; diff --git a/reactos/dll/ntdll/ldr/utils.c b/reactos/dll/ntdll/ldr/utils.c index 9426eeee82d..f1ce796ea72 100644 --- a/reactos/dll/ntdll/ldr/utils.c +++ b/reactos/dll/ntdll/ldr/utils.c @@ -838,7 +838,7 @@ LdrLoadDll (IN PWSTR SearchPath OPTIONAL, { NTSTATUS Status; PLDR_DATA_TABLE_ENTRY Module; - + ULONG_PTR cookie; PPEB Peb = NtCurrentPeb(); TRACE_LDR("LdrLoadDll, loading %wZ%s%S\n", @@ -851,12 +851,18 @@ LdrLoadDll (IN PWSTR SearchPath OPTIONAL, if (NT_SUCCESS(Status) && (!LoadFlags || 0 == (*LoadFlags & LOAD_LIBRARY_AS_DATAFILE))) { + if (!create_module_activation_context( Module )) + { + RtlActivateActivationContext(0, Module->EntryPointActivationContext, &cookie); + } + if (!(Module->Flags & LDRP_PROCESS_ATTACH_CALLED)) { RtlEnterCriticalSection(Peb->LoaderLock); Status = LdrpAttachProcess(); RtlLeaveCriticalSection(Peb->LoaderLock); } + if (Module->EntryPointActivationContext) RtlDeactivateActivationContext(0, cookie); } if ((!Module) && (NT_SUCCESS(Status))) diff --git a/reactos/dll/win32/kernel32/thread/thread.c b/reactos/dll/win32/kernel32/thread/thread.c index 5f4270e54d5..337934bba8c 100644 --- a/reactos/dll/win32/kernel32/thread/thread.c +++ b/reactos/dll/win32/kernel32/thread/thread.c @@ -17,6 +17,7 @@ /* FIXME: NDK */ #define HIGH_PRIORITY 31 +#define SXS_SUPPORT_FIXME /* FUNCTIONS *****************************************************************/ static @@ -164,8 +165,10 @@ CreateRemoteThread(HANDLE hProcess, PTEB Teb; PVOID ActivationContextStack; THREAD_BASIC_INFORMATION ThreadBasicInfo; +#ifndef SXS_SUPPORT_FIXME ACTIVATION_CONTEXT_BASIC_INFORMATION ActivationCtxInfo; ULONG_PTR Cookie; +#endif ULONG retLen; /* Get the TEB */ @@ -186,7 +189,7 @@ CreateRemoteThread(HANDLE hProcess, /* Save it */ Teb->ActivationContextStackPointer = ActivationContextStack; - +#ifndef SXS_SUPPORT_FIXME /* Query the Context */ Status = RtlQueryInformationActivationContext(1, 0, @@ -210,6 +213,7 @@ CreateRemoteThread(HANDLE hProcess, } else DPRINT1("RtlQueryInformationActivationContext failed %x\n", Status); +#endif } else DPRINT1("RtlAllocateActivationContextStack failed %x\n", Status);