ReactOS 0.4.15-dev-7953-g1f49173
ldrfuncs.h
Go to the documentation of this file.
1/*++ NDK Version: 0098
2
3Copyright (c) Alex Ionescu. All rights reserved.
4
5Header Name:
6
7 ldrfuncs.h
8
9Abstract:
10
11 Functions definitions for the Loader.
12
13Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17--*/
18
19#ifndef _LDRFUNCS_H
20#define _LDRFUNCS_H
21
22//
23// Dependencies
24//
25#include <umtypes.h>
26#include <ldrtypes.h>
27#if defined(_MSC_VER) && !defined(NTOS_MODE_USER)
28#include <ntimage.h>
29#endif
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35//
36// Resource Functions
37//
42 _In_ PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry,
45);
46
51 _In_ PLDR_RESOURCE_INFO ResourceInfo,
53 _Out_ PIMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry
54);
55
60 _In_ PLDR_RESOURCE_INFO ResourceInfo,
64);
65
70 _In_ PLDR_RESOURCE_INFO ResourceInfo,
72 _Out_ PIMAGE_RESOURCE_DIRECTORY *ResourceDirectory
73);
74
78 _In_ PVOID Module,
80);
81
86);
87
88//
89// Misc. Functions
90//
96 _In_opt_ _When_(Name == NULL, _In_range_(>, 0)) ULONG Ordinal,
97 _Out_ PVOID *ProcedureAddress
98);
99
100ULONG
101NTAPI
104 _In_opt_ PCSTR LoaderName,
106 _In_ ULONG Conflict,
108);
109
111NTAPI
116);
117
119NTAPI
123);
124
126NTAPI
131);
132
134NTAPI
138 _In_ PUSHORT TypeOffset,
140);
141
143NTAPI
145 _Reserved_ ULONG ReservedFlag,
148);
149
150#ifdef NTOS_MODE_USER
153NTAPI
155 VOID
156);
157#endif
158
159#ifdef __cplusplus
160}
161#endif
162
163#endif
unsigned char BOOLEAN
static BOOL CALLBACK EnumProc(_In_ HWND hWnd, _In_ LPARAM lParam)
Definition: SetParent.c:53
@ Invalid
Definition: asmpp.cpp:30
LONG NTSTATUS
Definition: precomp.h:26
#define NTSYSAPI
Definition: ntoskrnl.h:12
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
Definition: cdprocs.h:843
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
@ Success
Definition: eventcreate.c:712
static ULONG ResourceCount
Definition: inbv.c:50
NTSYSAPI BOOLEAN WINAPI RtlDllShutdownInProgress(void)
Definition: ldrapi.c:1597
ULONG NTAPI LdrRelocateImage(_In_ PVOID BaseAddress, _In_opt_ PCSTR LoaderName, _In_ ULONG Success, _In_ ULONG Conflict, _In_ ULONG Invalid)
Definition: image.c:462
PIMAGE_BASE_RELOCATION NTAPI LdrProcessRelocationBlockLongLong(_In_ ULONG_PTR Address, _In_ ULONG Count, _In_ PUSHORT TypeOffset, _In_ LONGLONG Delta)
NTSTATUS NTAPI LdrAccessResource(_In_ PVOID BaseAddress, _In_ PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry, _Out_opt_ PVOID *Resource, _Out_opt_ PULONG Size)
NTSTATUS NTAPI LdrLoadAlternateResourceModule(_In_ PVOID Module, _In_ PWSTR Buffer)
Definition: ldrapi.c:1625
NTSTATUS NTAPI LdrFindResource_U(_In_ PVOID BaseAddress, _In_ PLDR_RESOURCE_INFO ResourceInfo, _In_ ULONG Level, _Out_ PIMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry)
NTSTATUS NTAPI LdrUnlockLoaderLock(_In_ ULONG Flags, _In_opt_ ULONG_PTR Cookie)
Definition: ldrapi.c:101
NTSTATUS NTAPI LdrEnumResources(_In_ PVOID BaseAddress, _In_ PLDR_RESOURCE_INFO ResourceInfo, _In_ ULONG Level, _Inout_ ULONG *ResourceCount, _Out_writes_to_(*ResourceCount, *ResourceCount) LDR_ENUM_RESOURCE_INFO *Resources)
Definition: res.c:343
BOOLEAN NTAPI LdrVerifyMappedImageMatchesChecksum(_In_ PVOID BaseAddress, _In_ SIZE_T NumberOfBytes, _In_ ULONG FileLength)
NTSTATUS NTAPI LdrLockLoaderLock(_In_ ULONG Flags, _Out_opt_ PULONG Disposition, _Out_opt_ PULONG_PTR Cookie)
Definition: ldrapi.c:174
NTSTATUS NTAPI LdrFindResourceDirectory_U(_In_ PVOID BaseAddress, _In_ PLDR_RESOURCE_INFO ResourceInfo, _In_ ULONG Level, _Out_ PIMAGE_RESOURCE_DIRECTORY *ResourceDirectory)
BOOLEAN NTAPI LdrUnloadAlternateResourceModule(_In_ PVOID BaseAddress)
Definition: ldrapi.c:1641
NTSTATUS NTAPI LdrGetProcedureAddress(_In_ PVOID BaseAddress, _In_opt_ _When_(Ordinal==0, _Notnull_) PANSI_STRING Name, _In_opt_ _When_(Name==NULL, _In_range_(>, 0)) ULONG Ordinal, _Out_ PVOID *ProcedureAddress)
Definition: ldrapi.c:829
NTSTATUS NTAPI LdrEnumerateLoadedModules(_Reserved_ ULONG ReservedFlag, _In_ PLDR_ENUM_CALLBACK EnumProc, _In_opt_ PVOID Context)
Definition: ldrapi.c:1130
LDR_ENUM_CALLBACK * PLDR_ENUM_CALLBACK
Definition: ldrtypes.h:242
#define _Out_opt_
Definition: ms_sal.h:346
#define _Notnull_
Definition: ms_sal.h:658
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _When_(expr, annos)
Definition: ms_sal.h:254
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _Reserved_
Definition: ms_sal.h:295
#define _Out_writes_to_(size, count)
Definition: ms_sal.h:355
#define _In_range_(lb, ub)
Definition: ms_sal.h:571
_Out_ PNDIS_HANDLE _Out_ PUINT FileLength
Definition: ndis.h:3228
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:56
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
int Count
Definition: noreturn.cpp:7
static WCHAR Address[46]
Definition: ping.c:68
Definition: pedump.c:458
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG_PTR
Definition: typedefs.h:65
uint32_t * PULONG
Definition: typedefs.h:59
int64_t LONGLONG
Definition: typedefs.h:68
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint16_t * PUSHORT
Definition: typedefs.h:56
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
static ULONG Delta
Definition: xboxvideo.c:33
_In_opt_ PVOID _Out_ PLARGE_INTEGER Cookie
Definition: cmfuncs.h:14
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036