svn path=/trunk/; revision=68151
while (NextEntry != ListHead)
{
/* Get the entry and NT Headers */
while (NextEntry != ListHead)
{
/* Get the entry and NT Headers */
- LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
+ LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
NtHeader = RtlImageNtHeader(LdrEntry->DllBase);
if (NtHeader)
{
NtHeader = RtlImageNtHeader(LdrEntry->DllBase);
if (NtHeader)
{
while (InitEntry != InitListHead)
{
while (InitEntry != InitListHead)
{
- InitModule = CONTAINING_RECORD(InitEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ InitModule = CONTAINING_RECORD(InitEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
/* Increase the index */
ModulePtr->InitOrderIndex++;
/* Increase the index */
ModulePtr->InitOrderIndex++;
/* Get the entry */
LdrEntry = CONTAINING_RECORD(NextEntry,
LDR_DATA_TABLE_ENTRY,
/* Get the entry */
LdrEntry = CONTAINING_RECORD(NextEntry,
LDR_DATA_TABLE_ENTRY,
- InInitializationOrderModuleList);
+ InInitializationOrderLinks);
NextEntry = NextEntry->Blink;
/* Remove flag */
NextEntry = NextEntry->Blink;
/* Remove flag */
/* Unlink it */
CurrentEntry = LdrEntry;
/* Unlink it */
CurrentEntry = LdrEntry;
- RemoveEntryList(&CurrentEntry->InInitializationOrderModuleList);
- RemoveEntryList(&CurrentEntry->InMemoryOrderModuleList);
+ RemoveEntryList(&CurrentEntry->InInitializationOrderLinks);
+ RemoveEntryList(&CurrentEntry->InMemoryOrderLinks);
RemoveEntryList(&CurrentEntry->HashLinks);
/* If there's more then one active unload */
RemoveEntryList(&CurrentEntry->HashLinks);
/* If there's more then one active unload */
{
/* Flush the cached DLL handle and clear the list */
LdrpLoadedDllHandleCache = NULL;
{
/* Flush the cached DLL handle and clear the list */
LdrpLoadedDllHandleCache = NULL;
- CurrentEntry->InMemoryOrderModuleList.Flink = NULL;
+ CurrentEntry->InMemoryOrderLinks.Flink = NULL;
}
/* Add the entry on the unload list */
}
/* Add the entry on the unload list */
/* Set the entry and clear it from the list */
CurrentEntry = LdrEntry;
LdrpLoadedDllHandleCache = NULL;
/* Set the entry and clear it from the list */
CurrentEntry = LdrEntry;
LdrpLoadedDllHandleCache = NULL;
- CurrentEntry->InMemoryOrderModuleList.Flink = NULL;
+ CurrentEntry->InMemoryOrderLinks.Flink = NULL;
/* Move it from the global to the local list */
RemoveEntryList(&CurrentEntry->HashLinks);
/* Move it from the global to the local list */
RemoveEntryList(&CurrentEntry->HashLinks);
while (NextEntry != ListHead)
{
/* Get the current entry */
while (NextEntry != ListHead)
{
/* Get the current entry */
- LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
+ LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
/* Make sure it's not ourselves */
if (Peb->ImageBaseAddress != LdrEntry->DllBase)
/* Make sure it's not ourselves */
if (Peb->ImageBaseAddress != LdrEntry->DllBase)
while (NextEntry != ListHead)
{
/* Get the Data Entry */
while (NextEntry != ListHead)
{
/* Get the Data Entry */
- LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
/* Check if we have a Root Entry */
if (LdrRootEntry)
/* Check if we have a Root Entry */
if (LdrRootEntry)
while (NextEntry != ListHead)
{
/* Get the Data Entrry */
while (NextEntry != ListHead)
{
/* Get the Data Entrry */
- LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
/* FIXME: Verify NX Compat */
// LdrpCheckNXCompatibility()
/* FIXME: Verify NX Compat */
// LdrpCheckNXCompatibility()
while (NextEntry != ListHead)
{
/* Get the current entry */
while (NextEntry != ListHead)
{
/* Get the current entry */
- LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
NextEntry = NextEntry->Blink;
/* Make sure it's not ourselves */
NextEntry = NextEntry->Blink;
/* Make sure it's not ourselves */
while (NextEntry != ListHead)
{
/* Get the current entry */
while (NextEntry != ListHead)
{
/* Get the current entry */
- LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
NextEntry = NextEntry->Blink;
/* Make sure it's not ourselves */
NextEntry = NextEntry->Blink;
/* Make sure it's not ourselves */
/* Link the Init Order List */
InsertHeadList(&Peb->Ldr->InInitializationOrderModuleList,
/* Link the Init Order List */
InsertHeadList(&Peb->Ldr->InInitializationOrderModuleList,
- &LdrpNtDllDataTableEntry->InInitializationOrderModuleList);
+ &LdrpNtDllDataTableEntry->InInitializationOrderLinks);
/* Initialize Wine's active context implementation for the current process */
actctx_init();
/* Initialize Wine's active context implementation for the current process */
actctx_init();
{
/* Add it to our list */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
{
/* Add it to our list */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
- &DllLdrEntry->InInitializationOrderModuleList);
+ &DllLdrEntry->InInitializationOrderLinks);
}
/* Check if the Bound Entry is now invalid */
}
/* Check if the Bound Entry is now invalid */
{
/* Add it to our list */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
{
/* Add it to our list */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
- &ForwarderLdrEntry->InInitializationOrderModuleList);
+ &ForwarderLdrEntry->InInitializationOrderLinks);
{
/* Add the DLL to our list */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
{
/* Add the DLL to our list */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
- &DllLdrEntry->InInitializationOrderModuleList);
+ &DllLdrEntry->InInitializationOrderLinks);
}
/* Now snap the IAT Entry */
}
/* Now snap the IAT Entry */
{
/* Add it to the in-init-order list in case of failure */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
{
/* Add it to the in-init-order list in case of failure */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
- &(*DataTableEntry)->InInitializationOrderModuleList);
+ &(*DataTableEntry)->InInitializationOrderLinks);
{
/* Remove the DLL from the lists */
RemoveEntryList(&LdrEntry->InLoadOrderLinks);
{
/* Remove the DLL from the lists */
RemoveEntryList(&LdrEntry->InLoadOrderLinks);
- RemoveEntryList(&LdrEntry->InMemoryOrderModuleList);
+ RemoveEntryList(&LdrEntry->InMemoryOrderLinks);
RemoveEntryList(&LdrEntry->HashLinks);
/* Remove the LDR Entry */
RemoveEntryList(&LdrEntry->HashLinks);
/* Remove the LDR Entry */
CandidateEnd = CandidateBase + CandidateEntry->SizeOfImage;
/* Make sure this entry isn't unloading */
CandidateEnd = CandidateBase + CandidateEntry->SizeOfImage;
/* Make sure this entry isn't unloading */
- if (!CandidateEntry->InMemoryOrderModuleList.Flink) continue;
+ if (!CandidateEntry->InMemoryOrderLinks.Flink) continue;
/* Check if our regions are colliding */
if ((ImageBase >= CandidateBase && ImageBase <= CandidateEnd) ||
/* Check if our regions are colliding */
if ((ImageBase >= CandidateBase && ImageBase <= CandidateEnd) ||
{
/* Remove it from the lists */
RemoveEntryList(&LdrEntry->InLoadOrderLinks);
{
/* Remove it from the lists */
RemoveEntryList(&LdrEntry->InLoadOrderLinks);
- RemoveEntryList(&LdrEntry->InMemoryOrderModuleList);
+ RemoveEntryList(&LdrEntry->InMemoryOrderLinks);
RemoveEntryList(&LdrEntry->HashLinks);
/* Unmap it, clear the entry */
RemoveEntryList(&LdrEntry->HashLinks);
/* Unmap it, clear the entry */
/* Insert into other lists */
InsertTailList(&PebData->InLoadOrderModuleList, &LdrEntry->InLoadOrderLinks);
/* Insert into other lists */
InsertTailList(&PebData->InLoadOrderModuleList, &LdrEntry->InLoadOrderLinks);
- InsertTailList(&PebData->InMemoryOrderModuleList, &LdrEntry->InMemoryOrderModuleList);
+ InsertTailList(&PebData->InMemoryOrderModuleList, &LdrEntry->InMemoryOrderLinks);
InLoadOrderLinks);
/* Make sure it's not unloading and check for a match */
InLoadOrderLinks);
/* Make sure it's not unloading and check for a match */
- if ((Current->InMemoryOrderModuleList.Flink) && (Base == Current->DllBase))
+ if ((Current->InMemoryOrderLinks.Flink) && (Base == Current->DllBase))
{
/* Save in cache */
LdrpLoadedDllHandleCache = Current;
{
/* Save in cache */
LdrpLoadedDllHandleCache = Current;
ListEntry = ListEntry->Flink;
/* Check if it's being unloaded */
ListEntry = ListEntry->Flink;
/* Check if it's being unloaded */
- if (!CurEntry->InMemoryOrderModuleList.Flink) continue;
+ if (!CurEntry->InMemoryOrderLinks.Flink) continue;
/* Check if name matches */
if (RtlEqualUnicodeString(&FullDllName,
/* Check if name matches */
if (RtlEqualUnicodeString(&FullDllName,
ListEntry = ListEntry->Flink;
/* Check if it's in the process of being unloaded */
ListEntry = ListEntry->Flink;
/* Check if it's in the process of being unloaded */
- if (!CurEntry->InMemoryOrderModuleList.Flink) continue;
+ if (!CurEntry->InMemoryOrderLinks.Flink) continue;
/* The header is untrusted, use SEH */
_SEH2_TRY
/* The header is untrusted, use SEH */
_SEH2_TRY
Entry = NtCurrentPeb()->Ldr->InInitializationOrderModuleList.Blink;
LdrEntry = CONTAINING_RECORD(Entry,
LDR_DATA_TABLE_ENTRY,
Entry = NtCurrentPeb()->Ldr->InInitializationOrderModuleList.Blink;
LdrEntry = CONTAINING_RECORD(Entry,
LDR_DATA_TABLE_ENTRY,
- InInitializationOrderModuleList);
+ InInitializationOrderLinks);
/* Make sure we didn't process it yet*/
if (!(LdrEntry->Flags & LDRP_ENTRY_PROCESSED))
/* Make sure we didn't process it yet*/
if (!(LdrEntry->Flags & LDRP_ENTRY_PROCESSED))
/* Clear entrypoint, and insert into list */
LdrEntry->EntryPoint = NULL;
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
/* Clear entrypoint, and insert into list */
LdrEntry->EntryPoint = NULL;
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
- &LdrEntry->InInitializationOrderModuleList);
+ &LdrEntry->InInitializationOrderLinks);
/* Cancel the load */
LdrpClearLoadInProgress();
/* Cancel the load */
LdrpClearLoadInProgress();
/* Insert it into the list */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
/* Insert it into the list */
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
- &LdrEntry->InInitializationOrderModuleList);
+ &LdrEntry->InInitializationOrderLinks);
/* If we have to run the entrypoint, make sure the DB is ready */
if (CallInit && LdrpLdrDatabaseIsSetup)
/* If we have to run the entrypoint, make sure the DB is ready */
if (CallInit && LdrpLdrDatabaseIsSetup)
/* Get the loader entry */
LdrEntry = CONTAINING_RECORD(Entry,
LDR_DATA_TABLE_ENTRY,
/* Get the loader entry */
LdrEntry = CONTAINING_RECORD(Entry,
LDR_DATA_TABLE_ENTRY,
- InInitializationOrderModuleList);
+ InInitializationOrderLinks);
/* Clear load in progress flag */
LdrEntry->Flags &= ~LDRP_LOAD_IN_PROGRESS;
/* Clear load in progress flag */
LdrEntry->Flags &= ~LDRP_LOAD_IN_PROGRESS;
{
/* Load module data */
if (!ReadProcessMemory(hProcess,
{
/* Load module data */
if (!ReadProcessMemory(hProcess,
- CONTAINING_RECORD(ListEntry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList),
+ CONTAINING_RECORD(ListEntry, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks),
Module,
sizeof(*Module),
NULL))
Module,
sizeof(*Module),
NULL))
}
/* Get to next listed module */
}
/* Get to next listed module */
- ListEntry = Module->InMemoryOrderModuleList.Flink;
+ ListEntry = Module->InMemoryOrderLinks.Flink;
}
SetLastError(ERROR_INVALID_HANDLE);
}
SetLastError(ERROR_INVALID_HANDLE);
//
// Loader Data Table Entry
//
//
// Loader Data Table Entry
//
+// NOTE: The field 'InMemoryOrderLinks' MUST have that name.
+// It's hard-coded into WinDbg for PEB dumping!
+//
typedef struct _LDR_DATA_TABLE_ENTRY
{
LIST_ENTRY InLoadOrderLinks;
typedef struct _LDR_DATA_TABLE_ENTRY
{
LIST_ENTRY InLoadOrderLinks;
- LIST_ENTRY InMemoryOrderModuleList;
- LIST_ENTRY InInitializationOrderModuleList;
+ LIST_ENTRY InMemoryOrderLinks;
+ LIST_ENTRY InInitializationOrderLinks;
PVOID DllBase;
PVOID EntryPoint;
ULONG SizeOfImage;
PVOID DllBase;
PVOID EntryPoint;
ULONG SizeOfImage;