ReactOS  r76032
mmfuncs.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  mmfuncs.h
8 
9 Abstract:
10 
11  Functions definitions for the Memory Manager.
12 
13 Author:
14 
15  Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16 
17 --*/
18 
19 #ifndef _MMFUNCS_H
20 #define _MMFUNCS_H
21 
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26 #include <mmtypes.h>
27 
28 #ifndef NTOS_MODE_USER
29 
30 //
31 // Section Functions
32 //
34 NTAPI
44 );
45 
47 NTAPI
59 );
60 
62 NTAPI
64  _In_ struct _EPROCESS* Process,
66 );
67 
68 #endif
69 
70 //
71 // Native calls
72 //
75 NTAPI
77  _In_ PVOID File1MappedAsAnImage,
78  _In_ PVOID File2MappedAsFile
79 );
80 
82 NTAPI
85  _Inout_ PULONG_PTR NumberOfPages,
86  _Inout_ PULONG_PTR UserPfnArray
87 );
88 
94 NTAPI
102 );
103 
105 NTSTATUS
106 NTAPI
109  _In_ PLARGE_INTEGER InitialSize,
110  _In_ PLARGE_INTEGER MaxiumSize,
112 );
113 
117 NTSTATUS
118 NTAPI
120  _Out_ PHANDLE SectionHandle,
127 );
128 
130 NTSTATUS
131 NTAPI
133  _In_ HANDLE SectionHandle,
134  _In_ PLARGE_INTEGER NewMaximumSize
135 );
136 
138 NTSTATUS
139 NTAPI
141  _In_ HANDLE ProcessHandle,
142  _In_ PVOID BaseAddress,
143  _In_ SIZE_T NumberOfBytesToFlush
144 );
145 
147 NTSTATUS
148 NTAPI
150  _In_ HANDLE ProcessHandle,
151  _Inout_ PVOID *BaseAddress,
152  _Inout_ PSIZE_T RegionSize,
154 );
155 
156 NTSTATUS
157 NTAPI
159  _In_ HANDLE ProcessHandle,
160  _Inout_ PULONG_PTR NumberOfPages,
161  _Inout_ PULONG_PTR UserPfnArray
162 );
163 
167 NTSTATUS
168 NTAPI
170  _In_ HANDLE ProcessHandle,
171  _Inout_ __drv_freesMem(Mem) PVOID *BaseAddress,
172  _Inout_ PSIZE_T RegionSize,
174 );
175 
176 NTSTATUS
177 NTAPI
179  _In_ HANDLE ProcessHandle,
180  _In_ ULONG Flags,
181  _In_ PVOID BaseAddress,
182  _In_ SIZE_T RegionSize,
183  _In_ PVOID *UserAddressArray,
184  _Out_ PULONG_PTR EntriesInUserAddressArray,
185  _Out_ PULONG Granularity
186 );
187 
189 NTSTATUS
190 NTAPI
192  _In_ HANDLE ProcessHandle,
193  _Inout_ PVOID *BaseAddress,
194  _Inout_ PSIZE_T NumberOfBytesToLock,
195  _In_ ULONG MapType
196 );
197 
198 NTSTATUS
199 NTAPI
201  _In_ PVOID VirtualAddresses,
202  _In_ ULONG_PTR NumberOfPages,
203  _Inout_ PULONG_PTR UserPfnArray
204 );
205 
206 NTSTATUS
207 NTAPI
209  _In_ PVOID *VirtualAddresses,
210  _In_ ULONG_PTR NumberOfPages,
211  _Inout_ PULONG_PTR UserPfnArray
212 );
213 
215 NTSTATUS
216 NTAPI
218  _In_ HANDLE SectionHandle,
219  _In_ HANDLE ProcessHandle,
220  _Inout_ PVOID *BaseAddress,
221  _In_ ULONG_PTR ZeroBits,
226  _In_ ULONG AllocationType,
227  _In_ ULONG AccessProtection
228 );
229 
231 NTSTATUS
232 NTAPI
234  _Out_ PHANDLE SectionHandle,
235  _In_ ACCESS_MASK DesiredAccess,
236  _In_ POBJECT_ATTRIBUTES ObjectAttributes
237 );
238 
240 NTSTATUS
241 NTAPI
243  _In_ HANDLE ProcessHandle,
244  _In_ PVOID *BaseAddress,
245  _In_ SIZE_T *NumberOfBytesToProtect,
246  _In_ ULONG NewAccessProtection,
247  _Out_ PULONG OldAccessProtection
248 );
249 
251 NTSTATUS
252 NTAPI
254  _In_ HANDLE SectionHandle,
255  _In_ SECTION_INFORMATION_CLASS SectionInformationClass,
256  _Out_ PVOID SectionInformation,
259 );
260 
262 NTSTATUS
263 NTAPI
265  _In_ HANDLE ProcessHandle,
267  _In_ MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
268  _Out_ PVOID VirtualMemoryInformation,
269  _In_ SIZE_T Length,
270  _Out_opt_ PSIZE_T ResultLength
271 );
272 
274 NTSTATUS
275 NTAPI
277  _In_ HANDLE ProcessHandle,
278  _In_ PVOID BaseAddress,
280  _In_ SIZE_T NumberOfBytesToRead,
281  _Out_opt_ PSIZE_T NumberOfBytesRead
282 );
283 
284 NTSTATUS
285 NTAPI
287  _In_ HANDLE ProcessHandle,
288  _In_ PVOID BaseAddress,
289  _In_ SIZE_T RegionSize
290 );
291 
293 NTSTATUS
294 NTAPI
296  _In_ HANDLE ProcessHandle,
297  _Inout_ PVOID *BaseAddress,
298  _Inout_ PSIZE_T NumberOfBytesToUnlock,
299  _In_ ULONG MapType
300 );
301 
303 NTSTATUS
304 NTAPI
306  _In_ HANDLE ProcessHandle,
307  _In_ PVOID BaseAddress
308 );
309 
311 NTSTATUS
312 NTAPI
314  _In_ HANDLE ProcessHandle,
315  _In_ PVOID BaseAddress,
316  _In_ PVOID Buffer,
317  _In_ SIZE_T NumberOfBytesToWrite,
318  _Out_opt_ PSIZE_T NumberOfBytesWritten
319 );
320 
321 NTSYSAPI
322 NTSTATUS
323 NTAPI
325  _In_ PVOID File1MappedAsAnImage,
326  _In_ PVOID File2MappedAsFile
327 );
328 
330 _At_(*BaseAddress, __drv_allocatesMem(Mem))
332 NTSYSAPI
333 NTSTATUS
334 NTAPI
335 ZwAllocateVirtualMemory(
336  _In_ HANDLE ProcessHandle,
337  _Inout_ _Outptr_result_buffer_(*RegionSize) PVOID *BaseAddress,
338  _In_ ULONG_PTR ZeroBits,
339  _Inout_ PSIZE_T RegionSize,
340  _In_ ULONG AllocationType,
341  _In_ ULONG Protect
342 );
343 
344 NTSYSAPI
345 NTSTATUS
346 NTAPI
348  _In_ PUNICODE_STRING FileName,
349  _In_ PLARGE_INTEGER InitialSize,
350  _In_ PLARGE_INTEGER MaxiumSize,
351  _In_ ULONG Reserved
352 );
353 
355 NTSYSAPI
356 NTSTATUS
357 NTAPI
358 ZwCreateSection(
359  _Out_ PHANDLE SectionHandle,
360  _In_ ACCESS_MASK DesiredAccess,
361  _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
362  _In_opt_ PLARGE_INTEGER MaximumSize,
363  _In_ ULONG SectionPageProtection,
364  _In_ ULONG AllocationAttributes,
365  _In_opt_ HANDLE FileHandle
366 );
367 
368 NTSYSAPI
369 NTSTATUS
370 NTAPI
372  _In_ HANDLE SectionHandle,
373  _In_ PLARGE_INTEGER NewMaximumSize
374 );
375 
377 NTSYSAPI
378 NTSTATUS
379 NTAPI
380 ZwFreeVirtualMemory(
381  _In_ HANDLE ProcessHandle,
382  _Inout_ __drv_freesMem(Mem) PVOID *BaseAddress,
383  _Inout_ PSIZE_T RegionSize,
384  _In_ ULONG FreeType
385 );
386 
387 NTSYSAPI
388 NTSTATUS
389 NTAPI
391  _In_ HANDLE ProcessHandle,
392  _Inout_ PVOID *BaseAddress,
393  _Inout_ PSIZE_T NumberOfBytesToLock,
394  _In_ ULONG MapType
395 );
396 
398 NTSYSAPI
399 NTSTATUS
400 NTAPI
401 ZwMapViewOfSection(
402  _In_ HANDLE SectionHandle,
403  _In_ HANDLE ProcessHandle,
404  _Outptr_result_bytebuffer_(*ViewSize) PVOID *BaseAddress,
405  _In_ ULONG_PTR ZeroBits,
406  _In_ SIZE_T CommitSize,
407  _Inout_opt_ PLARGE_INTEGER SectionOffset,
408  _Inout_ PSIZE_T ViewSize,
409  _In_ SECTION_INHERIT InheritDisposition,
410  _In_ ULONG AllocationType,
412 );
413 
414 NTSYSAPI
415 NTSTATUS
416 NTAPI
418  _Out_ PHANDLE SectionHandle,
419  _In_ ACCESS_MASK DesiredAccess,
420  _In_ POBJECT_ATTRIBUTES ObjectAttributes
421 );
422 
423 NTSYSAPI
424 NTSTATUS
425 NTAPI
427  _In_ HANDLE ProcessHandle,
428  _In_ PVOID *BaseAddress,
429  _In_ SIZE_T *NumberOfBytesToProtect,
430  _In_ ULONG NewAccessProtection,
431  _Out_ PULONG OldAccessProtection
432 );
433 
434 NTSYSAPI
435 NTSTATUS
436 NTAPI
438  _In_ HANDLE SectionHandle,
439  _In_ SECTION_INFORMATION_CLASS SectionInformationClass,
440  _Out_ PVOID SectionInformation,
441  _In_ SIZE_T Length,
442  _Out_opt_ PSIZE_T ResultLength
443 );
444 
445 NTSYSAPI
446 NTSTATUS
447 NTAPI
449  _In_ HANDLE ProcessHandle,
450  _In_ PVOID Address,
451  _In_ MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
452  _Out_ PVOID VirtualMemoryInformation,
453  _In_ SIZE_T Length,
454  _Out_opt_ PSIZE_T ResultLength
455 );
456 
457 NTSYSAPI
458 NTSTATUS
459 NTAPI
461  _In_ HANDLE ProcessHandle,
462  _In_ PVOID BaseAddress,
463  _Out_ PVOID Buffer,
464  _In_ SIZE_T NumberOfBytesToRead,
465  _Out_opt_ PSIZE_T NumberOfBytesRead
466 );
467 
468 NTSYSAPI
469 NTSTATUS
470 NTAPI
472  _In_ HANDLE ProcessHandle,
473  _Inout_ PVOID *BaseAddress,
474  _Inout_ PSIZE_T NumberOfBytesToUnlock,
475  _In_ ULONG MapType
476 );
477 
479 NTSYSAPI
480 NTSTATUS
481 NTAPI
482 ZwUnmapViewOfSection(
483  _In_ HANDLE ProcessHandle,
484  _In_opt_ PVOID BaseAddress
485 );
486 
487 NTSYSAPI
488 NTSTATUS
489 NTAPI
491  _In_ HANDLE ProcessHandle,
492  _In_ PVOID BaseAddress,
493  _In_ PVOID Buffer,
494  _In_ SIZE_T NumberOfBytesToWrite,
495  _Out_opt_ PSIZE_T NumberOfBytesWritten
496 );
497 
498 #endif
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T _In_ SECTION_INHERIT InheritDisposition
Definition: mmfuncs.h:404
_Must_inspect_result_ _Outptr_ PVOID * SectionObject
Definition: fsrtlfuncs.h:860
DWORD *typedef PVOID
Definition: winlogon.h:52
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: conport.c:47
enum _SECTION_INFORMATION_CLASS SECTION_INFORMATION_CLASS
NTSTATUS NTAPI NtFreeUserPhysicalPages(_In_ HANDLE ProcessHandle, _Inout_ PULONG_PTR NumberOfPages, _Inout_ PULONG_PTR UserPfnArray)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR ZeroBits
Definition: mmfuncs.h:404
#define _Must_inspect_result_
Definition: no_sal2.h:314
PVOID ULONG Address
Definition: oprghdlr.h:14
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG AllocationAttributes
Definition: mmfuncs.h:360
NTSYSCALLAPI NTSTATUS NTAPI NtFlushInstructionCache(_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ SIZE_T NumberOfBytesToFlush)
NTSYSCALLAPI NTSTATUS NTAPI NtProtectVirtualMemory(_In_ HANDLE ProcessHandle, _In_ PVOID *BaseAddress, _In_ SIZE_T *NumberOfBytesToProtect, _In_ ULONG NewAccessProtection, _Out_ PULONG OldAccessProtection)
_In_ ACCESS_MASK DesiredAccess
Definition: mmfuncs.h:360
#define NTSYSCALLAPI
Definition: ntbasedef.h:196
NTSYSAPI NTSTATUS NTAPI ZwLockVirtualMemory(_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T NumberOfBytesToLock, _In_ ULONG MapType)
NTSYSCALLAPI NTSTATUS NTAPI NtUnmapViewOfSection(_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress)
NTSYSCALLAPI NTSTATUS NTAPI NtReadVirtualMemory(_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _Out_ PVOID Buffer, _In_ SIZE_T NumberOfBytesToRead, _Out_opt_ PSIZE_T NumberOfBytesRead)
NTSYSCALLAPI NTSTATUS NTAPI NtLockVirtualMemory(_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T NumberOfBytesToLock, _In_ ULONG MapType)
NTSYSCALLAPI NTSTATUS NTAPI NtOpenSection(_Out_ PHANDLE SectionHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
#define NTSYSAPI
Definition: ntoskrnl.h:14
#define _In_opt_
Definition: no_sal2.h:213
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_opt_ HANDLE FileHandle
Definition: mmfuncs.h:360
uint32_t ULONG_PTR
Definition: typedefs.h:63
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG SectionPageProtection
Definition: mmfuncs.h:360
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
ULONG_PTR * PSIZE_T
Definition: typedefs.h:78
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
__kernel_entry _IRQL_requires_max_(PASSIVE_LEVEL) NTSYSCALLAPI NTSTATUS NTAPI NtFreeVirtualMemory(_In_ HANDLE ProcessHandle
Definition: Messaging.c:37
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T _In_ SECTION_INHERIT _In_ ULONG _In_ ULONG Protect
Definition: zwfuncs.h:214
NTSTATUS NTAPI MmCreateSection(_Out_ PVOID *SectionObject, _In_ ACCESS_MASK DesiredAccess, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ PLARGE_INTEGER MaximumSize, _In_ ULONG SectionPageProtection, _In_ ULONG AllocationAttributes, _In_opt_ HANDLE FileHandle, _In_opt_ PFILE_OBJECT File)
NTSYSAPI NTSTATUS NTAPI ZwExtendSection(_In_ HANDLE SectionHandle, _In_ PLARGE_INTEGER NewMaximumSize)
NTSYSCALLAPI NTSTATUS NTAPI NtFlushVirtualMemory(_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T RegionSize, _Out_ PIO_STATUS_BLOCK IoStatus)
#define _Out_
Definition: no_sal2.h:323
NTSYSCALLAPI NTSTATUS NTAPI NtQueryVirtualMemory(_In_ HANDLE ProcessHandle, _In_ PVOID Address, _In_ MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass, _Out_ PVOID VirtualMemoryInformation, _In_ SIZE_T Length, _Out_opt_ PSIZE_T ResultLength)
#define _At_(target, annos)
Definition: no_sal2.h:11
_Must_inspect_result_ __kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtCreateSection(_Out_ PHANDLE SectionHandle, _In_ ACCESS_MASK DesiredAccess, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_opt_ PLARGE_INTEGER MaximumSize, _In_ ULONG SectionPageProtection, _In_ ULONG AllocationAttributes, _In_opt_ HANDLE FileHandle)
NTSYSCALLAPI NTSTATUS NTAPI NtUnlockVirtualMemory(_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T NumberOfBytesToUnlock, _In_ ULONG MapType)
NTSTATUS NTAPI NtMapUserPhysicalPagesScatter(_In_ PVOID *VirtualAddresses, _In_ ULONG_PTR NumberOfPages, _Inout_ PULONG_PTR UserPfnArray)
Definition: bufpool.h:45
NTSYSAPI NTSTATUS NTAPI ZwWriteVirtualMemory(_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ PVOID Buffer, _In_ SIZE_T NumberOfBytesToWrite, _Out_opt_ PSIZE_T NumberOfBytesWritten)
enum _MEMORY_INFORMATION_CLASS MEMORY_INFORMATION_CLASS
NTSYSCALLAPI NTSTATUS NTAPI NtWriteVirtualMemory(_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ PVOID Buffer, _In_ SIZE_T NumberOfBytesToWrite, _Out_opt_ PSIZE_T NumberOfBytesWritten)
__kernel_entry _Inout_ __drv_freesMem(Mem) PVOID *BaseAddress
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER SectionOffset
Definition: mmfuncs.h:404
NTSYSAPI NTSTATUS NTAPI ZwQueryVirtualMemory(_In_ HANDLE ProcessHandle, _In_ PVOID Address, _In_ MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass, _Out_ PVOID VirtualMemoryInformation, _In_ SIZE_T Length, _Out_opt_ PSIZE_T ResultLength)
NTSYSCALLAPI NTSTATUS NTAPI NtMapViewOfSection(_In_ HANDLE SectionHandle, _In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _In_ ULONG_PTR ZeroBits, _In_ SIZE_T CommitSize, _Inout_opt_ PLARGE_INTEGER SectionOffset, _Inout_ PSIZE_T ViewSize, _In_ SECTION_INHERIT InheritDisposition, _In_ ULONG AllocationType, _In_ ULONG AccessProtection)
NTSTATUS NTAPI NtAllocateUserPhysicalPages(_In_ HANDLE ProcessHandle, _Inout_ PULONG_PTR NumberOfPages, _Inout_ PULONG_PTR UserPfnArray)
NTSTATUS NTAPI NtGetWriteWatch(_In_ HANDLE ProcessHandle, _In_ ULONG Flags, _In_ PVOID BaseAddress, _In_ SIZE_T RegionSize, _In_ PVOID *UserAddressArray, _Out_ PULONG_PTR EntriesInUserAddressArray, _Out_ PULONG Granularity)
#define _Out_opt_
Definition: no_sal2.h:339
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
#define __drv_allocatesMem(kind)
Definition: driverspecs.h:239
#define __kernel_entry
Definition: specstrings.h:50
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T CommitSize
Definition: mmfuncs.h:404
#define _Outptr_result_buffer_(size)
Definition: no_sal2.h:414
#define _Inout_
Definition: no_sal2.h:244
* PFILE_OBJECT
Definition: iotypes.h:1949
NTSYSCALLAPI NTSTATUS NTAPI NtCreatePagingFile(_In_ PUNICODE_STRING FileName, _In_ PLARGE_INTEGER InitialSize, _In_ PLARGE_INTEGER MaxiumSize, _In_ ULONG Reserved)
NTSYSAPI NTSTATUS NTAPI ZwUnlockVirtualMemory(_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T NumberOfBytesToUnlock, _In_ ULONG MapType)
VOID UINTN Length
Definition: acefiex.h:744
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:411
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T _In_ SECTION_INHERIT _In_ ULONG _In_ ULONG Win32Protect
Definition: mmfuncs.h:404
ULONG PVOID Reserved
Definition: ntimage.h:533
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T _In_ SECTION_INHERIT _In_ ULONG AllocationType
Definition: mmfuncs.h:404
_In_ PLARGE_INTEGER _In_ ULONG _In_ BOOLEAN _In_ ULONG _Out_ PVOID _Out_ PIO_STATUS_BLOCK IoStatus
Definition: npfs.h:636
#define _In_
Definition: no_sal2.h:204
ULONG_PTR SIZE_T
Definition: typedefs.h:78
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes
Definition: mmfuncs.h:360
DWORD *typedef HANDLE
Definition: winlogon.h:52
NTSTATUS NTAPI NtAllocateVirtualMemory(IN HANDLE ProcessHandle, IN OUT PVOID *UBaseAddress, IN ULONG_PTR ZeroBits, IN OUT PSIZE_T URegionSize, IN ULONG AllocationType, IN ULONG Protect)
Definition: virtual.c:4367
LONG NTSTATUS
Definition: DriverTester.h:11
__kernel_entry _Inout_ _Inout_ PSIZE_T _In_ ULONG FreeType
Definition: mmfuncs.h:172
__kernel_entry _Inout_ _Inout_ PSIZE_T RegionSize
Definition: mmfuncs.h:172
_In_ PEPROCESS Process
Definition: mmfuncs.h:396
unsigned int * PULONG
Definition: retypes.h:1
NTSYSAPI NTSTATUS NTAPI ZwAreMappedFilesTheSame(_In_ PVOID File1MappedAsAnImage, _In_ PVOID File2MappedAsFile)
NTSTATUS NTAPI NtResetWriteWatch(_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ SIZE_T RegionSize)
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER MaximumSize
Definition: mmfuncs.h:360
NTSYSAPI NTSTATUS NTAPI ZwQuerySection(_In_ HANDLE SectionHandle, _In_ SECTION_INFORMATION_CLASS SectionInformationClass, _Out_ PVOID SectionInformation, _In_ SIZE_T Length, _Out_opt_ PSIZE_T ResultLength)
NTSTATUS NTAPI MmMapViewOfSection(_In_ PVOID SectionObject, _In_ PEPROCESS Process, _Inout_ PVOID *BaseAddress, _In_ ULONG_PTR ZeroBits, _In_ SIZE_T CommitSize, _Inout_opt_ PLARGE_INTEGER SectionOffset, _Inout_ PSIZE_T ViewSize, _In_ SECTION_INHERIT InheritDisposition, _In_ ULONG AllocationType, _In_ ULONG Protect)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
Definition: mmfuncs.h:404
NTSYSCALLAPI NTSTATUS NTAPI NtExtendSection(_In_ HANDLE SectionHandle, _In_ PLARGE_INTEGER NewMaximumSize)
NTSYSAPI NTSTATUS NTAPI ZwCreatePagingFile(_In_ PUNICODE_STRING FileName, _In_ PLARGE_INTEGER InitialSize, _In_ PLARGE_INTEGER MaxiumSize, _In_ ULONG Reserved)
#define _Outptr_result_bytebuffer_(size)
Definition: no_sal2.h:420
unsigned int ULONG
Definition: retypes.h:1
uint32_t * PULONG_PTR
Definition: typedefs.h:63
NTSTATUS NTAPI MmUnmapViewOfSection(_In_ struct _EPROCESS *Process, _In_ PVOID BaseAddress)
Definition: File.h:15
NTSYSAPI NTSTATUS NTAPI ZwOpenSection(_Out_ PHANDLE SectionHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSCALLAPI NTSTATUS NTAPI NtAreMappedFilesTheSame(_In_ PVOID File1MappedAsAnImage, _In_ PVOID File2MappedAsFile)
_In_ HANDLE ProcessHandle
Definition: mmfuncs.h:403
enum _SECTION_INHERIT SECTION_INHERIT
NTSYSAPI NTSTATUS NTAPI ZwProtectVirtualMemory(_In_ HANDLE ProcessHandle, _In_ PVOID *BaseAddress, _In_ SIZE_T *NumberOfBytesToProtect, _In_ ULONG NewAccessProtection, _Out_ PULONG OldAccessProtection)
#define APC_LEVEL
Definition: env_spec_w32.h:695
ULONG ACCESS_MASK
Definition: nt_native.h:40
NTSYSCALLAPI NTSTATUS NTAPI NtQuerySection(_In_ HANDLE SectionHandle, _In_ SECTION_INFORMATION_CLASS SectionInformationClass, _Out_ PVOID SectionInformation, _In_ SIZE_T Length, _Out_ PSIZE_T ResultLength)
NTSYSAPI NTSTATUS NTAPI ZwReadVirtualMemory(_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _Out_ PVOID Buffer, _In_ SIZE_T NumberOfBytesToRead, _Out_opt_ PSIZE_T NumberOfBytesRead)
#define _Inout_opt_
Definition: no_sal2.h:258
NTSTATUS NTAPI NtMapUserPhysicalPages(_In_ PVOID VirtualAddresses, _In_ ULONG_PTR NumberOfPages, _Inout_ PULONG_PTR UserPfnArray)
NTSTATUS NTAPI NtFreeVirtualMemory(IN HANDLE ProcessHandle, IN PVOID *UBaseAddress, IN PSIZE_T URegionSize, IN ULONG FreeType)
Definition: virtual.c:5089