3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Provides routines for loading PE files.
5 * (Deprecated remark) To be merged with arch/i386/loader.c in future.
7 * COPYRIGHT: Copyright 1998-2003 Brian Palmer <brianp@sginet.com>
8 * Copyright 2006-2019 Aleksey Bragin <aleksey@reactos.org>
10 * NOTES: The source code in this file is based on the work of respective
11 * authors of PE loading code in ReactOS and Brian Palmer and
12 * Alex Ionescu's arch/i386/loader.c, and my research project
13 * (creating a native EFI loader for Windows).
15 * This article was very handy during development:
16 * http://msdn.microsoft.com/msdnmag/issues/02/03/PE2/
22 WinLdrLoadImage(IN PCHAR FileName
,
23 TYPE_OF_MEMORY MemoryType
,
24 OUT PVOID
*ImageBasePA
);
27 WinLdrAllocateDataTableEntry(IN OUT PLIST_ENTRY ModuleListHead
,
31 OUT PLDR_DATA_TABLE_ENTRY
*NewEntry
);
34 WinLdrScanImportDescriptorTable(IN OUT PLIST_ENTRY ModuleListHead
,
35 IN PCCH DirectoryPath
,
36 IN PLDR_DATA_TABLE_ENTRY ScanDTE
);
39 WinLdrCheckForLoadedDll(IN OUT PLIST_ENTRY ModuleListHead
,
41 OUT PLDR_DATA_TABLE_ENTRY
*LoadedEntry
);