ReactOS  0.4.14-dev-1007-g90d795b
ldrfuncs.h
Go to the documentation of this file.
1 /*++ NDK Version: 0098
2 
3 Copyright (c) Alex Ionescu. All rights reserved.
4 
5 Header Name:
6 
7  ldrfuncs.h
8 
9 Abstract:
10 
11  Functions definitions for the Loader.
12 
13 Author:
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 //
32 // Resource Functions
33 //
35 NTAPI
38  _In_ PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry,
41 );
42 
44 NTAPI
47  _In_ PLDR_RESOURCE_INFO ResourceInfo,
49  _Out_ PIMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry
50 );
51 
53 NTAPI
56  _In_ PLDR_RESOURCE_INFO ResourceInfo,
60 );
61 
62 
64 NTAPI
67  _In_ PLDR_RESOURCE_INFO ResourceInfo,
69  _Out_ PIMAGE_RESOURCE_DIRECTORY *ResourceDirectory
70 );
71 
73 NTAPI
75  _In_ PVOID Module,
77 );
78 
79 BOOLEAN
80 NTAPI
83 );
84 
85 //
86 // Misc. Functions
87 //
89 NTAPI
93  _In_ ULONG Ordinal,
94  _Out_ PVOID *ProcedureAddress
95 );
96 
97 ULONG
98 NTAPI
100  _In_ PVOID NewBase,
101  _In_ PCCH LoaderName,
103  _In_ ULONG Conflict,
104  _In_ ULONG Invalid
105 );
106 
107 NTSTATUS
108 NTAPI
110  _In_ ULONG Flags,
113 );
114 
115 NTSTATUS
116 NTAPI
118  _In_ ULONG Flags,
120 );
121 
122 BOOLEAN
123 NTAPI
128 );
129 
131 NTAPI
134  _In_ ULONG Count,
135  _In_ PUSHORT TypeOffset,
137 );
138 
139 NTSTATUS
140 NTAPI
142  _In_ BOOLEAN ReservedFlag,
145 );
146 
147 #endif
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
_Out_ PNDIS_HANDLE _Out_ PUINT FileLength
Definition: ndis.h:3227
BOOLEAN NTAPI LdrUnloadAlternateResourceModule(_In_ PVOID BaseAddress)
uint16_t * PWSTR
Definition: typedefs.h:55
NTSTATUS NTAPI LdrLoadAlternateResourceModule(_In_ PVOID Module, _In_ PWSTR Buffer)
LONG NTSTATUS
Definition: precomp.h:26
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
#define _Out_writes_to_(size, count)
Definition: no_sal2.h:378
BOOLEAN NTAPI LdrVerifyMappedImageMatchesChecksum(_In_ PVOID BaseAddress, _In_ SIZE_T NumberOfBytes, _In_ ULONG FileLength)
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:50
#define _In_opt_
Definition: no_sal2.h:213
uint32_t ULONG_PTR
Definition: typedefs.h:64
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
Definition: cdprocs.h:848
PIMAGE_BASE_RELOCATION NTAPI LdrProcessRelocationBlockLongLong(_In_ ULONG_PTR Address, _In_ ULONG Count, _In_ PUSHORT TypeOffset, _In_ LONGLONG Delta)
unsigned char BOOLEAN
static WCHAR Address[46]
Definition: ping.c:68
#define _Out_
Definition: no_sal2.h:323
Definition: pedump.c:457
Definition: bufpool.h:45
LDR_ENUM_CALLBACK * PLDR_ENUM_CALLBACK
Definition: ldrtypes.h:242
NTSTATUS NTAPI LdrFindResource_U(_In_ PVOID BaseAddress, _In_ PLDR_RESOURCE_INFO ResourceInfo, _In_ ULONG Level, _Out_ PIMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry)
NTSTATUS NTAPI LdrAccessResource(_In_ PVOID BaseAddress, _In_ PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry, _Out_opt_ PVOID *Resource, _Out_opt_ PULONG Size)
int64_t LONGLONG
Definition: typedefs.h:67
#define _Out_opt_
Definition: no_sal2.h:339
CONST CHAR * PCCH
Definition: ntbasedef.h:399
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
NTSTATUS NTAPI LdrUnlockLoaderLock(_In_ ULONG Flags, _In_opt_ ULONG Cookie)
NTSTATUS NTAPI LdrLockLoaderLock(_In_ ULONG Flags, _Out_opt_ PULONG Disposition, _Out_opt_ PULONG_PTR Cookie)
NTSTATUS NTAPI LdrFindResourceDirectory_U(_In_ PVOID BaseAddress, _In_ PLDR_RESOURCE_INFO ResourceInfo, _In_ ULONG Level, _Out_ PIMAGE_RESOURCE_DIRECTORY *ResourceDirectory)
_In_opt_ PVOID _Out_ PLARGE_INTEGER Cookie
Definition: cmfuncs.h:13
#define _Inout_
Definition: no_sal2.h:244
static ULONG ResourceCount
Definition: inbv.c:95
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define _In_
Definition: no_sal2.h:204
NTSTATUS NTAPI LdrGetProcedureAddress(_In_ PVOID BaseAddress, _In_ PANSI_STRING Name, _In_ ULONG Ordinal, _Out_ PVOID *ProcedureAddress)
ULONG_PTR SIZE_T
Definition: typedefs.h:79
static ULONG Delta
Definition: xboxvideo.c:32
unsigned int * PULONG
Definition: retypes.h:1
NTSTATUS NTAPI LdrEnumerateLoadedModules(_In_ BOOLEAN ReservedFlag, _In_ PLDR_ENUM_CALLBACK EnumProc, _In_ PVOID Context)
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:998
unsigned int ULONG
Definition: retypes.h:1
static BOOL CALLBACK EnumProc(_In_ HWND hWnd, _In_ LPARAM lParam)
Definition: SetParent.c:53
uint32_t * PULONG_PTR
Definition: typedefs.h:64
ULONG NTAPI LdrRelocateImage(_In_ PVOID NewBase, _In_ PCCH LoaderName, _In_ ULONG Success, _In_ ULONG Conflict, _In_ ULONG Invalid)
unsigned short * PUSHORT
Definition: retypes.h:2