[NTDLL/LDR]
[reactos.git] / reactos / dll / ntdll / include / ntdllp.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS System Libraries
4 * FILE: dll/ntdll/include/ntdllp.h
5 * PURPOSE: Native Libary Internal Header
6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7 */
8
9 /* INCLUDES ******************************************************************/
10
11 extern BOOLEAN ShowSnaps;
12
13 typedef struct _LDRP_TLS_DATA
14 {
15 LIST_ENTRY TlsLinks;
16 IMAGE_TLS_DIRECTORY TlsDirectory;
17 } LDRP_TLS_DATA, *PLDRP_TLS_DATA;
18
19 typedef BOOL
20 (NTAPI *PDLLMAIN_FUNC)(HANDLE hInst,
21 ULONG ul_reason_for_call,
22 LPVOID lpReserved);
23
24 /* Global data */
25 extern RTL_CRITICAL_SECTION LdrpLoaderLock;
26
27 /* ldrinit.c */
28 NTSTATUS NTAPI LdrpInitializeTls(VOID);
29 NTSTATUS NTAPI LdrpAllocateTls(VOID);
30 VOID NTAPI LdrpFreeTls(VOID);
31 VOID NTAPI LdrpTlsCallback(PVOID BaseAddress, ULONG Reason);
32 BOOLEAN NTAPI LdrpCallDllEntry(PDLLMAIN_FUNC EntryPoint, PVOID BaseAddress, ULONG Reason, PVOID Context);
33
34
35 /* FIXME: Cleanup this mess */
36 typedef NTSTATUS (NTAPI *PEPFUNC)(PPEB);
37 NTSTATUS LdrMapSections(HANDLE ProcessHandle,
38 PVOID ImageBase,
39 HANDLE SectionHandle,
40 PIMAGE_NT_HEADERS NTHeaders);
41 NTSTATUS LdrMapNTDllForProcess(HANDLE ProcessHandle,
42 PHANDLE NTDllSectionHandle);
43 BOOLEAN LdrMappedAsDataFile(PVOID *BaseAddress);
44 ULONG
45 LdrpGetResidentSize(PIMAGE_NT_HEADERS NTHeaders);
46 PEPFUNC LdrPEStartup (PVOID ImageBase,
47 HANDLE SectionHandle,
48 PLDR_DATA_TABLE_ENTRY* Module,
49 PWSTR FullDosName);
50
51 extern HANDLE WindowsApiPort;
52
53 /* EOF */