ReactOS  0.4.12-dev-945-g5a2911d
mmfuncs.h File Reference
#include <umtypes.h>
#include <mmtypes.h>
Include dependency graph for mmfuncs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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)
 
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)
 
NTSTATUS NTAPI MmUnmapViewOfSection (_In_ struct _EPROCESS *Process, _In_ PVOID BaseAddress)
 
NTSYSCALLAPI NTSTATUS NTAPI NtAreMappedFilesTheSame (_In_ PVOID File1MappedAsAnImage, _In_ PVOID File2MappedAsFile)
 
NTSTATUS NTAPI NtAllocateUserPhysicalPages (_In_ HANDLE ProcessHandle, _Inout_ PULONG_PTR NumberOfPages, _Inout_ PULONG_PTR UserPfnArray)
 
_Must_inspect_result_ _At_BaseAddress (Mem)) __kernel_entryNTSYSCALLAPINTSTATUSNTAPINtAllocateVirtualMemory(_In_ HANDLE ProcessHandle, _Inout_ _Outptr_result_buffer_(*RegionSize) PVOID *BaseAddress, _In_ ULONG_PTR ZeroBits, _Inout_ PSIZE_T RegionSize, _In_ ULONG AllocationType, _In_ ULONG Protect
 
NTSYSCALLAPI NTSTATUS NTAPI NtCreatePagingFile (_In_ PUNICODE_STRING FileName, _In_ PLARGE_INTEGER InitialSize, _In_ PLARGE_INTEGER MaxiumSize, _In_ ULONG Reserved)
 
_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 NtExtendSection (_In_ HANDLE SectionHandle, _In_ PLARGE_INTEGER NewMaximumSize)
 
NTSYSCALLAPI NTSTATUS NTAPI NtFlushInstructionCache (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ SIZE_T NumberOfBytesToFlush)
 
NTSYSCALLAPI NTSTATUS NTAPI NtFlushVirtualMemory (_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T RegionSize, _Out_ PIO_STATUS_BLOCK IoStatus)
 
NTSTATUS NTAPI NtFreeUserPhysicalPages (_In_ HANDLE ProcessHandle, _Inout_ PULONG_PTR NumberOfPages, _Inout_ PULONG_PTR UserPfnArray)
 
__kernel_entry _IRQL_requires_max_ (PASSIVE_LEVEL) NTSYSCALLAPI NTSTATUS NTAPI NtFreeVirtualMemory(_In_ HANDLE ProcessHandle
 
__kernel_entry _Inout_ __drv_freesMem (Mem) PVOID *BaseAddress
 
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)
 
NTSYSCALLAPI NTSTATUS NTAPI NtLockVirtualMemory (_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T NumberOfBytesToLock, _In_ ULONG MapType)
 
NTSTATUS NTAPI NtMapUserPhysicalPages (_In_ PVOID VirtualAddresses, _In_ ULONG_PTR NumberOfPages, _Inout_ PULONG_PTR UserPfnArray)
 
NTSTATUS NTAPI NtMapUserPhysicalPagesScatter (_In_ PVOID *VirtualAddresses, _In_ ULONG_PTR NumberOfPages, _Inout_ PULONG_PTR UserPfnArray)
 
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)
 
NTSYSCALLAPI NTSTATUS NTAPI NtOpenSection (_Out_ PHANDLE SectionHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
NTSYSCALLAPI NTSTATUS NTAPI NtProtectVirtualMemory (_In_ HANDLE ProcessHandle, _In_ PVOID *BaseAddress, _In_ SIZE_T *NumberOfBytesToProtect, _In_ ULONG NewAccessProtection, _Out_ PULONG OldAccessProtection)
 
NTSYSCALLAPI NTSTATUS NTAPI NtQuerySection (_In_ HANDLE SectionHandle, _In_ SECTION_INFORMATION_CLASS SectionInformationClass, _Out_ PVOID SectionInformation, _In_ SIZE_T Length, _Out_ PSIZE_T ResultLength)
 
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)
 
NTSYSCALLAPI NTSTATUS NTAPI NtReadVirtualMemory (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _Out_ PVOID Buffer, _In_ SIZE_T NumberOfBytesToRead, _Out_opt_ PSIZE_T NumberOfBytesRead)
 
