9d60d20cc6efff77a7a3ca04316bbde2c8aecf28
[reactos.git] / reactos / include / ndk / ldrtypes.h
1 /*++ NDK Version: 0095
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 ldrtypes.h
8
9 Abstract:
10
11 Type definitions for the Loader.
12
13 Author:
14
15 Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
16
17 --*/
18
19 #ifndef _LDRTYPES_H
20 #define _LDRTYPES_H
21
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26
27 //
28 // Resource Type Levels
29 //
30 #define RESOURCE_TYPE_LEVEL 0
31 #define RESOURCE_NAME_LEVEL 1
32 #define RESOURCE_LANGUAGE_LEVEL 2
33 #define RESOURCE_DATA_LEVEL 3
34
35 //
36 // Loader Data Table Entry Flags
37 //
38 #define LDRP_STATIC_LINK 0x00000002
39 #define LDRP_IMAGE_DLL 0x00000004
40 #define LDRP_LOAD_IN_PROGRESS 0x00001000
41 #define LDRP_UNLOAD_IN_PROGRESS 0x00002000
42 #define LDRP_ENTRY_PROCESSED 0x00004000
43 #define LDRP_ENTRY_INSERTED 0x00008000
44 #define LDRP_CURRENT_LOAD 0x00010000
45 #define LDRP_FAILED_BUILTIN_LOAD 0x00020000
46 #define LDRP_DONT_CALL_FOR_THREADS 0x00040000
47 #define LDRP_PROCESS_ATTACH_CALLED 0x00080000
48 #define LDRP_DEBUG_SYMBOLS_LOADED 0x00100000
49 #define LDRP_IMAGE_NOT_AT_BASE 0x00200000
50 #define LDRP_COR_IMAGE 0x00400000
51 #define LDR_COR_OWNS_UNMAP 0x00800000
52 #define LDRP_REDIRECTED 0x10000000
53
54 //
55 // Loader Data stored in the PEB
56 //
57 typedef struct _PEB_LDR_DATA
58 {
59 ULONG Length;
60 BOOLEAN Initialized;
61 PVOID SsHandle;
62 LIST_ENTRY InLoadOrderModuleList;
63 LIST_ENTRY InMemoryOrderModuleList;
64 LIST_ENTRY InInitializationOrderModuleList;
65 PVOID EntryInProgress;
66 } PEB_LDR_DATA, *PPEB_LDR_DATA;
67
68 //
69 // Loader Data Table Entry
70 //
71 typedef struct _LDR_DATA_TABLE_ENTRY
72 {
73 LIST_ENTRY InLoadOrderModuleList;
74 LIST_ENTRY InMemoryOrderModuleList;
75 LIST_ENTRY InInitializationOrderModuleList;
76 PVOID DllBase;
77 PVOID EntryPoint;
78 ULONG SizeOfImage;
79 UNICODE_STRING FullDllName;
80 UNICODE_STRING BaseDllName;
81 ULONG Flags;
82 USHORT LoadCount;
83 USHORT TlsIndex;
84 union
85 {
86 LIST_ENTRY HashLinks;
87 PVOID SectionPointer;
88 };
89 ULONG CheckSum;
90 union
91 {
92 ULONG TimeDateStamp;
93 PVOID LoadedImports;
94 };
95 PVOID EntryPointActivationContext;
96 PVOID PatchInformation;
97 } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
98
99 //
100 // Loader Resource Information
101 //
102 typedef struct _LDR_RESOURCE_INFO
103 {
104 ULONG Type;
105 ULONG Name;
106 ULONG Language;
107 } LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
108
109 //
110 // LdrAddRef Flags
111 //
112 #define LDR_PIN_MODULE 0x00000001
113
114 #endif