ReactOS  0.4.15-dev-341-g17c5fb8
libsupp.c
Go to the documentation of this file.
1 /*
2  * FreeLoader
3  * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4  * Copyright (C) 2006 Aleksey Bragin <aleksey@reactos.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #include <freeldr.h>
22 
24 
25 #if DBG
27 CHECK_PAGED_CODE_RTL(char *file, int line)
28 {
29  // boot-code is always ok
30 }
31 #endif
32 
33 PVOID
34 NTAPI
36  ULONG Tag)
37 {
39 }
40 
41 
42 VOID
43 NTAPI
45  ULONG Tag)
46 {
48 }
49 
51 NTAPI
56 {
58  return STATUS_SUCCESS;
59 }
60 
61 /* Ldr access to IMAGE_NT_HEADERS without SEH */
62 
63 /* Rtl SEH-Free version of this */
65 NTAPI
68  _In_ PVOID Base,
70  _Out_ PIMAGE_NT_HEADERS *OutHeaders);
71 
72 
73 /*
74  * @implemented
75  */
77 NTAPI
80  _In_ PVOID Base,
82  _Out_ PIMAGE_NT_HEADERS *OutHeaders)
83 {
84  return RtlpImageNtHeaderEx(Flags, Base, Size, OutHeaders);
85 }
86 
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
_In_ ULONG _Out_writes_bytes_all_(Length) PUCHAR Buffer
Definition: ntddpcm.h:100
NTSTATUS NTAPI RtlpImageNtHeaderEx(_In_ ULONG Flags, _In_ PVOID Base, _In_ ULONG64 Size, _Out_ PIMAGE_NT_HEADERS *OutHeaders)
Definition: image.c:140
LONG NTSTATUS
Definition: precomp.h:26
PVOID FrLdrDefaultHeap
Definition: heap.c:34
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2373
_In_ UINT Bytes
Definition: mmcopy.h:9
NTSTATUS NTAPI RtlpSafeCopyMemory(_Out_writes_bytes_all_(Length) VOID UNALIGNED *Destination, _In_reads_bytes_(Length) CONST VOID UNALIGNED *Source, _In_ SIZE_T Length)
Definition: libsupp.c:52
PVOID FrLdrHeapAllocateEx(PVOID HeapHandle, SIZE_T ByteSize, ULONG Tag)
Definition: heap.c:320
#define FASTCALL
Definition: nt_native.h:50
_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
#define _Out_
Definition: no_sal2.h:323
Definition: parser.c:48
NTSTATUS NTAPI RtlImageNtHeaderEx(_In_ ULONG Flags, _In_ PVOID Base, _In_ ULONG64 Size, _Out_ PIMAGE_NT_HEADERS *OutHeaders)
Definition: libsupp.c:32
void * PVOID
Definition: retypes.h:9
#define UNALIGNED
Definition: crtdefs.h:132
VOID FrLdrHeapFreeEx(PVOID HeapHandle, PVOID Pointer, ULONG Tag)
Definition: heap.c:438
#define MI_HIGHEST_USER_ADDRESS
Definition: mmtypes.h:43
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2937
PVOID MmHighestUserAddress
Definition: libsupp.c:23
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
unsigned __int64 ULONG64
Definition: imports.h:198
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
#define _In_reads_bytes_(size)
Definition: no_sal2.h:229
#define _In_
Definition: no_sal2.h:204
ULONG_PTR SIZE_T
Definition: typedefs.h:79
IN ULONG IN ULONG Tag
Definition: evtlib.h:159
unsigned int ULONG
Definition: retypes.h:1
VOID NTAPI RtlpFreeMemory(PVOID Mem, ULONG Tag)
Definition: libsupp.c:44
PVOID NTAPI RtlpAllocateMemory(ULONG Bytes, ULONG Tag)
Definition: libsupp.c:35
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define CONST
Definition: pedump.c:81
Definition: fci.c:126