NTSTATUS NTAPI NtResetWriteWatch (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ SIZE_T RegionSize)
 
NTSYSCALLAPI NTSTATUS NTAPI NtUnlockVirtualMemory (_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T NumberOfBytesToUnlock, _In_ ULONG MapType)
 
NTSYSCALLAPI NTSTATUS NTAPI NtUnmapViewOfSection (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress)
 
NTSYSCALLAPI NTSTATUS NTAPI NtWriteVirtualMemory (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ PVOID Buffer, _In_ SIZE_T NumberOfBytesToWrite, _Out_opt_ PSIZE_T NumberOfBytesWritten)
 
NTSYSAPI NTSTATUS NTAPI ZwAreMappedFilesTheSame (_In_ PVOID File1MappedAsAnImage, _In_ PVOID File2MappedAsFile)
 
NTSYSAPI NTSTATUS NTAPI ZwCreatePagingFile (_In_ PUNICODE_STRING FileName, _In_ PLARGE_INTEGER InitialSize, _In_ PLARGE_INTEGER MaxiumSize, _In_ ULONG Reserved)
 
 _IRQL_requires_max_ (APC_LEVEL) NTSYSAPI NTSTATUS NTAPI ZwCreateSection(_Out_ PHANDLE SectionHandle
 
NTSYSAPI NTSTATUS NTAPI ZwExtendSection (_In_ HANDLE SectionHandle, _In_ PLARGE_INTEGER NewMaximumSize)
 
NTSYSAPI NTSTATUS NTAPI ZwLockVirtualMemory (_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T NumberOfBytesToLock, _In_ ULONG MapType)
 
NTSYSAPI NTSTATUS NTAPI ZwOpenSection (_Out_ PHANDLE SectionHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
NTSYSAPI NTSTATUS NTAPI ZwProtectVirtualMemory (_In_ HANDLE ProcessHandle, _In_ PVOID *BaseAddress, _In_ SIZE_T *NumberOfBytesToProtect, _In_ ULONG NewAccessProtection, _Out_ PULONG OldAccessProtection)
 
NTSYSAPI NTSTATUS NTAPI ZwQuerySection (_In_ HANDLE SectionHandle, _In_ SECTION_INFORMATION_CLASS SectionInformationClass, _Out_ PVOID SectionInformation, _In_ SIZE_T Length, _Out_opt_ PSIZE_T ResultLength)
 
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)
 
NTSYSAPI NTSTATUS NTAPI ZwReadVirtualMemory (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _Out_ PVOID Buffer, _In_ SIZE_T NumberOfBytesToRead, _Out_opt_ PSIZE_T NumberOfBytesRead)
 
NTSYSAPI NTSTATUS NTAPI ZwUnlockVirtualMemory (_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T NumberOfBytesToUnlock, _In_ ULONG MapType)
 
NTSYSAPI NTSTATUS NTAPI ZwWriteVirtualMemory (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ PVOID Buffer, _In_ SIZE_T NumberOfBytesToWrite, _Out_opt_ PSIZE_T NumberOfBytesWritten)
 

Variables

__kernel_entry _Inout_ _Inout_ PSIZE_T RegionSize
 
__kernel_entry _Inout_ _Inout_ PSIZE_T _In_ ULONG FreeType
 
_In_ ACCESS_MASK DesiredAccess
 
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes
 
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER MaximumSize
 
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG SectionPageProtection
 
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG AllocationAttributes
 
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_opt_ HANDLE FileHandle
 
_In_ HANDLE ProcessHandle
 
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOIDBaseAddress
 
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR ZeroBits
 
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T CommitSize
 
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER SectionOffset
 
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
 
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T _In_ SECTION_INHERIT InheritDisposition
 
_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
 
_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
 

Function Documentation

◆ __drv_freesMem()

_IRQL_requires_same_ _In_ __drv_freesMem ( Mem  )

◆ _IRQL_requires_max_() [1/2]

__kernel_entry _IRQL_requires_max_ ( PASSIVE_LEVEL  )

Definition at line 64 of file Messaging.c.

75 {
76  PFLT_SERVER_PORT_OBJECT PortObject;
78 
79  /* The caller must allow at least one connection */
80  if (MaxConnections == 0)
81  {
83  }
84 
85  /* The request must be for a kernel handle */
86  if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
87  {
89  }
90 
91  /*
92  * Get rundown protection on the target to stop the owner
93  * from unloading whilst this port object is open. It gets
94  * removed in the FltpServerPortClose callback
95  */
97  if (!NT_SUCCESS(Status))
98  {
99  return Status;
100  }
101 
102  /* Create the server port object for this filter */
106  KernelMode,
107  NULL,
108  sizeof(FLT_SERVER_PORT_OBJECT),
109  0,
110  0,
111  (PVOID *)&PortObject);
112  if (NT_SUCCESS(Status))
113  {
114  /* Zero out the struct */
115  RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
116 
117  /* Increment the ref count on the target filter */
119 
120  /* Setup the filter port object */
121  PortObject->Filter = Filter;
122  PortObject->ConnectNotify = ConnectNotifyCallback;
124  PortObject->MessageNotify = MessageNotifyCallback;
125  PortObject->Cookie = ServerPortCookie;
126  PortObject->MaxConnections = MaxConnections;
127 
128  /* Insert the object */
129  Status = ObInsertObject(PortObject,
130  NULL,
132  0,
133  NULL,
135  if (NT_SUCCESS(Status))
136  {
137  /* Lock the connection list */
139 
140  /* Add the new port object to the connection list and increment the count */
143 
144  /* Unlock the connection list*/
146  }
147  }
148 
149  if (!NT_SUCCESS(Status))
150  {
151  /* Allow the filter to be cleaned up */
153  }
154 
155  return Status;
156 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _Outptr_ PFLT_PORT * ServerPort
Definition: fltkernel.h:1873
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:191
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
LONG NTSTATUS
Definition: precomp.h:26
#define InsertTailList(ListHead, Entry)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:322
LIST_ENTRY mList
Definition: fltmgrint.h:56
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
#define FILE_READ_DATA
Definition: nt_native.h:628
smooth NULL
Definition: ftsmooth.c:416
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:952
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1873
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1873
Status
Definition: gdiplustypes.h:24
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2932
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1873
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:193
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY _In_ LONG MaxConnections
Definition: fltkernel.h:1873
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:192
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1873
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:121

◆ _IRQL_requires_max_() [2/2]

_IRQL_requires_max_ ( APC_LEVEL  )

◆ BaseAddress()

_Must_inspect_result_ _At_* BaseAddress ( Mem  )

◆ MmCreateSection()

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 
)

◆ MmMapViewOfSection()

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 
)

◆ MmUnmapViewOfSection()

NTSTATUS NTAPI MmUnmapViewOfSection ( _In_ struct _EPROCESS Process,
_In_ PVOID  BaseAddress 
)

◆ NtAllocateUserPhysicalPages()

NTSTATUS NTAPI NtAllocateUserPhysicalPages ( _In_ HANDLE  ProcessHandle,
_Inout_ PULONG_PTR  NumberOfPages,
_Inout_ PULONG_PTR  UserPfnArray 
)

◆ NtAreMappedFilesTheSame()

NTSYSCALLAPI NTSTATUS NTAPI NtAreMappedFilesTheSame ( _In_ PVOID  File1MappedAsAnImage,
_In_ PVOID  File2MappedAsFile 
)

◆ NtCreatePagingFile()

NTSYSCALLAPI NTSTATUS NTAPI NtCreatePagingFile ( _In_ PUNICODE_STRING  FileName,
_In_ PLARGE_INTEGER  InitialSize,
_In_ PLARGE_INTEGER  MaxiumSize,
_In_ ULONG  Reserved 
)

◆ NtCreateSection()

_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 
)

◆ NtExtendSection()

NTSYSCALLAPI NTSTATUS NTAPI NtExtendSection ( _In_ HANDLE  SectionHandle,
_In_ PLARGE_INTEGER  NewMaximumSize 
)

◆ NtFlushInstructionCache()

NTSYSCALLAPI NTSTATUS NTAPI NtFlushInstructionCache ( _In_ HANDLE  ProcessHandle,
_In_ PVOID  BaseAddress,
_In_ SIZE_T  NumberOfBytesToFlush 
)

◆ NtFlushVirtualMemory()

NTSYSCALLAPI NTSTATUS NTAPI NtFlushVirtualMemory ( _In_ HANDLE  ProcessHandle,
_Inout_ PVOID BaseAddress,
_Inout_ PSIZE_T  RegionSize,
_Out_ PIO_STATUS_BLOCK  IoStatus 
)

◆ NtFreeUserPhysicalPages()

NTSTATUS NTAPI NtFreeUserPhysicalPages ( _In_ HANDLE  ProcessHandle,
_Inout_ PULONG_PTR  NumberOfPages,
_Inout_ PULONG_PTR  UserPfnArray 
)

◆ NtGetWriteWatch()

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 
)

◆ NtLockVirtualMemory()

NTSYSCALLAPI NTSTATUS NTAPI NtLockVirtualMemory ( _In_ HANDLE  ProcessHandle,
_Inout_ PVOID BaseAddress,
_Inout_ PSIZE_T  NumberOfBytesToLock,
_In_ ULONG  MapType 
)

◆ NtMapUserPhysicalPages()

NTSTATUS NTAPI NtMapUserPhysicalPages ( _In_ PVOID  VirtualAddresses,
_In_ ULONG_PTR  NumberOfPages,
_Inout_ PULONG_PTR  UserPfnArray 
)

◆ NtMapUserPhysicalPagesScatter()

NTSTATUS NTAPI NtMapUserPhysicalPagesScatter ( _In_ PVOID VirtualAddresses,
_In_ ULONG_PTR  NumberOfPages,
_Inout_ PULONG_PTR  UserPfnArray 
)

◆ NtMapViewOfSection()

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 
)

◆ NtOpenSection()

NTSYSCALLAPI NTSTATUS NTAPI NtOpenSection ( _Out_ PHANDLE  SectionHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes 
)

◆ NtProtectVirtualMemory()

NTSYSCALLAPI NTSTATUS NTAPI NtProtectVirtualMemory ( _In_ HANDLE  ProcessHandle,
_In_ PVOID BaseAddress,
_In_ SIZE_T NumberOfBytesToProtect,
_In_ ULONG  NewAccessProtection,
_Out_ PULONG  OldAccessProtection 
)

◆ NtQuerySection()

NTSYSCALLAPI NTSTATUS NTAPI NtQuerySection ( _In_ HANDLE  SectionHandle,
_In_ SECTION_INFORMATION_CLASS  SectionInformationClass,
_Out_ PVOID  SectionInformation,
_In_ SIZE_T  Length,
_Out_ PSIZE_T  ResultLength 
)

◆ NtQueryVirtualMemory()

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 
)

◆ NtReadVirtualMemory()

NTSYSCALLAPI NTSTATUS NTAPI NtReadVirtualMemory ( _In_ HANDLE  ProcessHandle,
_In_ PVOID  BaseAddress,
_Out_ PVOID  Buffer,
_In_ SIZE_T  NumberOfBytesToRead,
_Out_opt_ PSIZE_T  NumberOfBytesRead 
)

◆ NtResetWriteWatch()

NTSTATUS NTAPI NtResetWriteWatch ( _In_ HANDLE  ProcessHandle,
_In_ PVOID  BaseAddress,
_In_ SIZE_T  RegionSize 
)

◆ NtUnlockVirtualMemory()

NTSYSCALLAPI NTSTATUS NTAPI NtUnlockVirtualMemory ( _In_ HANDLE  ProcessHandle,
_Inout_ PVOID BaseAddress,
_Inout_ PSIZE_T  NumberOfBytesToUnlock,
_In_ ULONG  MapType 
)

◆ NtUnmapViewOfSection()

NTSYSCALLAPI NTSTATUS NTAPI NtUnmapViewOfSection ( _In_ HANDLE  ProcessHandle,
_In_ PVOID  BaseAddress 
)

◆ NtWriteVirtualMemory()

NTSYSCALLAPI NTSTATUS NTAPI NtWriteVirtualMemory ( _In_ HANDLE  ProcessHandle,
_In_ PVOID  BaseAddress,
_In_ PVOID  Buffer,
_In_ SIZE_T  NumberOfBytesToWrite,
_Out_opt_ PSIZE_T  NumberOfBytesWritten 
)

◆ ZwAreMappedFilesTheSame()

NTSYSAPI NTSTATUS NTAPI ZwAreMappedFilesTheSame ( _In_ PVOID  File1MappedAsAnImage,
_In_ PVOID  File2MappedAsFile 
)

Referenced by LdrpCheckForLoadedDll().

◆ ZwCreatePagingFile()

NTSYSAPI NTSTATUS NTAPI ZwCreatePagingFile ( _In_ PUNICODE_STRING  FileName,
_In_ PLARGE_INTEGER  InitialSize,
_In_ PLARGE_INTEGER  MaxiumSize,
_In_ ULONG  Reserved 
)

◆ ZwExtendSection()

NTSYSAPI NTSTATUS NTAPI ZwExtendSection ( _In_ HANDLE  SectionHandle,
_In_ PLARGE_INTEGER  NewMaximumSize 
)

◆ ZwLockVirtualMemory()

NTSYSAPI NTSTATUS NTAPI ZwLockVirtualMemory ( _In_ HANDLE  ProcessHandle,
_Inout_ PVOID BaseAddress,
_Inout_ PSIZE_T  NumberOfBytesToLock,
_In_ ULONG  MapType 
)

◆ ZwOpenSection()

◆ ZwProtectVirtualMemory()

NTSYSAPI NTSTATUS NTAPI ZwProtectVirtualMemory ( _In_ HANDLE  ProcessHandle,
_In_ PVOID BaseAddress,
_In_ SIZE_T NumberOfBytesToProtect,
_In_ ULONG  NewAccessProtection,
_Out_ PULONG  OldAccessProtection 
)

◆ ZwQuerySection()

NTSYSAPI NTSTATUS NTAPI ZwQuerySection ( _In_ HANDLE  SectionHandle,
_In_ SECTION_INFORMATION_CLASS  SectionInformationClass,
_Out_ PVOID  SectionInformation,
_In_ SIZE_T  Length,
_Out_opt_ PSIZE_T  ResultLength 
)

◆ ZwQueryVirtualMemory()

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 
)

◆ ZwReadVirtualMemory()

NTSYSAPI NTSTATUS NTAPI ZwReadVirtualMemory ( _In_ HANDLE  ProcessHandle,
_In_ PVOID  BaseAddress,
_Out_ PVOID  Buffer,
_In_ SIZE_T  NumberOfBytesToRead,
_Out_opt_ PSIZE_T  NumberOfBytesRead 
)

◆ ZwUnlockVirtualMemory()

NTSYSAPI NTSTATUS NTAPI ZwUnlockVirtualMemory ( _In_ HANDLE  ProcessHandle,
_Inout_ PVOID BaseAddress,
_Inout_ PSIZE_T  NumberOfBytesToUnlock,
_In_ ULONG  MapType 
)

◆ ZwWriteVirtualMemory()

NTSYSAPI NTSTATUS NTAPI ZwWriteVirtualMemory ( _In_ HANDLE  ProcessHandle,
_In_ PVOID  BaseAddress,
_In_ PVOID  Buffer,
_In_ SIZE_T  NumberOfBytesToWrite,
_Out_opt_ PSIZE_T  NumberOfBytesWritten 
)

Variable Documentation

◆ AllocationAttributes

◆ AllocationType

◆ BaseAddress

_Inout_ PVOID * BaseAddress

Definition at line 404 of file mmfuncs.h.

