include: Rename LDR_MODULE to LDR_DATA_TABLE_ENTRY.

This name is used in Microsoft's public winternl.h.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-04-23 20:17:31 -05:00 committed by Alexandre Julliard
parent 01f640556f
commit feeb1c7c24
17 changed files with 87 additions and 87 deletions

View File

@ -104,7 +104,7 @@ static BOOL process_attach( HMODULE module )
} }
else else
{ {
LDR_MODULE *ldr; LDR_DATA_TABLE_ENTRY *ldr;
if (LdrFindEntryForAddress( GetModuleHandleW( 0 ), &ldr ) || !(ldr->Flags & LDR_WINE_INTERNAL)) if (LdrFindEntryForAddress( GetModuleHandleW( 0 ), &ldr ) || !(ldr->Flags & LDR_WINE_INTERNAL))
LoadLibraryA( "krnl386.exe16" ); LoadLibraryA( "krnl386.exe16" );

View File

@ -390,7 +390,7 @@ typedef struct _UNICODE_STRING32
DWORD Buffer; DWORD Buffer;
} UNICODE_STRING32; } UNICODE_STRING32;
typedef struct _LDR_MODULE32 typedef struct _LDR_DATA_TABLE_ENTRY32
{ {
LIST_ENTRY32 InLoadOrderModuleList; LIST_ENTRY32 InLoadOrderModuleList;
LIST_ENTRY32 InMemoryOrderModuleList; LIST_ENTRY32 InMemoryOrderModuleList;
@ -400,14 +400,14 @@ typedef struct _LDR_MODULE32
ULONG SizeOfImage; ULONG SizeOfImage;
UNICODE_STRING32 FullDllName; UNICODE_STRING32 FullDllName;
UNICODE_STRING32 BaseDllName; UNICODE_STRING32 BaseDllName;
} LDR_MODULE32; } LDR_DATA_TABLE_ENTRY32;
typedef struct { typedef struct {
HANDLE process; HANDLE process;
PLIST_ENTRY head, current; PLIST_ENTRY head, current;
LDR_MODULE ldr_module; LDR_DATA_TABLE_ENTRY ldr_module;
BOOL wow64; BOOL wow64;
LDR_MODULE32 ldr_module32; LDR_DATA_TABLE_ENTRY32 ldr_module32;
} MODULE_ITERATOR; } MODULE_ITERATOR;
static BOOL init_module_iterator(MODULE_ITERATOR *iter, HANDLE process) static BOOL init_module_iterator(MODULE_ITERATOR *iter, HANDLE process)
@ -479,7 +479,7 @@ static int module_iterator_next(MODULE_ITERATOR *iter)
LIST_ENTRY32 *entry32 = (LIST_ENTRY32 *)iter->current; LIST_ENTRY32 *entry32 = (LIST_ENTRY32 *)iter->current;
if (!ReadProcessMemory(iter->process, if (!ReadProcessMemory(iter->process,
CONTAINING_RECORD(entry32, LDR_MODULE32, InLoadOrderModuleList), CONTAINING_RECORD(entry32, LDR_DATA_TABLE_ENTRY32, InLoadOrderModuleList),
&iter->ldr_module32, sizeof(iter->ldr_module32), NULL)) &iter->ldr_module32, sizeof(iter->ldr_module32), NULL))
return -1; return -1;
@ -488,7 +488,7 @@ static int module_iterator_next(MODULE_ITERATOR *iter)
} }
if (!ReadProcessMemory(iter->process, if (!ReadProcessMemory(iter->process,
CONTAINING_RECORD(iter->current, LDR_MODULE, InLoadOrderModuleList), CONTAINING_RECORD(iter->current, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList),
&iter->ldr_module, sizeof(iter->ldr_module), NULL)) &iter->ldr_module, sizeof(iter->ldr_module), NULL))
return -1; return -1;
@ -496,7 +496,7 @@ static int module_iterator_next(MODULE_ITERATOR *iter)
return 1; return 1;
} }
static BOOL get_ldr_module(HANDLE process, HMODULE module, LDR_MODULE *ldr_module) static BOOL get_ldr_module(HANDLE process, HMODULE module, LDR_DATA_TABLE_ENTRY *ldr_module)
{ {
MODULE_ITERATOR iter; MODULE_ITERATOR iter;
INT ret; INT ret;
@ -519,7 +519,7 @@ static BOOL get_ldr_module(HANDLE process, HMODULE module, LDR_MODULE *ldr_modul
return FALSE; return FALSE;
} }
static BOOL get_ldr_module32(HANDLE process, HMODULE module, LDR_MODULE32 *ldr_module) static BOOL get_ldr_module32(HANDLE process, HMODULE module, LDR_DATA_TABLE_ENTRY32 *ldr_module)
{ {
MODULE_ITERATOR iter; MODULE_ITERATOR iter;
INT ret; INT ret;
@ -568,8 +568,8 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
} }
while (entry != head) while (entry != head)
{ {
PLDR_MODULE table_entry = (PLDR_MODULE) PLDR_DATA_TABLE_ENTRY table_entry = (PLDR_DATA_TABLE_ENTRY)
((PBYTE)entry - offsetof(LDR_MODULE, InLoadOrderModuleList)); ((PBYTE)entry - offsetof(LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList));
if (cb >= sizeof(HMODULE)) if (cb >= sizeof(HMODULE))
{ {
*lphModule++ = table_entry->BaseAddress; *lphModule++ = table_entry->BaseAddress;
@ -641,7 +641,7 @@ BOOL WINAPI K32EnumProcessModulesEx(HANDLE process, HMODULE *lphModule,
DWORD WINAPI K32GetModuleBaseNameW(HANDLE process, HMODULE module, DWORD WINAPI K32GetModuleBaseNameW(HANDLE process, HMODULE module,
LPWSTR base_name, DWORD size) LPWSTR base_name, DWORD size)
{ {
LDR_MODULE ldr_module; LDR_DATA_TABLE_ENTRY ldr_module;
BOOL wow64; BOOL wow64;
if (!IsWow64Process(process, &wow64)) if (!IsWow64Process(process, &wow64))
@ -649,7 +649,7 @@ DWORD WINAPI K32GetModuleBaseNameW(HANDLE process, HMODULE module,
if (sizeof(void *) == 8 && wow64) if (sizeof(void *) == 8 && wow64)
{ {
LDR_MODULE32 ldr_module32; LDR_DATA_TABLE_ENTRY32 ldr_module32;
if (!get_ldr_module32(process, module, &ldr_module32)) if (!get_ldr_module32(process, module, &ldr_module32))
return 0; return 0;
@ -710,7 +710,7 @@ DWORD WINAPI K32GetModuleBaseNameA(HANDLE process, HMODULE module,
DWORD WINAPI K32GetModuleFileNameExW(HANDLE process, HMODULE module, DWORD WINAPI K32GetModuleFileNameExW(HANDLE process, HMODULE module,
LPWSTR file_name, DWORD size) LPWSTR file_name, DWORD size)
{ {
LDR_MODULE ldr_module; LDR_DATA_TABLE_ENTRY ldr_module;
BOOL wow64; BOOL wow64;
DWORD len; DWORD len;
@ -721,7 +721,7 @@ DWORD WINAPI K32GetModuleFileNameExW(HANDLE process, HMODULE module,
if (sizeof(void *) == 8 && wow64) if (sizeof(void *) == 8 && wow64)
{ {
LDR_MODULE32 ldr_module32; LDR_DATA_TABLE_ENTRY32 ldr_module32;
if (!get_ldr_module32(process, module, &ldr_module32)) if (!get_ldr_module32(process, module, &ldr_module32))
return 0; return 0;
@ -805,7 +805,7 @@ DWORD WINAPI K32GetModuleFileNameExA(HANDLE process, HMODULE module,
BOOL WINAPI K32GetModuleInformation(HANDLE process, HMODULE module, BOOL WINAPI K32GetModuleInformation(HANDLE process, HMODULE module,
MODULEINFO *modinfo, DWORD cb) MODULEINFO *modinfo, DWORD cb)
{ {
LDR_MODULE ldr_module; LDR_DATA_TABLE_ENTRY ldr_module;
BOOL wow64; BOOL wow64;
if (cb < sizeof(MODULEINFO)) if (cb < sizeof(MODULEINFO))
@ -819,7 +819,7 @@ BOOL WINAPI K32GetModuleInformation(HANDLE process, HMODULE module,
if (sizeof(void *) == 8 && wow64) if (sizeof(void *) == 8 && wow64)
{ {
LDR_MODULE32 ldr_module32; LDR_DATA_TABLE_ENTRY32 ldr_module32;
if (!get_ldr_module32(process, module, &ldr_module32)) if (!get_ldr_module32(process, module, &ldr_module32))
return FALSE; return FALSE;

View File

@ -3807,7 +3807,7 @@ static void test_InMemoryOrderModuleList(void)
PEB_LDR_DATA *ldr = NtCurrentTeb()->Peb->LdrData; PEB_LDR_DATA *ldr = NtCurrentTeb()->Peb->LdrData;
LIST_ENTRY *entry1, *mark1 = &ldr->InLoadOrderModuleList; LIST_ENTRY *entry1, *mark1 = &ldr->InLoadOrderModuleList;
LIST_ENTRY *entry2, *mark2 = &ldr->InMemoryOrderModuleList; LIST_ENTRY *entry2, *mark2 = &ldr->InMemoryOrderModuleList;
LDR_MODULE *module1, *module2; LDR_DATA_TABLE_ENTRY *module1, *module2;
ok(ldr->Initialized == TRUE, "expected TRUE, got %u\n", ldr->Initialized); ok(ldr->Initialized == TRUE, "expected TRUE, got %u\n", ldr->Initialized);
@ -3815,8 +3815,8 @@ static void test_InMemoryOrderModuleList(void)
entry1 != mark1 && entry2 != mark2; entry1 != mark1 && entry2 != mark2;
entry1 = entry1->Flink, entry2 = entry2->Flink) entry1 = entry1->Flink, entry2 = entry2->Flink)
{ {
module1 = CONTAINING_RECORD(entry1, LDR_MODULE, InLoadOrderModuleList); module1 = CONTAINING_RECORD(entry1, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
module2 = CONTAINING_RECORD(entry2, LDR_MODULE, InMemoryOrderModuleList); module2 = CONTAINING_RECORD(entry2, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
ok(module1 == module2, "expected module1 == module2, got %p and %p\n", module1, module2); ok(module1 == module2, "expected module1 == module2, got %p and %p\n", module1, module2);
} }
ok(entry1 == mark1, "expected entry1 == mark1, got %p and %p\n", entry1, mark1); ok(entry1 == mark1, "expected entry1 == mark1, got %p and %p\n", entry1, mark1);

View File

@ -73,7 +73,7 @@ static WCHAR *fetch_string( HANDLE hProcess, UNICODE_STRING* us)
return local; return local;
} }
static BOOL fetch_module( DWORD process, DWORD flags, LDR_MODULE** ldr_mod, ULONG* num ) static BOOL fetch_module( DWORD process, DWORD flags, LDR_DATA_TABLE_ENTRY **ldr_mod, ULONG *num )
{ {
HANDLE hProcess; HANDLE hProcess;
PROCESS_BASIC_INFORMATION pbi; PROCESS_BASIC_INFORMATION pbi;
@ -109,19 +109,19 @@ static BOOL fetch_module( DWORD process, DWORD flags, LDR_MODULE** ldr_mod, ULON
while (curr != head) while (curr != head)
{ {
if (!*num) if (!*num)
*ldr_mod = HeapAlloc( GetProcessHeap(), 0, sizeof(LDR_MODULE) ); *ldr_mod = HeapAlloc( GetProcessHeap(), 0, sizeof(LDR_DATA_TABLE_ENTRY) );
else else
*ldr_mod = HeapReAlloc( GetProcessHeap(), 0, *ldr_mod, *ldr_mod = HeapReAlloc( GetProcessHeap(), 0, *ldr_mod,
(*num + 1) * sizeof(LDR_MODULE) ); (*num + 1) * sizeof(LDR_DATA_TABLE_ENTRY) );
if (!*ldr_mod) break; if (!*ldr_mod) break;
if (!ReadProcessMemory( hProcess, if (!ReadProcessMemory( hProcess,
CONTAINING_RECORD(curr, LDR_MODULE, CONTAINING_RECORD(curr, LDR_DATA_TABLE_ENTRY,
InLoadOrderModuleList), InLoadOrderModuleList),
&(*ldr_mod)[*num], &(*ldr_mod)[*num],
sizeof(LDR_MODULE), NULL)) sizeof(LDR_DATA_TABLE_ENTRY), NULL))
break; break;
curr = (*ldr_mod)[*num].InLoadOrderModuleList.Flink; curr = (*ldr_mod)[*num].InLoadOrderModuleList.Flink;
/* if we cannot fetch the strings, then just ignore this LDR_MODULE /* if we cannot fetch the strings, then just ignore this LDR_DATA_TABLE_ENTRY
* and continue loading the other ones in the list * and continue loading the other ones in the list
*/ */
if (!fetch_string( hProcess, &(*ldr_mod)[*num].BaseDllName )) continue; if (!fetch_string( hProcess, &(*ldr_mod)[*num].BaseDllName )) continue;
@ -140,7 +140,7 @@ static BOOL fetch_module( DWORD process, DWORD flags, LDR_MODULE** ldr_mod, ULON
} }
static void fill_module( struct snapshot* snap, ULONG* offset, ULONG process, static void fill_module( struct snapshot* snap, ULONG* offset, ULONG process,
LDR_MODULE* ldr_mod, ULONG num ) LDR_DATA_TABLE_ENTRY* ldr_mod, ULONG num )
{ {
MODULEENTRY32W* mod; MODULEENTRY32W* mod;
ULONG i; ULONG i;
@ -293,7 +293,7 @@ static void fill_thread( struct snapshot* snap, ULONG* offset, LPVOID info, ULON
HANDLE WINAPI CreateToolhelp32Snapshot( DWORD flags, DWORD process ) HANDLE WINAPI CreateToolhelp32Snapshot( DWORD flags, DWORD process )
{ {
SYSTEM_PROCESS_INFORMATION* spi = NULL; SYSTEM_PROCESS_INFORMATION* spi = NULL;
LDR_MODULE* mod = NULL; LDR_DATA_TABLE_ENTRY *mod = NULL;
ULONG num_pcs, num_thd, num_mod; ULONG num_pcs, num_thd, num_mod;
HANDLE hSnapShot = 0; HANDLE hSnapShot = 0;

View File

@ -301,7 +301,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetModuleFileNameW( HMODULE module, LPWSTR filena
{ {
ULONG len = 0; ULONG len = 0;
ULONG_PTR magic; ULONG_PTR magic;
LDR_MODULE *pldr; LDR_DATA_TABLE_ENTRY *pldr;
WIN16_SUBSYSTEM_TIB *win16_tib; WIN16_SUBSYSTEM_TIB *win16_tib;
if (!module && ((win16_tib = NtCurrentTeb()->Tib.SubSystemTib)) && win16_tib->exe_name) if (!module && ((win16_tib = NtCurrentTeb()->Tib.SubSystemTib)) && win16_tib->exe_name)

View File

@ -971,7 +971,7 @@ static HINSTANCE16 MODULE_LoadModule16( LPCSTR libname, BOOL implicit, BOOL lib_
/* if module has a 32-bit owner, match the load order of the owner */ /* if module has a 32-bit owner, match the load order of the owner */
if ((main_module = (void *)GetProcAddress( mod32, "__wine_spec_main_module" ))) if ((main_module = (void *)GetProcAddress( mod32, "__wine_spec_main_module" )))
{ {
LDR_MODULE *ldr; LDR_DATA_TABLE_ENTRY *ldr;
HMODULE main_owner = LoadLibraryA( main_module ); HMODULE main_owner = LoadLibraryA( main_module );
if (!main_owner) if (!main_owner)

View File

@ -821,7 +821,7 @@ static NTSTATUS get_module_filename( HMODULE module, UNICODE_STRING *str, unsign
{ {
NTSTATUS status; NTSTATUS status;
ULONG_PTR magic; ULONG_PTR magic;
LDR_MODULE *pldr; LDR_DATA_TABLE_ENTRY *pldr;
LdrLockLoaderLock(0, NULL, &magic); LdrLockLoaderLock(0, NULL, &magic);
status = LdrFindEntryForAddress( module, &pldr ); status = LdrFindEntryForAddress( module, &pldr );
@ -3375,7 +3375,7 @@ static NTSTATUS find_query_actctx( HANDLE *handle, DWORD flags, ULONG class )
else if (flags & (QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS|QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE)) else if (flags & (QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS|QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE))
{ {
ULONG_PTR magic; ULONG_PTR magic;
LDR_MODULE *pldr; LDR_DATA_TABLE_ENTRY *pldr;
if (!*handle) return STATUS_INVALID_PARAMETER; if (!*handle) return STATUS_INVALID_PARAMETER;

View File

@ -581,7 +581,7 @@ static RUNTIME_FUNCTION *find_function_info( ULONG_PTR pc, ULONG_PTR base,
/********************************************************************** /**********************************************************************
* lookup_function_info * lookup_function_info
*/ */
RUNTIME_FUNCTION *lookup_function_info( ULONG_PTR pc, ULONG_PTR *base, LDR_MODULE **module ) RUNTIME_FUNCTION *lookup_function_info( ULONG_PTR pc, ULONG_PTR *base, LDR_DATA_TABLE_ENTRY **module )
{ {
RUNTIME_FUNCTION *func = NULL; RUNTIME_FUNCTION *func = NULL;
struct dynamic_unwind_entry *entry; struct dynamic_unwind_entry *entry;
@ -628,7 +628,7 @@ RUNTIME_FUNCTION *lookup_function_info( ULONG_PTR pc, ULONG_PTR *base, LDR_MODUL
PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry( ULONG_PTR pc, ULONG_PTR *base, PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry( ULONG_PTR pc, ULONG_PTR *base,
UNWIND_HISTORY_TABLE *table ) UNWIND_HISTORY_TABLE *table )
{ {
LDR_MODULE *module; LDR_DATA_TABLE_ENTRY *module;
RUNTIME_FUNCTION *func; RUNTIME_FUNCTION *func;
/* FIXME: should use the history table to make things faster */ /* FIXME: should use the history table to make things faster */

View File

@ -69,7 +69,7 @@ WINE_DECLARE_DEBUG_CHANNEL(imports);
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID ((ULONG_PTR)2) #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID ((ULONG_PTR)2)
typedef DWORD (CALLBACK *DLLENTRYPROC)(HMODULE,DWORD,LPVOID); typedef DWORD (CALLBACK *DLLENTRYPROC)(HMODULE,DWORD,LPVOID);
typedef void (CALLBACK *LDRENUMPROC)(LDR_MODULE *, void *, BOOLEAN *); typedef void (CALLBACK *LDRENUMPROC)(LDR_DATA_TABLE_ENTRY *, void *, BOOLEAN *);
/* system directory with trailing backslash */ /* system directory with trailing backslash */
const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\', const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\',
@ -125,7 +125,7 @@ static const WCHAR dllW[] = {'.','d','l','l',0};
/* internal representation of 32bit modules. per process. */ /* internal representation of 32bit modules. per process. */
typedef struct _wine_modref typedef struct _wine_modref
{ {
LDR_MODULE ldr; LDR_DATA_TABLE_ENTRY ldr;
dev_t dev; dev_t dev;
ino_t ino; ino_t ino;
void *so_handle; void *so_handle;
@ -209,7 +209,7 @@ static RTL_UNLOAD_EVENT_TRACE unload_traces[RTL_UNLOAD_EVENT_TRACE_NUMBER];
static RTL_UNLOAD_EVENT_TRACE *unload_trace_ptr; static RTL_UNLOAD_EVENT_TRACE *unload_trace_ptr;
static unsigned int unload_trace_seq; static unsigned int unload_trace_seq;
static void module_push_unload_trace( const LDR_MODULE *ldr ) static void module_push_unload_trace( const LDR_DATA_TABLE_ENTRY *ldr )
{ {
RTL_UNLOAD_EVENT_TRACE *ptr = &unload_traces[unload_trace_seq]; RTL_UNLOAD_EVENT_TRACE *ptr = &unload_traces[unload_trace_seq];
unsigned int len = min(sizeof(ptr->ImageName) - sizeof(WCHAR), ldr->BaseDllName.Length); unsigned int len = min(sizeof(ptr->ImageName) - sizeof(WCHAR), ldr->BaseDllName.Length);
@ -439,7 +439,7 @@ static inline ULONG_PTR allocate_stub( const char *dll, const char *name ) { ret
#endif /* __i386__ */ #endif /* __i386__ */
/* call ldr notifications */ /* call ldr notifications */
static void call_ldr_notifications( ULONG reason, LDR_MODULE *module ) static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
{ {
struct ldr_notification *notify, *notify_next; struct ldr_notification *notify, *notify_next;
LDR_DLL_NOTIFICATION_DATA data; LDR_DLL_NOTIFICATION_DATA data;
@ -471,14 +471,14 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module )
static WINE_MODREF *get_modref( HMODULE hmod ) static WINE_MODREF *get_modref( HMODULE hmod )
{ {
PLIST_ENTRY mark, entry; PLIST_ENTRY mark, entry;
PLDR_MODULE mod; PLDR_DATA_TABLE_ENTRY mod;
if (cached_modref && cached_modref->ldr.BaseAddress == hmod) return cached_modref; if (cached_modref && cached_modref->ldr.BaseAddress == hmod) return cached_modref;
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD(entry, LDR_MODULE, InMemoryOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
if (mod->BaseAddress == hmod) if (mod->BaseAddress == hmod)
return cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr); return cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
} }
@ -505,7 +505,7 @@ static WINE_MODREF *find_basename_module( LPCWSTR name )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_MODULE *mod = CONTAINING_RECORD(entry, LDR_MODULE, InLoadOrderModuleList); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
if (RtlEqualUnicodeString( &name_str, &mod->BaseDllName, TRUE )) if (RtlEqualUnicodeString( &name_str, &mod->BaseDllName, TRUE ))
{ {
cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr); cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
@ -537,7 +537,7 @@ static WINE_MODREF *find_fullname_module( const UNICODE_STRING *nt_name )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_MODULE *mod = CONTAINING_RECORD(entry, LDR_MODULE, InLoadOrderModuleList); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
if (RtlEqualUnicodeString( &name, &mod->FullDllName, TRUE )) if (RtlEqualUnicodeString( &name, &mod->FullDllName, TRUE ))
{ {
cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr); cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
@ -564,7 +564,7 @@ static WINE_MODREF *find_fileid_module( struct stat *st )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_MODULE *mod = CONTAINING_RECORD( entry, LDR_MODULE, InLoadOrderModuleList ); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList );
WINE_MODREF *wm = CONTAINING_RECORD( mod, WINE_MODREF, ldr ); WINE_MODREF *wm = CONTAINING_RECORD( mod, WINE_MODREF, ldr );
if (wm->dev == st->st_dev && wm->ino == st->st_ino) if (wm->dev == st->st_dev && wm->ino == st->st_ino)
@ -590,7 +590,7 @@ static WINE_MODREF *find_so_module( void *handle )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_MODULE *mod = CONTAINING_RECORD( entry, LDR_MODULE, InLoadOrderModuleList ); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList );
WINE_MODREF *wm = CONTAINING_RECORD( mod, WINE_MODREF, ldr ); WINE_MODREF *wm = CONTAINING_RECORD( mod, WINE_MODREF, ldr );
if (wm->so_handle == handle) return wm; if (wm->so_handle == handle) return wm;
@ -918,7 +918,7 @@ done:
/*********************************************************************** /***********************************************************************
* create_module_activation_context * create_module_activation_context
*/ */
static NTSTATUS create_module_activation_context( LDR_MODULE *module ) static NTSTATUS create_module_activation_context( LDR_DATA_TABLE_ENTRY *module )
{ {
NTSTATUS status; NTSTATUS status;
LDR_RESOURCE_INFO info; LDR_RESOURCE_INFO info;
@ -948,7 +948,7 @@ static NTSTATUS create_module_activation_context( LDR_MODULE *module )
* Some dlls (corpol.dll from IE6 for instance) are incorrectly marked as native * Some dlls (corpol.dll from IE6 for instance) are incorrectly marked as native
* while being perfectly normal DLLs. This heuristic should catch such breakages. * while being perfectly normal DLLs. This heuristic should catch such breakages.
*/ */
static BOOL is_dll_native_subsystem( LDR_MODULE *mod, const IMAGE_NT_HEADERS *nt, LPCWSTR filename ) static BOOL is_dll_native_subsystem( LDR_DATA_TABLE_ENTRY *mod, const IMAGE_NT_HEADERS *nt, LPCWSTR filename )
{ {
static const WCHAR ntdllW[] = {'n','t','d','l','l','.','d','l','l',0}; static const WCHAR ntdllW[] = {'n','t','d','l','l','.','d','l','l',0};
static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0}; static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
@ -985,7 +985,7 @@ static BOOL is_dll_native_subsystem( LDR_MODULE *mod, const IMAGE_NT_HEADERS *nt
* Allocate a TLS slot for a newly-loaded module. * Allocate a TLS slot for a newly-loaded module.
* The loader_section must be locked while calling this function. * The loader_section must be locked while calling this function.
*/ */
static SHORT alloc_tls_slot( LDR_MODULE *mod ) static SHORT alloc_tls_slot( LDR_DATA_TABLE_ENTRY *mod )
{ {
const IMAGE_TLS_DIRECTORY *dir; const IMAGE_TLS_DIRECTORY *dir;
ULONG i, size; ULONG i, size;
@ -1070,7 +1070,7 @@ static SHORT alloc_tls_slot( LDR_MODULE *mod )
* Free the module TLS slot on unload. * Free the module TLS slot on unload.
* The loader_section must be locked while calling this function. * The loader_section must be locked while calling this function.
*/ */
static void free_tls_slot( LDR_MODULE *mod ) static void free_tls_slot( LDR_DATA_TABLE_ENTRY *mod )
{ {
ULONG i = (USHORT)mod->TlsIndex; ULONG i = (USHORT)mod->TlsIndex;
@ -1526,7 +1526,7 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_MODULE *mod = CONTAINING_RECORD(entry, LDR_MODULE, InLoadOrderModuleList); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
if (!(mod->Flags & LDR_IMAGE_IS_DLL)) continue; if (!(mod->Flags & LDR_IMAGE_IS_DLL)) continue;
if (mod->Flags & (LDR_LOAD_IN_PROGRESS | LDR_PROCESS_ATTACHED)) continue; if (mod->Flags & (LDR_LOAD_IN_PROGRESS | LDR_PROCESS_ATTACHED)) continue;
@ -1549,14 +1549,14 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved )
static void process_detach(void) static void process_detach(void)
{ {
PLIST_ENTRY mark, entry; PLIST_ENTRY mark, entry;
PLDR_MODULE mod; PLDR_DATA_TABLE_ENTRY mod;
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
do do
{ {
for (entry = mark->Blink; entry != mark; entry = entry->Blink) for (entry = mark->Blink; entry != mark; entry = entry->Blink)
{ {
mod = CONTAINING_RECORD(entry, LDR_MODULE, mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList); InInitializationOrderModuleList);
/* Check whether to detach this DLL */ /* Check whether to detach this DLL */
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) ) if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
@ -1587,12 +1587,12 @@ static void process_detach(void)
static void thread_attach(void) static void thread_attach(void)
{ {
PLIST_ENTRY mark, entry; PLIST_ENTRY mark, entry;
PLDR_MODULE mod; PLDR_DATA_TABLE_ENTRY mod;
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD(entry, LDR_MODULE, mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList); InInitializationOrderModuleList);
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) ) if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue; continue;
@ -1630,15 +1630,15 @@ NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE hModule)
* *
* The loader_section must be locked while calling this function * The loader_section must be locked while calling this function
*/ */
NTSTATUS WINAPI LdrFindEntryForAddress(const void* addr, PLDR_MODULE* pmod) NTSTATUS WINAPI LdrFindEntryForAddress( const void *addr, PLDR_DATA_TABLE_ENTRY *pmod )
{ {
PLIST_ENTRY mark, entry; PLIST_ENTRY mark, entry;
PLDR_MODULE mod; PLDR_DATA_TABLE_ENTRY mod;
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD(entry, LDR_MODULE, InMemoryOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
if (mod->BaseAddress <= addr && if (mod->BaseAddress <= addr &&
(const char *)addr < (char*)mod->BaseAddress + mod->SizeOfImage) (const char *)addr < (char*)mod->BaseAddress + mod->SizeOfImage)
{ {
@ -1655,7 +1655,7 @@ NTSTATUS WINAPI LdrFindEntryForAddress(const void* addr, PLDR_MODULE* pmod)
NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback, void *context ) NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback, void *context )
{ {
LIST_ENTRY *mark, *entry; LIST_ENTRY *mark, *entry;
LDR_MODULE *mod; LDR_DATA_TABLE_ENTRY *mod;
BOOLEAN stop = FALSE; BOOLEAN stop = FALSE;
TRACE( "(%p, %p, %p)\n", unknown, callback, context ); TRACE( "(%p, %p, %p)\n", unknown, callback, context );
@ -1668,7 +1668,7 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback,
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD( entry, LDR_MODULE, InMemoryOrderModuleList ); mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList );
callback( mod, context, &stop ); callback( mod, context, &stop );
if (stop) break; if (stop) break;
} }
@ -3483,7 +3483,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
ANSI_STRING str; ANSI_STRING str;
char* ptr; char* ptr;
PLIST_ENTRY mark, entry; PLIST_ENTRY mark, entry;
PLDR_MODULE mod; LDR_DATA_TABLE_ENTRY *mod;
WORD id = 0; WORD id = 0;
smi->ModulesCount = 0; smi->ModulesCount = 0;
@ -3492,7 +3492,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD(entry, LDR_MODULE, InLoadOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
size += sizeof(*sm); size += sizeof(*sm);
if (size <= buf_size) if (size <= buf_size)
{ {
@ -3743,7 +3743,7 @@ void WINAPI RtlExitUserProcess( DWORD status )
void WINAPI LdrShutdownThread(void) void WINAPI LdrShutdownThread(void)
{ {
PLIST_ENTRY mark, entry; PLIST_ENTRY mark, entry;
PLDR_MODULE mod; LDR_DATA_TABLE_ENTRY *mod;
UINT i; UINT i;
void **pointers; void **pointers;
@ -3757,7 +3757,7 @@ void WINAPI LdrShutdownThread(void)
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
for (entry = mark->Blink; entry != mark; entry = entry->Blink) for (entry = mark->Blink; entry != mark; entry = entry->Blink)
{ {
mod = CONTAINING_RECORD(entry, LDR_MODULE, mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList); InInitializationOrderModuleList);
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) ) if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue; continue;
@ -3828,13 +3828,13 @@ static void free_modref( WINE_MODREF *wm )
static void MODULE_FlushModrefs(void) static void MODULE_FlushModrefs(void)
{ {
PLIST_ENTRY mark, entry, prev; PLIST_ENTRY mark, entry, prev;
PLDR_MODULE mod; LDR_DATA_TABLE_ENTRY *mod;
WINE_MODREF*wm; WINE_MODREF*wm;
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
for (entry = mark->Blink; entry != mark; entry = prev) for (entry = mark->Blink; entry != mark; entry = prev)
{ {
mod = CONTAINING_RECORD(entry, LDR_MODULE, InInitializationOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr); wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
prev = entry->Blink; prev = entry->Blink;
if (!mod->LoadCount) free_modref( wm ); if (!mod->LoadCount) free_modref( wm );
@ -3844,7 +3844,7 @@ static void MODULE_FlushModrefs(void)
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Blink; entry != mark; entry = prev) for (entry = mark->Blink; entry != mark; entry = prev)
{ {
mod = CONTAINING_RECORD(entry, LDR_MODULE, InLoadOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr); wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
prev = entry->Blink; prev = entry->Blink;
if (!mod->LoadCount) free_modref( wm ); if (!mod->LoadCount) free_modref( wm );
@ -4189,7 +4189,7 @@ PVOID WINAPI RtlImageRvaToVa( const IMAGE_NT_HEADERS *nt, HMODULE module,
*/ */
PVOID WINAPI RtlPcToFileHeader( PVOID pc, PVOID *address ) PVOID WINAPI RtlPcToFileHeader( PVOID pc, PVOID *address )
{ {
LDR_MODULE *module; LDR_DATA_TABLE_ENTRY *module;
PVOID ret = NULL; PVOID ret = NULL;
RtlEnterCriticalSection( &loader_section ); RtlEnterCriticalSection( &loader_section );

View File

@ -69,7 +69,7 @@ extern NTSTATUS get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULON
extern LONG WINAPI call_unhandled_exception_filter( PEXCEPTION_POINTERS eptr ) DECLSPEC_HIDDEN; extern LONG WINAPI call_unhandled_exception_filter( PEXCEPTION_POINTERS eptr ) DECLSPEC_HIDDEN;
#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
extern RUNTIME_FUNCTION *lookup_function_info( ULONG_PTR pc, ULONG_PTR *base, LDR_MODULE **module ) DECLSPEC_HIDDEN; extern RUNTIME_FUNCTION *lookup_function_info( ULONG_PTR pc, ULONG_PTR *base, LDR_DATA_TABLE_ENTRY **module ) DECLSPEC_HIDDEN;
#endif #endif
/* debug helpers */ /* debug helpers */

View File

@ -609,7 +609,7 @@ static NTSTATUS libunwind_virtual_unwind( ULONG_PTR ip, ULONG_PTR *frame, CONTEX
*/ */
static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEXT *context ) static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEXT *context )
{ {
LDR_MODULE *module; LDR_DATA_TABLE_ENTRY *module;
NTSTATUS status; NTSTATUS status;
dispatch->ImageBase = 0; dispatch->ImageBase = 0;

View File

@ -1578,7 +1578,7 @@ static NTSTATUS libunwind_virtual_unwind( ULONG64 ip, BOOL* got_info, ULONG64 *f
*/ */
static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEXT *context ) static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEXT *context )
{ {
LDR_MODULE *module; LDR_DATA_TABLE_ENTRY *module;
NTSTATUS status; NTSTATUS status;
dispatch->ImageBase = 0; dispatch->ImageBase = 0;

View File

@ -3329,7 +3329,7 @@ struct ldr_enum_context
int count; int count;
}; };
static void WINAPI ldr_enum_callback(LDR_MODULE *module, void *context, BOOLEAN *stop) static void WINAPI ldr_enum_callback(LDR_DATA_TABLE_ENTRY *module, void *context, BOOLEAN *stop)
{ {
static const WCHAR ntdllW[] = {'n','t','d','l','l','.','d','l','l',0}; static const WCHAR ntdllW[] = {'n','t','d','l','l','.','d','l','l',0};
struct ldr_enum_context *ctx = context; struct ldr_enum_context *ctx = context;
@ -3435,9 +3435,9 @@ static void CALLBACK ldr_notify_callback1(ULONG reason, LDR_DLL_NOTIFICATION_DAT
const IMAGE_IMPORT_DESCRIPTOR *imports; const IMAGE_IMPORT_DESCRIPTOR *imports;
const IMAGE_THUNK_DATA *import_list; const IMAGE_THUNK_DATA *import_list;
IMAGE_THUNK_DATA *thunk_list; IMAGE_THUNK_DATA *thunk_list;
LDR_DATA_TABLE_ENTRY *mod;
DWORD *calls = context; DWORD *calls = context;
LIST_ENTRY *mark; LIST_ENTRY *mark;
LDR_MODULE *mod;
ULONG size; ULONG size;
int i, j; int i, j;
@ -3455,7 +3455,7 @@ static void CALLBACK ldr_notify_callback1(ULONG reason, LDR_DLL_NOTIFICATION_DAT
/* expect module to be last module listed in LdrData load order list */ /* expect module to be last module listed in LdrData load order list */
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
mod = CONTAINING_RECORD(mark->Blink, LDR_MODULE, InMemoryOrderModuleList); mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n", ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->BaseAddress); data->Loaded.DllBase, mod->BaseAddress);
ok(!lstrcmpiW(mod->BaseDllName.Buffer, expected_dll), "Expected %s, got %s\n", ok(!lstrcmpiW(mod->BaseDllName.Buffer, expected_dll), "Expected %s, got %s\n",
@ -3507,7 +3507,7 @@ static void CALLBACK ldr_notify_callback_dll_main(ULONG reason, LDR_DLL_NOTIFICA
{ {
DWORD *calls = context; DWORD *calls = context;
LIST_ENTRY *mark; LIST_ENTRY *mark;
LDR_MODULE *mod; LDR_DATA_TABLE_ENTRY *mod;
*calls <<= 4; *calls <<= 4;
*calls |= reason; *calls |= reason;
@ -3516,7 +3516,7 @@ static void CALLBACK ldr_notify_callback_dll_main(ULONG reason, LDR_DLL_NOTIFICA
return; return;
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
mod = CONTAINING_RECORD(mark->Blink, LDR_MODULE, InMemoryOrderModuleList); mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n", ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->BaseAddress); data->Loaded.DllBase, mod->BaseAddress);
if (mod->BaseAddress != data->Loaded.DllBase) if (mod->BaseAddress != data->Loaded.DllBase)
@ -3546,7 +3546,7 @@ static void CALLBACK ldr_notify_callback_fail(ULONG reason, LDR_DLL_NOTIFICATION
{ {
DWORD *calls = context; DWORD *calls = context;
LIST_ENTRY *mark; LIST_ENTRY *mark;
LDR_MODULE *mod; LDR_DATA_TABLE_ENTRY *mod;
*calls <<= 4; *calls <<= 4;
*calls |= reason; *calls |= reason;
@ -3555,7 +3555,7 @@ static void CALLBACK ldr_notify_callback_fail(ULONG reason, LDR_DLL_NOTIFICATION
return; return;
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
mod = CONTAINING_RECORD(mark->Blink, LDR_MODULE, InMemoryOrderModuleList); mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n", ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->BaseAddress); data->Loaded.DllBase, mod->BaseAddress);
if (mod->BaseAddress != data->Loaded.DllBase) if (mod->BaseAddress != data->Loaded.DllBase)

View File

@ -803,7 +803,7 @@ static void unload_driver( struct wine_rb_entry *entry, void *context )
{ {
struct wine_driver *driver = WINE_RB_ENTRY_VALUE( entry, struct wine_driver, entry ); struct wine_driver *driver = WINE_RB_ENTRY_VALUE( entry, struct wine_driver, entry );
SERVICE_STATUS_HANDLE service_handle = driver->service_handle; SERVICE_STATUS_HANDLE service_handle = driver->service_handle;
LDR_MODULE *ldr; LDR_DATA_TABLE_ENTRY *ldr;
if (!service_handle) return; /* not a service */ if (!service_handle) return; /* not a service */
@ -3355,10 +3355,10 @@ error:
return STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL;
} }
/* find the LDR_MODULE corresponding to the driver module */ /* find the LDR_DATA_TABLE_ENTRY corresponding to the driver module */
static LDR_MODULE *find_ldr_module( HMODULE module ) static LDR_DATA_TABLE_ENTRY *find_ldr_module( HMODULE module )
{ {
LDR_MODULE *ldr; LDR_DATA_TABLE_ENTRY *ldr;
ULONG_PTR magic; ULONG_PTR magic;
LdrLockLoaderLock( 0, NULL, &magic ); LdrLockLoaderLock( 0, NULL, &magic );

View File

@ -2317,7 +2317,7 @@ typedef enum _LDR_DLL_LOAD_REASON
LoadReasonUnknown = -1 LoadReasonUnknown = -1
} LDR_DLL_LOAD_REASON, *PLDR_DLL_LOAD_REASON; } LDR_DLL_LOAD_REASON, *PLDR_DLL_LOAD_REASON;
typedef struct _LDR_MODULE typedef struct _LDR_DATA_TABLE_ENTRY
{ {
LIST_ENTRY InLoadOrderModuleList; LIST_ENTRY InLoadOrderModuleList;
LIST_ENTRY InMemoryOrderModuleList; LIST_ENTRY InMemoryOrderModuleList;
@ -2348,7 +2348,7 @@ typedef struct _LDR_MODULE
LDR_DLL_LOAD_REASON LoadReason; LDR_DLL_LOAD_REASON LoadReason;
ULONG ImplicitPathOptions; ULONG ImplicitPathOptions;
ULONG ReferenceCount; ULONG ReferenceCount;
} LDR_MODULE, *PLDR_MODULE; } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA
{ {
@ -2376,7 +2376,7 @@ typedef union _LDR_DLL_NOTIFICATION_DATA
typedef void (CALLBACK *PLDR_DLL_NOTIFICATION_FUNCTION)(ULONG, LDR_DLL_NOTIFICATION_DATA*, void*); typedef void (CALLBACK *PLDR_DLL_NOTIFICATION_FUNCTION)(ULONG, LDR_DLL_NOTIFICATION_DATA*, void*);
/* those defines are (some of the) regular LDR_MODULE.Flags values */ /* those defines are (some of the) regular LDR_DATA_TABLE_ENTRY.Flags values */
#define LDR_IMAGE_IS_DLL 0x00000004 #define LDR_IMAGE_IS_DLL 0x00000004
#define LDR_LOAD_IN_PROGRESS 0x00001000 #define LDR_LOAD_IN_PROGRESS 0x00001000
#define LDR_UNLOAD_IN_PROGRESS 0x00002000 #define LDR_UNLOAD_IN_PROGRESS 0x00002000
@ -2443,7 +2443,7 @@ NTSYSAPI NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_EN
NTSYSAPI NTSTATUS WINAPI LdrAddDllDirectory(const UNICODE_STRING*,void**); NTSYSAPI NTSTATUS WINAPI LdrAddDllDirectory(const UNICODE_STRING*,void**);
NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE); NTSYSAPI NTSTATUS WINAPI LdrAddRefDll(ULONG,HMODULE);
NTSYSAPI NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE); NTSYSAPI NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE);
NTSYSAPI NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_MODULE*); NTSYSAPI NTSTATUS WINAPI LdrFindEntryForAddress(const void*, PLDR_DATA_TABLE_ENTRY*);
NTSYSAPI NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**); NTSYSAPI NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
NTSYSAPI NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**); NTSYSAPI NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**);
NTSYSAPI NTSTATUS WINAPI LdrGetDllDirectory(UNICODE_STRING*); NTSYSAPI NTSTATUS WINAPI LdrGetDllDirectory(UNICODE_STRING*);

View File

@ -144,7 +144,7 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base,
PEB peb; PEB peb;
PEB_LDR_DATA ldr_data; PEB_LDR_DATA ldr_data;
PLIST_ENTRY head, current; PLIST_ENTRY head, current;
LDR_MODULE ldr_module; LDR_DATA_TABLE_ENTRY ldr_module;
unsigned tlsindex = -1; unsigned tlsindex = -1;
if (NtQueryInformationProcess(dbg_curr_process->handle, ProcessBasicInformation, if (NtQueryInformationProcess(dbg_curr_process->handle, ProcessBasicInformation,
@ -165,7 +165,7 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base,
head = &((PEB_LDR_DATA*)peb.LdrData)->InLoadOrderModuleList; head = &((PEB_LDR_DATA*)peb.LdrData)->InLoadOrderModuleList;
do do
{ {
if (!dbg_read_memory(CONTAINING_RECORD(current, LDR_MODULE, InLoadOrderModuleList), if (!dbg_read_memory(CONTAINING_RECORD(current, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList),
&ldr_module, sizeof(ldr_module))) goto tls_error; &ldr_module, sizeof(ldr_module))) goto tls_error;
if ((DWORD_PTR)ldr_module.BaseAddress == sym->ModBase) if ((DWORD_PTR)ldr_module.BaseAddress == sym->ModBase)
{ {

View File

@ -3408,7 +3408,7 @@ PIO_APC_ROUTINE
PIO_STATUS_BLOCK PIO_STATUS_BLOCK
PKEY_MULTIPLE_VALUE_INFORMATION PKEY_MULTIPLE_VALUE_INFORMATION
PLARGE_INTEGER PLARGE_INTEGER
PLDR_MODULE * PLDR_DATA_TABLE_ENTRY *
PLONG PLONG
PLPC_MESSAGE PLPC_MESSAGE
PLPC_SECTION_READ PLPC_SECTION_READ