[FREELDR] Move files where they are only used.
[reactos.git] / boot / freeldr / freeldr / include / peloader.h
1 /*
2 * PROJECT: FreeLoader
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.
6 *
7 * COPYRIGHT: Copyright 1998-2003 Brian Palmer <brianp@sginet.com>
8 * Copyright 2006-2019 Aleksey Bragin <aleksey@reactos.org>
9 *
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).
14 *
15 * This article was very handy during development:
16 * http://msdn.microsoft.com/msdnmag/issues/02/03/PE2/
17 */
18
19 #pragma once
20
21 BOOLEAN
22 WinLdrLoadImage(IN PCHAR FileName,
23 TYPE_OF_MEMORY MemoryType,
24 OUT PVOID *ImageBasePA);
25
26 BOOLEAN
27 WinLdrAllocateDataTableEntry(IN OUT PLIST_ENTRY ModuleListHead,
28 IN PCCH BaseDllName,
29 IN PCCH FullDllName,
30 IN PVOID BasePA,
31 OUT PLDR_DATA_TABLE_ENTRY *NewEntry);
32
33 BOOLEAN
34 WinLdrScanImportDescriptorTable(IN OUT PLIST_ENTRY ModuleListHead,
35 IN PCCH DirectoryPath,
36 IN PLDR_DATA_TABLE_ENTRY ScanDTE);
37
38 BOOLEAN
39 WinLdrCheckForLoadedDll(IN OUT PLIST_ENTRY ModuleListHead,
40 IN PCH DllName,
41 OUT PLDR_DATA_TABLE_ENTRY *LoadedEntry);