Referenced by $endif(), __RtlImageDirectoryEntryToData(), __RtlImageRvaToVa(), _IRQL_requires_max_(), _MiFlushMappedSection(), _MiMapViewOfSegment(), AdvancedErrorChecks(), AVrfpIsVerifierProviderDll(), AVrfpLdrGetProcedureAddress(), BehaviorChecks(), BiosDiskService(), BiosMiscService(), BiosMouseEnable(), BlImgLoadImageWithProgress2(), CalcCheckSum(), can_enumerate(), CcCopyData(), CcPerformReadAhead(), CcPreparePinWrite(), CcpUnpinData(), CcRosGetVacb(), CcRosMapVacbInKernelSpace(), CcRosRequestVacb(), CheckAdjacentVADs(), CheckAlignment(), CheckSize(), CheckSomeDefaultAddresses(), CheckSumMappedFile(), CmpInitializeMachineDependentConfiguration(), CpuExceptionFilter(), CreateProcessInternalW(), DbgkMapViewOfSection(), DbgkUnMapViewOfSection(), DECLARE_INTERFACE_(), DiskBios32Post(), DosBIOSInitialize(), DosClonePsp(), DosCreatePsp(), DosInt21h(), DosLoadExecutableInternal(), DosMouseCleanup(), DosMouseDisable(), DosMouseEnable(), DosMouseInitialize(), DosTerminateProcess(), ExLockUserBuffer(), ExpComputePartialHashForAddress(), FAT12CountAvailableClusters(), FAT12FindAndMarkAvailableCluster(), FAT12GetNextCluster(), FAT12WriteCluster(), FAT16CountAvailableClusters(), FAT16FindAndMarkAvailableCluster(), FAT16GetNextCluster(), FAT16WriteCluster(), FAT32CountAvailableClusters(), FAT32FindAndMarkAvailableCluster(), FAT32GetNextCluster(), FAT32WriteCluster(), FileSectionViewPermissionCheck(), find_entry(), FlushViewOfFile(), GetEbdaLocation(), GetProcessVersion(), HalpMapPhysicalMemory64Vista(), HandlePageFault(), IMAGEHLP_RecalculateChecksum(), InitializeBiosInt32(), InitializeModeTable(), IntAgpCommitVirtual(), IntAgpFreeVirtual(), IntVideoPortImageDirectoryEntryToData(), IopLoadServiceModule(), IopLoadUnloadDriver(), is_data_file_module(), KdpSysReadControlSpace(), KdpSysWriteControlSpace(), Ke386SetGdtEntryBase(), KeSweepICache(), LdrAccessResource(), LdrAddRefDll(), LdrDisableThreadCalloutsForDll(), LdrFindResource_U(), LdrFindResourceDirectory_U(), LdrGetProcedureAddress(), LdrLoadDll(), LdrpAccessResource(), LdrpAllocateDataTableEntry(), LdrpCallInitRoutine(), LdrPEGetExportByName(), LdrpFetchAddressOfSecurityCookie(), LdrpGetProcedureAddress(), LdrpLoadDll(), LdrRelocateImage(), LdrRelocateImageWithBias(), LdrUnloadDll(), LdrVerifyMappedImageMatchesChecksum(), LlbAllocateMemoryEntry(), LoadModule(), LoadOle32Export(), main(), MapFileAndCheckSumA(), MapFileAndCheckSumW(), MemCleanup(), MemInitialize(), MiAddHalIoMappings(), MiAllocateContiguousMemory(), MiBuildPfnDatabaseFromPages(), MiCacheImageSymbols(), MiCheckForContiguousMemory(), MiCheckVadsForLockOperation(), MiCreateArm3StaticMemoryArea(), MiCreatePebOrTeb(), MiFindContiguousMemory(), MiFreeContiguousMemory(), MiInsertVadEx(), MiLoadUserSymbols(), MiLockVirtualMemory(), MiMapLockedPagesInUserSpace(), MiMapViewOfDataSection(), MiProtectVirtualMemory(), MiQueryMemoryBasicInformation(), MiQueryMemorySectionName(), MiReadPage(), MiRemoveMappedPtes(), MiRosCleanupMemoryArea(), MiRosProtectVirtualMemory(), MiRosUnmapViewOfSection(), MiUnlockVirtualMemory(), MiUnmapLockedPagesInUserSpace(), MiUnmapViewOfSection(), MmAllocateNonCachedMemory(), MmAlterRegion(), MmAlterViewAttributes(), MmCreateKernelStack(), MmCreateMemoryArea(), MmFindRegion(), MmFreeContiguousMemory(), MmFreeContiguousMemorySpecifyCache(), MmFreeNonCachedMemory(), MmMapIoSpace(), MmMapLockedPagesSpecifyCache(), MmMapViewOfArm3Section(), MmMapViewOfSection(), MmMapViewOfSegment(), MmPapAllocatePagesInRange(), MmPapAllocatePhysicalPagesInRange(), MmProtectSectionView(), MmUnloadSystemImage(), MmUnmapIoSpace(), MmUnmapLockedPages(), MmUnmapVideoDisplay(), MmUnmapViewOfCacheSegment(), MmUnmapViewOfSection(), MmUnmapViewOfSegment(), MmVerifyImageIsOkForMpUse(), NtFlushInstructionCache(), NtFlushVirtualMemory(), NtGetVersionResource(), NtGetWriteWatch(), NtLockVirtualMemory(), NtMapViewOfSection(), NtProtectVirtualMemory(), NtQueryVirtualMemory(), NtReadVirtualMemory(), NtResetWriteWatch(), NtUnlockVirtualMemory(), NtUnmapViewOfSection(), NtWriteVirtualMemory(), OpenAndMapFile(), PageFileBehaviorChecks(), PcMemGetBiosMemoryMap(), PpcGetMemoryMap(), PropertyLengthAsVariant(), RamdiskCreateDiskDevice(), RamdiskGetPartitionInfo(), RamdiskReadWriteReal(), RamdiskSetPartitionInfo(), RamdiskUnmapPages(), ReadWriteOrZero(), ReserveMemory(), RtlConvertPropertyToVariant(), RtlConvertVariantToProperty(), RtlDebugGetUserInfoHeap(), RtlDebugSetUserFlagsHeap(), RtlDebugSetUserValueHeap(), RtlDestroyHeap(), RtlFindMessage(), RtlGetUserInfoHeap(), RtlImageDirectoryEntryToData(), RtlImageRvaToVa(), RtlpDebugPageHeapValidate(), RtlpDestroyHeapSegment(), RtlpDphNormalHeapValidate(), RtlpInitEnvironment(), RtlpPageHeapGetUserInfo(), RtlpPageHeapSetUserFlags(), RtlpPageHeapSetUserValue(), RtlpPageHeapSize(), RtlSetUserFlagsHeap(), RtlSetUserValueHeap(), ScrCreate(), ScrLoadFontTable(), SE_IsShimDll(), SeiCheckComPlusImage(), SeiCreateShimModuleInfo(), SeiFindHookModuleInfo(), SeiGetShimModuleInfo(), SeiInit(), SerialDetectUartType(), SetMemory(), SimpleErrorChecks(), START_TEST(), supports_rsym(), SystemProcessWorker(), Test_ImageSection2(), test_pack_MEMORY_BASIC_INFORMATION(), Test_PageFileSection(), Test_SectionContents(), test_SymFromAddr(), test_SymFromName(), test_SymRegCallback(), Test_Truncate(), TestMap(), UnMapFile(), VbeGetVideoMemoryBaseAddress(), VbeSetMode(), VdmpInitialize(), VidBiosDrawGlyph(), VidBiosPost(), VidBiosSetVideoMode(), VidBiosVideoService(), VideoPortLockBuffer(), VirtualLock(), VirtualUnlock(), and Write().

