mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 04:37:15 +00:00
[kernel32]
- Fix broken code inside SXS_SUPPORT_ENABLED define and add some DPRINTs. Still unused. svn path=/trunk/; revision=44341
This commit is contained in:
parent
4a32024814
commit
db4cbee9dc
1 changed files with 43 additions and 29 deletions
|
@ -160,23 +160,29 @@ CreateRemoteThread(HANDLE hProcess,
|
||||||
|
|
||||||
#ifdef SXS_SUPPORT_ENABLED
|
#ifdef SXS_SUPPORT_ENABLED
|
||||||
/* Are we in the same process? */
|
/* Are we in the same process? */
|
||||||
if (Process = NtCurrentProcess())
|
if (hProcess == NtCurrentProcess())
|
||||||
{
|
{
|
||||||
PTEB Teb;
|
PTEB Teb;
|
||||||
PVOID ActivationContextStack;
|
PVOID ActivationContextStack;
|
||||||
PTHREAD_BASIC_INFORMATION ThreadBasicInfo;
|
THREAD_BASIC_INFORMATION ThreadBasicInfo;
|
||||||
PACTIVATION_CONTEXT_BASIC_INFORMATION ActivationCtxInfo;
|
ACTIVATION_CONTEXT_BASIC_INFORMATION ActivationCtxInfo;
|
||||||
ULONG_PTR Cookie;
|
ULONG_PTR Cookie;
|
||||||
|
ULONG retLen;
|
||||||
|
|
||||||
/* Get the TEB */
|
/* Get the TEB */
|
||||||
Status = NtQueryInformationThread(hThread,
|
Status = NtQueryInformationThread(hThread,
|
||||||
ThreadBasicIformation,
|
ThreadBasicInformation,
|
||||||
&ThreadBasicInfo,
|
&ThreadBasicInfo,
|
||||||
sizeof(ThreadBasicInfo),
|
sizeof(ThreadBasicInfo),
|
||||||
NULL);
|
&retLen);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
/* Allocate the Activation Context Stack */
|
/* Allocate the Activation Context Stack */
|
||||||
Status = RtlAllocateActivationContextStack(&ActivationContextStack);
|
Status = RtlAllocateActivationContextStack(&ActivationContextStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
Teb = ThreadBasicInfo.TebBaseAddress;
|
Teb = ThreadBasicInfo.TebBaseAddress;
|
||||||
|
|
||||||
/* Save it */
|
/* Save it */
|
||||||
|
@ -189,18 +195,26 @@ CreateRemoteThread(HANDLE hProcess,
|
||||||
ActivationContextBasicInformation,
|
ActivationContextBasicInformation,
|
||||||
&ActivationCtxInfo,
|
&ActivationCtxInfo,
|
||||||
sizeof(ActivationCtxInfo),
|
sizeof(ActivationCtxInfo),
|
||||||
NULL);
|
&retLen);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
/* Does it need to be activated? */
|
/* Does it need to be activated? */
|
||||||
if (!ActivationCtxInfo.hActCtx)
|
if (!ActivationCtxInfo.hActCtx)
|
||||||
{
|
{
|
||||||
/* Activate it */
|
/* Activate it */
|
||||||
Status = RtlActivateActivationContextEx(1,
|
Status = RtlActivateActivationContext(1,
|
||||||
Teb,
|
|
||||||
ActivationCtxInfo.hActCtx,
|
ActivationCtxInfo.hActCtx,
|
||||||
&Cookie);
|
&Cookie);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
DPRINT1("RtlActivateActivationContext failed %x\n", Status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
DPRINT1("RtlQueryInformationActivationContext failed %x\n", Status);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
DPRINT1("RtlAllocateActivationContextStack failed %x\n", Status);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* FIXME: Notify CSR */
|
/* FIXME: Notify CSR */
|
||||||
|
|
Loading…
Reference in a new issue