Commit 09db718d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

include: Rename BaseAddress to DllBase.

To match Microsoft's public definition. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 4b3e820e
......@@ -507,7 +507,7 @@ static BOOL get_ldr_module(HANDLE process, HMODULE module, LDR_DATA_TABLE_ENTRY
while ((ret = module_iterator_next(&iter)) > 0)
/* When hModule is NULL we return the process image - which will be
* the first module since our iterator uses InLoadOrderModuleList */
if (!module || module == iter.ldr_module.BaseAddress)
if (!module || module == iter.ldr_module.DllBase)
{
*ldr_module = iter.ldr_module;
return TRUE;
......@@ -572,7 +572,7 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
((PBYTE)entry - offsetof(LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList));
if (cb >= sizeof(HMODULE))
{
*lphModule++ = table_entry->BaseAddress;
*lphModule++ = table_entry->DllBase;
cb -= sizeof(HMODULE);
}
size += sizeof(HMODULE);
......@@ -605,7 +605,7 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
if (sizeof(void *) == 8 && iter.wow64)
*lphModule++ = (HMODULE) (DWORD_PTR)iter.ldr_module32.BaseAddress;
else
*lphModule++ = iter.ldr_module.BaseAddress;
*lphModule++ = iter.ldr_module.DllBase;
cb -= sizeof(HMODULE);
}
size += sizeof(HMODULE);
......@@ -833,7 +833,7 @@ BOOL WINAPI K32GetModuleInformation(HANDLE process, HMODULE module,
if (!get_ldr_module(process, module, &ldr_module))
return FALSE;
modinfo->lpBaseOfDll = ldr_module.BaseAddress;
modinfo->lpBaseOfDll = ldr_module.DllBase;
modinfo->SizeOfImage = ldr_module.SizeOfImage;
modinfo->EntryPoint = ldr_module.EntryPoint;
}
......
......@@ -160,9 +160,9 @@ static void fill_module( struct snapshot* snap, ULONG* offset, ULONG process,
mod->th32ProcessID = process ? process : GetCurrentProcessId();
mod->GlblcntUsage = 0xFFFF; /* FIXME */
mod->ProccntUsage = 0xFFFF; /* FIXME */
mod->modBaseAddr = ldr_mod[i].BaseAddress;
mod->modBaseAddr = ldr_mod[i].DllBase;
mod->modBaseSize = ldr_mod[i].SizeOfImage;
mod->hModule = ldr_mod[i].BaseAddress;
mod->hModule = ldr_mod[i].DllBase;
l = min(ldr_mod[i].BaseDllName.Length, sizeof(mod->szModule) - sizeof(WCHAR));
memcpy(mod->szModule, ldr_mod[i].BaseDllName.Buffer, l);
......
......@@ -3382,7 +3382,7 @@ static NTSTATUS find_query_actctx( HANDLE *handle, DWORD flags, ULONG class )
LdrLockLoaderLock( 0, NULL, &magic );
if (!LdrFindEntryForAddress( *handle, &pldr ))
{
if ((flags & QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE) && *handle != pldr->BaseAddress)
if ((flags & QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE) && *handle != pldr->DllBase)
status = STATUS_DLL_NOT_FOUND;
else
*handle = pldr->ActivationContext;
......
......@@ -590,12 +590,12 @@ RUNTIME_FUNCTION *lookup_function_info( ULONG_PTR pc, ULONG_PTR *base, LDR_DATA_
/* PE module or wine module */
if (!LdrFindEntryForAddress( (void *)pc, module ))
{
*base = (ULONG_PTR)(*module)->BaseAddress;
if ((func = RtlImageDirectoryEntryToData( (*module)->BaseAddress, TRUE,
*base = (ULONG_PTR)(*module)->DllBase;
if ((func = RtlImageDirectoryEntryToData( (*module)->DllBase, TRUE,
IMAGE_DIRECTORY_ENTRY_EXCEPTION, &size )))
{
/* lookup in function table */
func = find_function_info( pc, (ULONG_PTR)(*module)->BaseAddress, func, size/sizeof(*func) );
func = find_function_info( pc, (ULONG_PTR)(*module)->DllBase, func, size/sizeof(*func) );
}
}
else
......
......@@ -3456,8 +3456,8 @@ 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_DATA_TABLE_ENTRY, InMemoryOrderLinks);
ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->BaseAddress);
ok(mod->DllBase == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->DllBase);
ok(!lstrcmpiW(mod->BaseDllName.Buffer, expected_dll), "Expected %s, got %s\n",
wine_dbgstr_w(expected_dll), wine_dbgstr_w(mod->BaseDllName.Buffer));
......@@ -3517,9 +3517,9 @@ static void CALLBACK ldr_notify_callback_dll_main(ULONG reason, LDR_DLL_NOTIFICA
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->BaseAddress);
if (mod->BaseAddress != data->Loaded.DllBase)
ok(mod->DllBase == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->DllBase);
if (mod->DllBase != data->Loaded.DllBase)
return;
orig_entry = mod->EntryPoint;
......@@ -3556,9 +3556,9 @@ static void CALLBACK ldr_notify_callback_fail(ULONG reason, LDR_DLL_NOTIFICATION
mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->BaseAddress);
if (mod->BaseAddress != data->Loaded.DllBase)
ok(mod->DllBase == data->Loaded.DllBase, "Expected base address %p, got %p\n",
data->Loaded.DllBase, mod->DllBase);
if (mod->DllBase != data->Loaded.DllBase)
return;
orig_entry = mod->EntryPoint;
......
......@@ -825,7 +825,7 @@ static void unload_driver( struct wine_rb_entry *entry, void *context )
TRACE_(relay)( "\1Ret driver unload %p (obj=%p)\n", driver->driver_obj.DriverUnload, &driver->driver_obj );
FreeLibrary( ldr->BaseAddress );
FreeLibrary( ldr->DllBase );
IoDeleteDriver( &driver->driver_obj );
set_service_status( service_handle, SERVICE_STOPPED, 0 );
......
......@@ -2322,7 +2322,7 @@ typedef struct _LDR_DATA_TABLE_ENTRY
LIST_ENTRY InLoadOrderModuleList;
LIST_ENTRY InMemoryOrderLinks;
LIST_ENTRY InInitializationOrderModuleList;
void* BaseAddress;
void* DllBase;
void* EntryPoint;
ULONG SizeOfImage;
UNICODE_STRING FullDllName;
......
......@@ -167,7 +167,7 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base,
{
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)
if ((DWORD_PTR)ldr_module.DllBase == sym->ModBase)
{
tlsindex = ldr_module.TlsIndex;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment