mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 01:13:38 +00:00
- Move Teb's StaticUnicodeString initialisation from ntdll to MmCreateTeb (it's better to initialize it early, and all at once, instead of something here now and something there later).
svn path=/trunk/; revision=29551
This commit is contained in:
parent
eb279e4344
commit
72595c9315
|
@ -377,11 +377,6 @@ LdrpInit(PCONTEXT Context,
|
|||
/* Load execution options */
|
||||
LoadImageFileExecutionOptions(Peb);
|
||||
|
||||
/* Initialize the static teb string */
|
||||
NtCurrentTeb()->StaticUnicodeString.Length = 0;
|
||||
NtCurrentTeb()->StaticUnicodeString.MaximumLength = sizeof(NtCurrentTeb()->StaticUnicodeBuffer);
|
||||
NtCurrentTeb()->StaticUnicodeString.Buffer = NtCurrentTeb()->StaticUnicodeBuffer;
|
||||
|
||||
/* build full ntdll path */
|
||||
wcscpy (FullNtDllPath, SharedUserData->NtSystemRoot);
|
||||
wcscat (FullNtDllPath, L"\\system32\\ntdll.dll");
|
||||
|
|
|
@ -465,6 +465,11 @@ MmCreateTeb(PEPROCESS Process,
|
|||
Teb->DeallocationStack = InitialTeb->AllocatedStackBase;
|
||||
}
|
||||
|
||||
/* Initialize the static unicode string */
|
||||
Teb->StaticUnicodeString.Length = 0;
|
||||
Teb->StaticUnicodeString.MaximumLength = sizeof(Teb->StaticUnicodeBuffer);
|
||||
Teb->StaticUnicodeString.Buffer = Teb->StaticUnicodeBuffer;
|
||||
|
||||
/* Return TEB Address */
|
||||
DPRINT("Allocated: %x\n", Teb);
|
||||
if (Attached) KeDetachProcess();
|
||||
|
|
Loading…
Reference in a new issue