41e996c17b18d0967aacb7f7f0011550d95ea922
[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
25 /* ldrinit.c */
26 NTSTATUS NTAPI LdrpInitializeTls(VOID);
27 NTSTATUS NTAPI LdrpAllocateTls(VOID);
28 VOID NTAPI LdrpFreeTls(VOID);
29 VOID NTAPI LdrpTlsCallback(PVOID BaseAddress, ULONG Reason);
30 BOOLEAN NTAPI LdrpCallDllEntry(PDLLMAIN_FUNC EntryPoint, PVOID BaseAddress, ULONG Reason, PVOID Context);
31
32
33 /* FIXME: Cleanup this mess */
34 typedef NTSTATUS (NTAPI *PEPFUNC)(PPEB);
35 NTSTATUS LdrMapSections(HANDLE ProcessHandle,
36 PVOID ImageBase,
37 HANDLE SectionHandle,
38 PIMAGE_NT_HEADERS NTHeaders);
39 NTSTATUS LdrMapNTDllForProcess(HANDLE ProcessHandle,
40 PHANDLE NTDllSectionHandle);
41 BOOLEAN LdrMappedAsDataFile(PVOID *BaseAddress);
42 ULONG
43 LdrpGetResidentSize(PIMAGE_NT_HEADERS NTHeaders);
44 PEPFUNC LdrPEStartup (PVOID ImageBase,
45 HANDLE SectionHandle,
46 PLDR_DATA_TABLE_ENTRY* Module,
47 PWSTR FullDosName);
48
49 extern HANDLE WindowsApiPort;
50
51 /* EOF */