This name is used in Microsoft's public winternl.h.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/kernel32/kernel_main.c | 2 +-
dlls/kernel32/module.c | 32 ++++++++---------
dlls/kernel32/tests/loader.c | 6 ++--
dlls/kernel32/toolhelp.c | 16 ++++-----
dlls/kernelbase/loader.c | 2 +-
dlls/krnl386.exe16/ne_module.c | 2 +-
dlls/ntdll/actctx.c | 4 +--
dlls/ntdll/exception.c | 4 +--
dlls/ntdll/loader.c | 64 +++++++++++++++++-----------------
dlls/ntdll/ntdll_misc.h | 2 +-
dlls/ntdll/signal_arm64.c | 2 +-
dlls/ntdll/signal_x86_64.c | 2 +-
dlls/ntdll/tests/rtl.c | 14 ++++----
dlls/ntoskrnl.exe/ntoskrnl.c | 8 ++---
include/winternl.h | 8 ++---
programs/winedbg/symbol.c | 4 +--
tools/winapi/win32.api | 2 +-
17 files changed, 87 insertions(+), 87 deletions(-)
diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c
index cdbb4b9a38..fbc2e8daee 100644
--- a/dlls/kernel32/kernel_main.c
+++ b/dlls/kernel32/kernel_main.c
@@ -104,7 +104,7 @@ static BOOL process_attach( HMODULE module )
}
else
{
- LDR_MODULE *ldr;
+ LDR_DATA_TABLE_ENTRY *ldr;
if (LdrFindEntryForAddress( GetModuleHandleW( 0 ), &ldr ) || !(ldr->Flags & LDR_WINE_INTERNAL))
LoadLibraryA( "krnl386.exe16" );
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index 45814dbff3..f0557f944c 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -390,7 +390,7 @@ typedef struct _UNICODE_STRING32
DWORD Buffer;
} UNICODE_STRING32;
-typedef struct _LDR_MODULE32
+typedef struct _LDR_DATA_TABLE_ENTRY32
{
LIST_ENTRY32 InLoadOrderModuleList;
LIST_ENTRY32 InMemoryOrderModuleList;
@@ -400,14 +400,14 @@ typedef struct _LDR_MODULE32
ULONG SizeOfImage;
UNICODE_STRING32 FullDllName;
UNICODE_STRING32 BaseDllName;
-} LDR_MODULE32;
+} LDR_DATA_TABLE_ENTRY32;
typedef struct {
HANDLE process;
PLIST_ENTRY head, current;
- LDR_MODULE ldr_module;
+ LDR_DATA_TABLE_ENTRY ldr_module;
BOOL wow64;
- LDR_MODULE32 ldr_module32;
+ LDR_DATA_TABLE_ENTRY32 ldr_module32;
} MODULE_ITERATOR;
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;
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))
return -1;
@@ -488,7 +488,7 @@ static int module_iterator_next(MODULE_ITERATOR *iter)
}
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))
return -1;
@@ -496,7 +496,7 @@ static int module_iterator_next(MODULE_ITERATOR *iter)
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;
INT ret;
@@ -519,7 +519,7 @@ static BOOL get_ldr_module(HANDLE process, HMODULE module, LDR_MODULE *ldr_modul
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;
INT ret;
@@ -568,8 +568,8 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
}
while (entry != head)
{
- PLDR_MODULE table_entry = (PLDR_MODULE)
- ((PBYTE)entry - offsetof(LDR_MODULE, InLoadOrderModuleList));
+ PLDR_DATA_TABLE_ENTRY table_entry = (PLDR_DATA_TABLE_ENTRY)
+ ((PBYTE)entry - offsetof(LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList));
if (cb >= sizeof(HMODULE))
{
*lphModule++ = table_entry->BaseAddress;
@@ -641,7 +641,7 @@ BOOL WINAPI K32EnumProcessModulesEx(HANDLE process, HMODULE *lphModule,
DWORD WINAPI K32GetModuleBaseNameW(HANDLE process, HMODULE module,
LPWSTR base_name, DWORD size)
{
- LDR_MODULE ldr_module;
+ LDR_DATA_TABLE_ENTRY ldr_module;
BOOL wow64;
if (!IsWow64Process(process, &wow64))
@@ -649,7 +649,7 @@ DWORD WINAPI K32GetModuleBaseNameW(HANDLE process, HMODULE module,
if (sizeof(void *) == 8 && wow64)
{
- LDR_MODULE32 ldr_module32;
+ LDR_DATA_TABLE_ENTRY32 ldr_module32;
if (!get_ldr_module32(process, module, &ldr_module32))
return 0;
@@ -710,7 +710,7 @@ DWORD WINAPI K32GetModuleBaseNameA(HANDLE process, HMODULE module,
DWORD WINAPI K32GetModuleFileNameExW(HANDLE process, HMODULE module,
LPWSTR file_name, DWORD size)
{
- LDR_MODULE ldr_module;
+ LDR_DATA_TABLE_ENTRY ldr_module;
BOOL wow64;
DWORD len;
@@ -721,7 +721,7 @@ DWORD WINAPI K32GetModuleFileNameExW(HANDLE process, HMODULE module,
if (sizeof(void *) == 8 && wow64)
{
- LDR_MODULE32 ldr_module32;
+ LDR_DATA_TABLE_ENTRY32 ldr_module32;
if (!get_ldr_module32(process, module, &ldr_module32))
return 0;
@@ -805,7 +805,7 @@ DWORD WINAPI K32GetModuleFileNameExA(HANDLE process, HMODULE module,
BOOL WINAPI K32GetModuleInformation(HANDLE process, HMODULE module,
MODULEINFO *modinfo, DWORD cb)
{
- LDR_MODULE ldr_module;
+ LDR_DATA_TABLE_ENTRY ldr_module;
BOOL wow64;
if (cb < sizeof(MODULEINFO))
@@ -819,7 +819,7 @@ BOOL WINAPI K32GetModuleInformation(HANDLE process, HMODULE module,
if (sizeof(void *) == 8 && wow64)
{
- LDR_MODULE32 ldr_module32;
+ LDR_DATA_TABLE_ENTRY32 ldr_module32;
if (!get_ldr_module32(process, module, &ldr_module32))
return FALSE;
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 35c6b3c099..89496ac7e8 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -3807,7 +3807,7 @@ static void test_InMemoryOrderModuleList(void)
PEB_LDR_DATA *ldr = NtCurrentTeb()->Peb->LdrData;
LIST_ENTRY *entry1, *mark1 = &ldr->InLoadOrderModuleList;
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);
@@ -3815,8 +3815,8 @@ static void test_InMemoryOrderModuleList(void)
entry1 != mark1 && entry2 != mark2;
entry1 = entry1->Flink, entry2 = entry2->Flink)
{
- module1 = CONTAINING_RECORD(entry1, LDR_MODULE, InLoadOrderModuleList);
- module2 = CONTAINING_RECORD(entry2, LDR_MODULE, InMemoryOrderModuleList);
+ module1 = CONTAINING_RECORD(entry1, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
+ module2 = CONTAINING_RECORD(entry2, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
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);
diff --git a/dlls/kernel32/toolhelp.c b/dlls/kernel32/toolhelp.c
index 49e14ff6b3..2bfe964750 100644
--- a/dlls/kernel32/toolhelp.c
+++ b/dlls/kernel32/toolhelp.c
@@ -73,7 +73,7 @@ static WCHAR *fetch_string( HANDLE hProcess, UNICODE_STRING* us)
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;
PROCESS_BASIC_INFORMATION pbi;
@@ -109,19 +109,19 @@ static BOOL fetch_module( DWORD process, DWORD flags, LDR_MODULE** ldr_mod, ULON
while (curr != head)
{
if (!*num)
- *ldr_mod = HeapAlloc( GetProcessHeap(), 0, sizeof(LDR_MODULE) );
+ *ldr_mod = HeapAlloc( GetProcessHeap(), 0, sizeof(LDR_DATA_TABLE_ENTRY) );
else
*ldr_mod = HeapReAlloc( GetProcessHeap(), 0, *ldr_mod,
- (*num + 1) * sizeof(LDR_MODULE) );
+ (*num + 1) * sizeof(LDR_DATA_TABLE_ENTRY) );
if (!*ldr_mod) break;
if (!ReadProcessMemory( hProcess,
- CONTAINING_RECORD(curr, LDR_MODULE,
+ CONTAINING_RECORD(curr, LDR_DATA_TABLE_ENTRY,
InLoadOrderModuleList),
&(*ldr_mod)[*num],
- sizeof(LDR_MODULE), NULL))
+ sizeof(LDR_DATA_TABLE_ENTRY), NULL))
break;
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
*/
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,
- LDR_MODULE* ldr_mod, ULONG num )
+ LDR_DATA_TABLE_ENTRY* ldr_mod, ULONG num )
{
MODULEENTRY32W* mod;
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 )
{
SYSTEM_PROCESS_INFORMATION* spi = NULL;
- LDR_MODULE* mod = NULL;
+ LDR_DATA_TABLE_ENTRY *mod = NULL;
ULONG num_pcs, num_thd, num_mod;
HANDLE hSnapShot = 0;
diff --git a/dlls/kernelbase/loader.c b/dlls/kernelbase/loader.c
index 19aaabf726..4b615e4a08 100644
--- a/dlls/kernelbase/loader.c
+++ b/dlls/kernelbase/loader.c
@@ -301,7 +301,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetModuleFileNameW( HMODULE module, LPWSTR filena
{
ULONG len = 0;
ULONG_PTR magic;
- LDR_MODULE *pldr;
+ LDR_DATA_TABLE_ENTRY *pldr;
WIN16_SUBSYSTEM_TIB *win16_tib;
if (!module && ((win16_tib = NtCurrentTeb()->Tib.SubSystemTib)) && win16_tib->exe_name)
diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c
index 88485372ff..f1e1a14dd6 100644
--- a/dlls/krnl386.exe16/ne_module.c
+++ b/dlls/krnl386.exe16/ne_module.c
@@ -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 ((main_module = (void *)GetProcAddress( mod32, "__wine_spec_main_module" )))
{
- LDR_MODULE *ldr;
+ LDR_DATA_TABLE_ENTRY *ldr;
HMODULE main_owner = LoadLibraryA( main_module );
if (!main_owner)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index 1ca14827a7..b84372bd00 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -821,7 +821,7 @@ static NTSTATUS get_module_filename( HMODULE module, UNICODE_STRING *str, unsign
{
NTSTATUS status;
ULONG_PTR magic;
- LDR_MODULE *pldr;
+ LDR_DATA_TABLE_ENTRY *pldr;
LdrLockLoaderLock(0, NULL, &magic);
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))
{
ULONG_PTR magic;
- LDR_MODULE *pldr;
+ LDR_DATA_TABLE_ENTRY *pldr;
if (!*handle) return STATUS_INVALID_PARAMETER;
diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c
index 5df037b7ea..ed4c80025f 100644
--- a/dlls/ntdll/exception.c
+++ b/dlls/ntdll/exception.c
@@ -581,7 +581,7 @@ static RUNTIME_FUNCTION *find_function_info( ULONG_PTR pc, ULONG_PTR base,
/**********************************************************************
* 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;
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,
UNWIND_HISTORY_TABLE *table )
{
- LDR_MODULE *module;
+ LDR_DATA_TABLE_ENTRY *module;
RUNTIME_FUNCTION *func;
/* FIXME: should use the history table to make things faster */
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 04ea7ea121..676e5e650e 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -69,7 +69,7 @@ WINE_DECLARE_DEBUG_CHANNEL(imports);
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID ((ULONG_PTR)2)
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 */
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. */
typedef struct _wine_modref
{
- LDR_MODULE ldr;
+ LDR_DATA_TABLE_ENTRY ldr;
dev_t dev;
ino_t ino;
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 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];
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__ */
/* 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;
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 )
{
PLIST_ENTRY mark, entry;
- PLDR_MODULE mod;
+ PLDR_DATA_TABLE_ENTRY mod;
if (cached_modref && cached_modref->ldr.BaseAddress == hmod) return cached_modref;
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
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)
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;
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 ))
{
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;
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 ))
{
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;
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 );
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;
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 );
if (wm->so_handle == handle) return wm;
@@ -918,7 +918,7 @@ done:
/***********************************************************************
* 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;
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
* 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 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.
* 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;
ULONG i, size;
@@ -1070,7 +1070,7 @@ static SHORT alloc_tls_slot( LDR_MODULE *mod )
* Free the module TLS slot on unload.
* 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;
@@ -1526,7 +1526,7 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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_LOAD_IN_PROGRESS | LDR_PROCESS_ATTACHED)) continue;
@@ -1549,14 +1549,14 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved )
static void process_detach(void)
{
PLIST_ENTRY mark, entry;
- PLDR_MODULE mod;
+ PLDR_DATA_TABLE_ENTRY mod;
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
do
{
for (entry = mark->Blink; entry != mark; entry = entry->Blink)
{
- mod = CONTAINING_RECORD(entry, LDR_MODULE,
+ mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList);
/* Check whether to detach this DLL */
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
@@ -1587,12 +1587,12 @@ static void process_detach(void)
static void thread_attach(void)
{
PLIST_ENTRY mark, entry;
- PLDR_MODULE mod;
+ PLDR_DATA_TABLE_ENTRY mod;
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{
- mod = CONTAINING_RECORD(entry, LDR_MODULE,
+ mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList);
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue;
@@ -1630,15 +1630,15 @@ NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE hModule)
*
* 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;
- PLDR_MODULE mod;
+ PLDR_DATA_TABLE_ENTRY mod;
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
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 &&
(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 )
{
LIST_ENTRY *mark, *entry;
- LDR_MODULE *mod;
+ LDR_DATA_TABLE_ENTRY *mod;
BOOLEAN stop = FALSE;
TRACE( "(%p, %p, %p)\n", unknown, callback, context );
@@ -1668,7 +1668,7 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback,
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
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 );
if (stop) break;
}
@@ -3483,7 +3483,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
ANSI_STRING str;
char* ptr;
PLIST_ENTRY mark, entry;
- PLDR_MODULE mod;
+ LDR_DATA_TABLE_ENTRY *mod;
WORD id = 0;
smi->ModulesCount = 0;
@@ -3492,7 +3492,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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);
if (size <= buf_size)
{
@@ -3743,7 +3743,7 @@ void WINAPI RtlExitUserProcess( DWORD status )
void WINAPI LdrShutdownThread(void)
{
PLIST_ENTRY mark, entry;
- PLDR_MODULE mod;
+ LDR_DATA_TABLE_ENTRY *mod;
UINT i;
void **pointers;
@@ -3757,7 +3757,7 @@ void WINAPI LdrShutdownThread(void)
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
for (entry = mark->Blink; entry != mark; entry = entry->Blink)
{
- mod = CONTAINING_RECORD(entry, LDR_MODULE,
+ mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList);
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue;
@@ -3828,13 +3828,13 @@ static void free_modref( WINE_MODREF *wm )
static void MODULE_FlushModrefs(void)
{
PLIST_ENTRY mark, entry, prev;
- PLDR_MODULE mod;
+ LDR_DATA_TABLE_ENTRY *mod;
WINE_MODREF*wm;
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
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);
prev = entry->Blink;
if (!mod->LoadCount) free_modref( wm );
@@ -3844,7 +3844,7 @@ static void MODULE_FlushModrefs(void)
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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);
prev = entry->Blink;
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 )
{
- LDR_MODULE *module;
+ LDR_DATA_TABLE_ENTRY *module;
PVOID ret = NULL;
RtlEnterCriticalSection( &loader_section );
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 0ae696b7f2..cbb3f6d93d 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -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;
#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
/* debug helpers */
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
index 031c271846..15e78dbb56 100644
--- a/dlls/ntdll/signal_arm64.c
+++ b/dlls/ntdll/signal_arm64.c
@@ -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 )
{
- LDR_MODULE *module;
+ LDR_DATA_TABLE_ENTRY *module;
NTSTATUS status;
dispatch->ImageBase = 0;
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 89caca9f30..2f9c3dae22 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -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 )
{
- LDR_MODULE *module;
+ LDR_DATA_TABLE_ENTRY *module;
NTSTATUS status;
dispatch->ImageBase = 0;
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index 445f3538d8..b8e30bd947 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -3329,7 +3329,7 @@ struct ldr_enum_context
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};
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_THUNK_DATA *import_list;
IMAGE_THUNK_DATA *thunk_list;
+ LDR_DATA_TABLE_ENTRY *mod;
DWORD *calls = context;
LIST_ENTRY *mark;
- LDR_MODULE *mod;
ULONG size;
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 */
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",
data->Loaded.DllBase, mod->BaseAddress);
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;
LIST_ENTRY *mark;
- LDR_MODULE *mod;
+ LDR_DATA_TABLE_ENTRY *mod;
*calls <<= 4;
*calls |= reason;
@@ -3516,7 +3516,7 @@ static void CALLBACK ldr_notify_callback_dll_main(ULONG reason, LDR_DLL_NOTIFICA
return;
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",
data->Loaded.DllBase, mod->BaseAddress);
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;
LIST_ENTRY *mark;
- LDR_MODULE *mod;
+ LDR_DATA_TABLE_ENTRY *mod;
*calls <<= 4;
*calls |= reason;
@@ -3555,7 +3555,7 @@ static void CALLBACK ldr_notify_callback_fail(ULONG reason, LDR_DLL_NOTIFICATION
return;
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",
data->Loaded.DllBase, mod->BaseAddress);
if (mod->BaseAddress != data->Loaded.DllBase)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 4ad5160328..89241d30b4 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -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 );
SERVICE_STATUS_HANDLE service_handle = driver->service_handle;
- LDR_MODULE *ldr;
+ LDR_DATA_TABLE_ENTRY *ldr;
if (!service_handle) return; /* not a service */
@@ -3304,10 +3304,10 @@ error:
return STATUS_UNSUCCESSFUL;
}
-/* find the LDR_MODULE corresponding to the driver module */
-static LDR_MODULE *find_ldr_module( HMODULE module )
+/* find the LDR_DATA_TABLE_ENTRY corresponding to the driver module */
+static LDR_DATA_TABLE_ENTRY *find_ldr_module( HMODULE module )
{
- LDR_MODULE *ldr;
+ LDR_DATA_TABLE_ENTRY *ldr;
ULONG_PTR magic;
LdrLockLoaderLock( 0, NULL, &magic );
diff --git a/include/winternl.h b/include/winternl.h
index f36419da78..0fa5485596 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2317,7 +2317,7 @@ typedef enum _LDR_DLL_LOAD_REASON
LoadReasonUnknown = -1
} LDR_DLL_LOAD_REASON, *PLDR_DLL_LOAD_REASON;
-typedef struct _LDR_MODULE
+typedef struct _LDR_DATA_TABLE_ENTRY
{
LIST_ENTRY InLoadOrderModuleList;
LIST_ENTRY InMemoryOrderModuleList;
@@ -2348,7 +2348,7 @@ typedef struct _LDR_MODULE
LDR_DLL_LOAD_REASON LoadReason;
ULONG ImplicitPathOptions;
ULONG ReferenceCount;
-} LDR_MODULE, *PLDR_MODULE;
+} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
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*);
-/* 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_LOAD_IN_PROGRESS 0x00001000
#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 LdrAddRefDll(ULONG,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 LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**);
NTSYSAPI NTSTATUS WINAPI LdrGetDllDirectory(UNICODE_STRING*);
diff --git a/programs/winedbg/symbol.c b/programs/winedbg/symbol.c
index 372ae76c33..6f92362d44 100644
--- a/programs/winedbg/symbol.c
+++ b/programs/winedbg/symbol.c
@@ -144,7 +144,7 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base,
PEB peb;
PEB_LDR_DATA ldr_data;
PLIST_ENTRY head, current;
- LDR_MODULE ldr_module;
+ LDR_DATA_TABLE_ENTRY ldr_module;
unsigned tlsindex = -1;
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;
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;
if ((DWORD_PTR)ldr_module.BaseAddress == sym->ModBase)
{
diff --git a/tools/winapi/win32.api b/tools/winapi/win32.api
index 3a4557a719..ed14ecc034 100644
--- a/tools/winapi/win32.api
+++ b/tools/winapi/win32.api
@@ -3408,7 +3408,7 @@ PIO_APC_ROUTINE
PIO_STATUS_BLOCK
PKEY_MULTIPLE_VALUE_INFORMATION
PLARGE_INTEGER
-PLDR_MODULE *
+PLDR_DATA_TABLE_ENTRY *
PLONG
PLPC_MESSAGE
PLPC_SECTION_READ
--
2.26.2