*nix newlines throughout file fixed.
[reactos.git] / reactos / include / ntdll / ldr.h
index 5bad54e..1112626 100644 (file)
-#ifndef __NTOSKRNL_INCLUDE_INTERNAL_LDR_H\r
-#define __NTOSKRNL_INCLUDE_INTERNAL_LDR_H\r
-\r
-#include <ntos/kdbgsyms.h>\r
-#include <roscfg.h>\r
-#include <napi/teb.h>\r
-\r
-typedef NTSTATUS STDCALL (*PEPFUNC)(PPEB);\r
-\r
-/* Type for a DLL's entry point */\r
-typedef BOOL STDCALL\r
-(* PDLLMAIN_FUNC)(HANDLE hInst,\r
-                 ULONG ul_reason_for_call,\r
-                 LPVOID lpReserved);\r
-\r
-typedef struct _LDR_MODULE\r
-{\r
-   LIST_ENTRY     InLoadOrderModuleList;\r
-   LIST_ENTRY     InMemoryOrderModuleList;             // not used\r
-   LIST_ENTRY     InInitializationOrderModuleList;     // not used\r
-   PVOID          BaseAddress;\r
-   ULONG          EntryPoint;\r
-   ULONG          SizeOfImage;\r
-   UNICODE_STRING FullDllName;\r
-   UNICODE_STRING BaseDllName;\r
-   ULONG          Flags;\r
-   SHORT          LoadCount;\r
-   SHORT          TlsIndex;\r
-   HANDLE         SectionHandle;\r
-   ULONG          CheckSum;\r
-   ULONG          TimeDateStamp;\r
-#ifdef KDBG\r
-  IMAGE_SYMBOL_INFO SymbolInfo;\r
-#endif /* KDBG */\r
-} LDR_MODULE, *PLDR_MODULE;\r
-\r
-typedef struct _LDR_SYMBOL_INFO {\r
-  PLDR_MODULE ModuleObject;\r
-  ULONG_PTR ImageBase;\r
-  PVOID SymbolsBuffer;\r
-  ULONG SymbolsBufferLength;\r
-  PVOID SymbolStringsBuffer;\r
-  ULONG SymbolStringsBufferLength;\r
-} LDR_SYMBOL_INFO, *PLDR_SYMBOL_INFO;\r
-\r
-\r
-#define RVA(m, b) ((ULONG)b + m)\r
-\r
-\r
-typedef struct _MODULE_ENTRY\r
-{\r
-  ULONG Unknown0;\r
-  ULONG Unknown1;\r
-  PVOID BaseAddress;\r
-  ULONG SizeOfImage;\r
-  ULONG Flags;\r
-  USHORT Unknown2;\r
-  USHORT Unknown3;\r
-  SHORT LoadCount;\r
-  USHORT PathLength;\r
-  CHAR ModuleName[256];\r
-} MODULE_ENTRY, *PMODULE_ENTRY;\r
-\r
-typedef struct _MODULE_INFORMATION\r
-{\r
-  ULONG ModuleCount;\r
-  MODULE_ENTRY ModuleEntry[1];\r
-} MODULE_INFORMATION, *PMODULE_INFORMATION;\r
-\r
-#ifdef KDBG\r
-\r
-VOID\r
-LdrpLoadUserModuleSymbols(PLDR_MODULE LdrModule);\r
-\r
-#endif\r
-\r
-PEPFUNC LdrPEStartup (PVOID  ImageBase,\r
-                     HANDLE SectionHandle,\r
-                     PLDR_MODULE* Module,\r
-                     PWSTR FullDosName);\r
-NTSTATUS LdrMapSections(HANDLE ProcessHandle,\r
-                       PVOID ImageBase,\r
-                       HANDLE SectionHandle,\r
-                       PIMAGE_NT_HEADERS NTHeaders);\r
-NTSTATUS LdrMapNTDllForProcess(HANDLE ProcessHandle,\r
-                              PHANDLE NTDllSectionHandle);\r
-\r
-\r
-NTSTATUS STDCALL\r
-LdrDisableThreadCalloutsForDll(IN PVOID BaseAddress);\r
-\r
-NTSTATUS STDCALL\r
-LdrGetDllHandle(IN ULONG Unknown1,\r
-               IN ULONG Unknown2,\r
-               IN PUNICODE_STRING DllName,\r
-               OUT PVOID *BaseAddress);\r
-\r
-NTSTATUS STDCALL\r
-LdrFindEntryForAddress(PVOID Address,\r
-                      PLDR_MODULE *Module);\r
-\r
-NTSTATUS STDCALL\r
-LdrGetProcedureAddress(IN PVOID BaseAddress,\r
-                      IN PANSI_STRING Name,\r
-                      IN ULONG Ordinal,\r
-                      OUT PVOID *ProcedureAddress);\r
-\r
-VOID STDCALL\r
-LdrInitializeThunk(ULONG Unknown1,\r
-                  ULONG Unknown2,\r
-                  ULONG Unknown3,\r
-                  ULONG Unknown4);\r
-\r
-NTSTATUS STDCALL\r
-LdrLoadDll(IN PWSTR SearchPath OPTIONAL,\r
-          IN ULONG LoadFlags,\r
-          IN PUNICODE_STRING Name,\r
-          OUT PVOID *BaseAddress OPTIONAL);\r
-\r
-NTSTATUS STDCALL\r
-LdrQueryProcessModuleInformation(IN PMODULE_INFORMATION ModuleInformation OPTIONAL,\r
-                                IN ULONG Size OPTIONAL,\r
-                                OUT PULONG ReturnedSize);\r
-\r
-NTSTATUS STDCALL\r
-LdrShutdownProcess(VOID);\r
-\r
-NTSTATUS STDCALL\r
-LdrShutdownThread(VOID);\r
-\r
-NTSTATUS STDCALL\r
-LdrUnloadDll(IN PVOID BaseAddress);\r
-\r
-#endif /* __NTOSKRNL_INCLUDE_INTERNAL_LDR_H */\r
-\r
-/* EOF */\r
+#ifndef __NTOSKRNL_INCLUDE_INTERNAL_LDR_H
+#define __NTOSKRNL_INCLUDE_INTERNAL_LDR_H
+
+#include <ntos/kdbgsyms.h>
+#include <roscfg.h>
+#include <napi/teb.h>
+
+typedef NTSTATUS STDCALL (*PEPFUNC)(PPEB);
+
+/* Type for a DLL's entry point */
+typedef BOOL STDCALL
+(* PDLLMAIN_FUNC)(HANDLE hInst,
+                 ULONG ul_reason_for_call,
+                 LPVOID lpReserved);
+
+typedef struct _LDR_MODULE
+{
+   LIST_ENTRY     InLoadOrderModuleList;
+   LIST_ENTRY     InMemoryOrderModuleList;             // not used
+   LIST_ENTRY     InInitializationOrderModuleList;     // not used
+   PVOID          BaseAddress;
+   ULONG          EntryPoint;
+   ULONG          SizeOfImage;
+   UNICODE_STRING FullDllName;
+   UNICODE_STRING BaseDllName;
+   ULONG          Flags;
+   SHORT          LoadCount;
+   SHORT          TlsIndex;
+   HANDLE         SectionHandle;
+   ULONG          CheckSum;
+   ULONG          TimeDateStamp;
+#ifdef KDBG
+  IMAGE_SYMBOL_INFO SymbolInfo;
+#endif /* KDBG */
+} LDR_MODULE, *PLDR_MODULE;
+
+typedef struct _LDR_SYMBOL_INFO {
+  PLDR_MODULE ModuleObject;
+  ULONG_PTR ImageBase;
+  PVOID SymbolsBuffer;
+  ULONG SymbolsBufferLength;
+  PVOID SymbolStringsBuffer;
+  ULONG SymbolStringsBufferLength;
+} LDR_SYMBOL_INFO, *PLDR_SYMBOL_INFO;
+
+
+#define RVA(m, b) ((ULONG)b + m)
+
+
+typedef struct _MODULE_ENTRY
+{
+  ULONG Unknown0;
+  ULONG Unknown1;
+  PVOID BaseAddress;
+  ULONG SizeOfImage;
+  ULONG Flags;
+  USHORT Unknown2;
+  USHORT Unknown3;
+  SHORT LoadCount;
+  USHORT PathLength;
+  CHAR ModuleName[256];
+} MODULE_ENTRY, *PMODULE_ENTRY;
+
+typedef struct _MODULE_INFORMATION
+{
+  ULONG ModuleCount;
+  MODULE_ENTRY ModuleEntry[1];
+} MODULE_INFORMATION, *PMODULE_INFORMATION;
+
+#ifdef KDBG
+
+VOID
+LdrpLoadUserModuleSymbols(PLDR_MODULE LdrModule);
+
+#endif
+
+PEPFUNC LdrPEStartup (PVOID  ImageBase,
+                     HANDLE SectionHandle,
+                     PLDR_MODULE* Module,
+                     PWSTR FullDosName);
+NTSTATUS LdrMapSections(HANDLE ProcessHandle,
+                       PVOID ImageBase,
+                       HANDLE SectionHandle,
+                       PIMAGE_NT_HEADERS NTHeaders);
+NTSTATUS LdrMapNTDllForProcess(HANDLE ProcessHandle,
+                              PHANDLE NTDllSectionHandle);
+
+
+NTSTATUS STDCALL
+LdrDisableThreadCalloutsForDll(IN PVOID BaseAddress);
+
+NTSTATUS STDCALL
+LdrGetDllHandle(IN ULONG Unknown1,
+               IN ULONG Unknown2,
+               IN PUNICODE_STRING DllName,
+               OUT PVOID *BaseAddress);
+
+NTSTATUS STDCALL
+LdrFindEntryForAddress(PVOID Address,
+                      PLDR_MODULE *Module);
+
+NTSTATUS STDCALL
+LdrGetProcedureAddress(IN PVOID BaseAddress,
+                      IN PANSI_STRING Name,
+                      IN ULONG Ordinal,
+                      OUT PVOID *ProcedureAddress);
+
+VOID STDCALL
+LdrInitializeThunk(ULONG Unknown1,
+                  ULONG Unknown2,
+                  ULONG Unknown3,
+                  ULONG Unknown4);
+
+NTSTATUS STDCALL
+LdrLoadDll(IN PWSTR SearchPath OPTIONAL,
+          IN ULONG LoadFlags,
+          IN PUNICODE_STRING Name,
+          OUT PVOID *BaseAddress OPTIONAL);
+
+NTSTATUS STDCALL
+LdrQueryProcessModuleInformation(IN PMODULE_INFORMATION ModuleInformation OPTIONAL,
+                                IN ULONG Size OPTIONAL,
+                                OUT PULONG ReturnedSize);
+
+NTSTATUS STDCALL
+LdrShutdownProcess(VOID);
+
+NTSTATUS STDCALL
+LdrShutdownThread(VOID);
+
+NTSTATUS STDCALL
+LdrUnloadDll(IN PVOID BaseAddress);
+
+#endif /* __NTOSKRNL_INCLUDE_INTERNAL_LDR_H */
+
+/* EOF */