ULONG Dummy;
PTEB Teb;
THREAD_BASIC_INFORMATION ThreadBasicInfo;
- PVOID ActivationContextStack = NULL;
+ PACTIVATION_CONTEXT_STACK ActivationContextStack = NULL;
ACTIVATION_CONTEXT_BASIC_INFORMATION ActCtxInfo;
ULONG_PTR Cookie;
ULONG ReturnLength;
dwCreationFlags & STACK_SIZE_PARAM_IS_A_RESERVATION ?
dwStackSize : 0,
&InitialTeb);
- if(!NT_SUCCESS(Status))
+ if (!NT_SUCCESS(Status))
{
BaseSetLastNTError(Status);
return NULL;
Teb->ActivationContextStackPointer = ActivationContextStack;
/* Query the Context */
- // WARNING!!! THIS IS USING THE WIN32 FLAG BECAUSE REACTOS CONTINUES TO BE A POS!!! ///
+ // WARNING!!! THIS IS USING THE WIN32 FLAG BECAUSE REACTOS CONTINUES TO BE A POS!!! ///
Status = RtlQueryInformationActivationContext(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
NULL,
0,
ERROR_DBGBREAK("SXS: %s - Failing thread create because "
"RtlQueryInformationActivationContext() failed with status %08lx\n",
__FUNCTION__, Status);
+
+ /* Free the activation context stack */
+ // RtlFreeThreadActivationContextStack();
+ RtlFreeActivationContextStack(Teb->ActivationContextStackPointer);
+
return NULL;
}
ERROR_DBGBREAK("SXS: %s - Failing thread create because "
"RtlActivateActivationContextEx() failed with status %08lx\n",
__FUNCTION__, Status);
+
+ /* Free the activation context stack */
+ // RtlFreeThreadActivationContextStack();
+ RtlFreeActivationContextStack(Teb->ActivationContextStackPointer);
+
return NULL;
}
}
/* Notify CSR */
if (!BaseRunningInServerProcess)
{
- /* Notify CSR */
Status = BasepNotifyCsrOfThread(hThread, &ClientId);
ASSERT(NT_SUCCESS(Status));
}