◆ CommitSize

◆ DesiredAccess

_In_ ACCESS_MASK DesiredAccess

Definition at line 360 of file mmfuncs.h.

◆ FileHandle

◆ FreeType

◆ InheritDisposition

◆ MaximumSize

◆ ObjectAttributes

Definition at line 360 of file mmfuncs.h.

◆ ProcessHandle

_In_ HANDLE ProcessHandle

Definition at line 403 of file mmfuncs.h.

Referenced by BaseCheckForVDM(), BasepReplaceProcessThreadTokens(), BasePushProcessParameters(), ConDrvCreateScreenBuffer(), CreateProcessInternalW(), CSR_API(), GetProcessVersion(), GRAPHICS_BUFFER_Initialize(), IntAgpReserveVirtual(), IntVideoPortMapMemory(), IsProcessInJob(), LsapCheckLogonProcess(), LsapEnumLogonSessions(), LsapGetLogonSessionData(), MiQueryMemoryBasicInformation(), MiQueryMemorySectionName(), NtAllocateVirtualMemory(), NtAssignProcessToJobObject(), NtCreateProcess(), NtCreateProcessEx(), NtCreateThread(), NtDebugActiveProcess(), NtFlushInstructionCache(), NtFlushVirtualMemory(), NtFreeVirtualMemory(), NtGetWriteWatch(), NtIsProcessInJob(), NtLockVirtualMemory(), NtMapViewOfSection(), NtOpenProcess(), NtOpenProcessToken(), NtOpenProcessTokenEx(), NtProtectVirtualMemory(), NtQueryInformationProcess(), NtQueryVirtualMemory(), NtReadVirtualMemory(), NtRemoveProcessDebug(), NtResetWriteWatch(), NtResumeProcess(), NtSetInformationProcess(), NtSuspendProcess(), NtTerminateProcess(), NtUnlockVirtualMemory(), NtUnmapViewOfSection(), NtUserProcessConnect(), NtUserResolveDesktop(), NtWriteVirtualMemory(), OpenProcess(), OpenProcessToken(), ProcessIdToSessionId(), PsaEnumerateProcessModules(), PsCreateSystemProcess(), PsCreateSystemThread(), PsOpenTokenOfProcess(), PspCreateProcess(), PspCreateThread(), RtlCreateUserThread(), RtlFreeUserThreadStack(), RtlInitializeContext(), RtlpInitEnvironment(), RtlpQueryRemoteProcessModules(), SmpExecPgm(), SmpGetProcessMuSessionId(), SmpHandleConnectionRequest(), SmpInit(), SmpSetProcessMuSessionId(), StuffStdHandle(), TEXTMODE_BUFFER_Initialize(), WahOpenCurrentThread(), and wait_process_handle().

