pointer to PEB becomes first parameter in call to NtProcessStartup
[reactos.git] / reactos / include / ntdll / ldr.h
1 typedef NTSTATUS (*PEPFUNC)(PPEB);
2
3 typedef struct _DLL
4 {
5 PIMAGE_NT_HEADERS Headers;
6 PVOID BaseAddress;
7 HANDLE SectionHandle;
8 struct _DLL* Prev;
9 struct _DLL* Next;
10 UINT ReferenceCount;
11 } DLL, *PDLL;
12
13 #define RVA(m, b) ((ULONG)b + m)
14
15 extern DLL LdrDllListHead;
16
17 PEPFUNC LdrPEStartup(PVOID ImageBase, HANDLE SectionHandle);
18 NTSTATUS LdrMapSections(HANDLE ProcessHandle,
19 PVOID ImageBase,
20 HANDLE SectionHandle,
21 PIMAGE_NT_HEADERS NTHeaders);
22 NTSTATUS LdrMapNTDllForProcess(HANDLE ProcessHandle,
23 PHANDLE NTDllSectionHandle);
24
25 NTSTATUS
26 LdrLoadDll (PDLL* Dll,PCHAR Name);
27
28 NTSTATUS LdrUnloadDll(PDLL Dll);
29
30
31 PVOID
32 LdrGetExportByOrdinal (PDLL Module, ULONG Ordinal );
33
34 PVOID
35 LdrGetExportByName (PDLL Module, PUCHAR SymbolName );