Commit 39a35490 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ntdll: Implement LdrGetDllFullName() function.

Based on a patch by Alex Henrie. Signed-off-by: 's avatarPaul Gofman <pgofman@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 50bc449a
......@@ -1278,7 +1278,7 @@ static void test_LdrGetDllFullName(void)
if (!pLdrGetDllFullName)
{
skip( "LdrGetDllFullName not available.\n" );
win_skip( "LdrGetDllFullName not available.\n" );
return;
}
......
......@@ -2996,6 +2996,32 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH LdrLoadDll(LPCWSTR path_name, DWORD flags,
/******************************************************************
* LdrGetDllFullName (NTDLL.@)
*/
NTSTATUS WINAPI LdrGetDllFullName( HMODULE module, UNICODE_STRING *name )
{
WINE_MODREF *wm;
NTSTATUS status;
TRACE( "module %p, name %p.\n", module, name );
if (!module) module = NtCurrentTeb()->Peb->ImageBaseAddress;
RtlEnterCriticalSection( &loader_section );
wm = get_modref( module );
if (wm)
{
RtlCopyUnicodeString( name, &wm->ldr.FullDllName );
if (name->MaximumLength < wm->ldr.FullDllName.Length + sizeof(WCHAR)) status = STATUS_BUFFER_TOO_SMALL;
else status = STATUS_SUCCESS;
} else status = STATUS_DLL_NOT_FOUND;
RtlLeaveCriticalSection( &loader_section );
return status;
}
/******************************************************************
* LdrGetDllHandleEx (NTDLL.@)
*/
NTSTATUS WINAPI LdrGetDllHandleEx( ULONG flags, LPCWSTR load_path, ULONG *dll_characteristics,
......
......@@ -87,6 +87,7 @@
@ stdcall LdrFindResource_U(long ptr long ptr)
@ stub LdrFlushAlternateResourceModules
@ stdcall LdrGetDllDirectory(ptr)
@ stdcall LdrGetDllFullName(long ptr)
@ stdcall LdrGetDllHandle(wstr long ptr ptr)
@ stdcall LdrGetDllHandleEx(long ptr ptr ptr ptr)
# @ stub LdrGetDllHandleEx
......
......@@ -3784,6 +3784,7 @@ NTSYSAPI NTSTATUS WINAPI LdrGetDllDirectory(UNICODE_STRING*);
NTSYSAPI NTSTATUS WINAPI LdrGetDllHandle(LPCWSTR, ULONG, const UNICODE_STRING*, HMODULE*);
NTSYSAPI NTSTATUS WINAPI LdrGetDllHandleEx(ULONG, LPCWSTR, ULONG *, const UNICODE_STRING*, HMODULE*);
NTSYSAPI NTSTATUS WINAPI LdrGetDllPath(PCWSTR,ULONG,PWSTR*,PWSTR*);
NTSYSAPI NTSTATUS WINAPI LdrGetDllFullName(HMODULE, UNICODE_STRING*);
NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**);
NTSYSAPI NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
NTSYSAPI NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG_PTR*);
......
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