◆ RegionSize

◆ SectionOffset

◆ SectionPageProtection

◆ ViewSize

Definition at line 404 of file mmfuncs.h.

Referenced by _Function_class_(), _MiMapViewOfSegment(), AdvancedErrorChecks(), BasepLoadLibraryAsDatafile(), BehaviorChecks(), CcpMapData(), CmpInitializeMachineDependentConfiguration(), ConDrvGetConsoleScreenBufferInfo(), CSR_API(), CsrSrvAttachSharedSection(), CsrSrvCreateSharedSection(), ExpInitNls(), FileSectionViewPermissionCheck(), GRAPHICS_BUFFER_Initialize(), GuiApplyUserSettings(), GuiConsoleShowConsoleProperties(), Heap32ListFirst(), Heap32ListNext(), IntGdiAddFontResource(), IntMapDesktopView(), IntUserHeapCreate(), LdrpCheckForLoadedDll(), LdrpMapDll(), LdrVerifyImageMatchesChecksum(), MapGlobalUserHeap(), MapViewOfFileEx(), MiInsertVadEx(), MiLoadImageSection(), MiMapViewInSystemSpace(), MiMapViewOfDataSection(), MmCheckSystemImage(), MmCommitSessionMappedView(), MmCreatePeb(), MmInitializeProcessAddressSpace(), MmMapCacheViewInSystemSpaceAtOffset(), MmMapViewInSessionSpace(), MmMapViewInSystemSpace(), MmMapViewOfArm3Section(), MmMapViewOfSection(), MmMapViewOfSegment(), Module32FirstW(), Module32NextW(), NtMapViewOfSection(), OpenAndMapFile(), PageFileBehaviorChecks(), Process32FirstW(), Process32NextW(), PspMapSystemDll(), RtlCreateQueryDebugBuffer(), RtlDestroyQueryDebugBuffer(), SimpleErrorChecks(), SystemProcessWorker(), Test_BasedSection(), Test_ImageSection(), Test_ImageSection2(), Test_PageFileSection(), Test_SectionContents(), Test_Truncate(), TestPhysicalMemorySection(), TH32CreateSnapshotSectionInitialize(), Thread32First(), Thread32Next(), and VdmpInitialize().

◆ Win32Protect

◆ ZeroBits