ntdll: Mark LDR data as initialized.

Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Müller 2017-04-23 23:17:00 +02:00 committed by Alexandre Julliard
parent 16d21d94c1
commit a345265614
2 changed files with 6 additions and 2 deletions

View File

@ -2991,10 +2991,13 @@ static void test_ResolveDelayLoadedAPI(void)
static void test_InMemoryOrderModuleList(void)
{
LIST_ENTRY *entry1, *mark1 = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
LIST_ENTRY *entry2, *mark2 = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
PEB_LDR_DATA *ldr = NtCurrentTeb()->Peb->LdrData;
LIST_ENTRY *entry1, *mark1 = &ldr->InLoadOrderModuleList;
LIST_ENTRY *entry2, *mark2 = &ldr->InMemoryOrderModuleList;
LDR_MODULE *module1, *module2;
ok(ldr->Initialized == TRUE, "expected TRUE, got %u\n", ldr->Initialized);
for (entry1 = mark1->Flink, entry2 = mark2->Flink;
entry1 != mark1 && entry2 != mark2;
entry1 = entry1->Flink, entry2 = entry2->Flink)

View File

@ -259,6 +259,7 @@ HANDLE thread_init(void)
params.CurrentDirectory.DosPath.MaximumLength = sizeof(current_dir);
params.wShowWindow = 1; /* SW_SHOWNORMAL */
ldr.Length = sizeof(ldr);
ldr.Initialized = TRUE;
RtlInitializeBitMap( &tls_bitmap, peb->TlsBitmapBits, sizeof(peb->TlsBitmapBits) * 8 );
RtlInitializeBitMap( &tls_expansion_bitmap, peb->TlsExpansionBitmapBits,
sizeof(peb->TlsExpansionBitmapBits) * 8 );