34 lpFileMappingAttributes,
48 DWORD dwMaximumSizeHigh,
49 DWORD dwMaximumSizeLow,
105 lpFileMappingAttributes,
109 if (dwMaximumSizeLow || dwMaximumSizeHigh)
113 SectionSize->
LowPart = dwMaximumSizeLow;
114 SectionSize->
HighPart = dwMaximumSizeHigh;
154 return SectionHandle;
163 DWORD dwDesiredAccess,
164 DWORD dwFileOffsetHigh,
165 DWORD dwFileOffsetLow,
166 SIZE_T dwNumberOfBytesToMap,
180 ViewBase = lpBaseAddress;
231 DWORD dwDesiredAccess,
232 DWORD dwFileOffsetHigh,
233 DWORD dwFileOffsetLow,
234 SIZE_T dwNumberOfBytesToMap)
241 dwNumberOfBytesToMap,
344 return SectionHandle;
357 SIZE_T NumberOfBytesToFlush = dwNumberOfBytesToFlush;
363 &NumberOfBytesToFlush,
NTSTATUS NTAPI NtUnmapViewOfSection(IN HANDLE ProcessHandle, IN PVOID BaseAddress)
NTSTATUS NTAPI NtCreateSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN PLARGE_INTEGER MaximumSize OPTIONAL, IN ULONG SectionPageProtection OPTIONAL, IN ULONG AllocationAttributes, IN HANDLE FileHandle OPTIONAL)
NTSTATUS NTAPI NtOpenSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtMapViewOfSection(IN HANDLE SectionHandle, IN HANDLE ProcessHandle, IN OUT PVOID *BaseAddress, IN ULONG_PTR ZeroBits, IN SIZE_T CommitSize, IN OUT PLARGE_INTEGER SectionOffset OPTIONAL, IN OUT PSIZE_T ViewSize, IN SECTION_INHERIT InheritDisposition, IN ULONG AllocationType, IN ULONG Protect)
#define ConvertWin32AnsiObjectApiToUnicodeApi(obj, name,...)
#define ConvertOpenWin32AnsiObjectApiToUnicodeApi(obj, acc, inh, name)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
HANDLE WINAPI BaseGetNamedObjectDirectory(VOID)
POBJECT_ATTRIBUTES WINAPI BaseFormatObjectAttributes(OUT POBJECT_ATTRIBUTES ObjectAttributes, IN PSECURITY_ATTRIBUTES SecurityAttributes OPTIONAL, IN PUNICODE_STRING ObjectName)
IN PDCB IN POEM_STRING IN PUNICODE_STRING UnicodeName
HANDLE NTAPI OpenFileMappingW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
LPVOID NTAPI MapViewOfFileEx(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap, LPVOID lpBaseAddress)
BOOL NTAPI FlushViewOfFile(IN LPCVOID lpBaseAddress, IN SIZE_T dwNumberOfBytesToFlush)
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
HANDLE NTAPI OpenFileMappingA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
SIZE_T NTAPI LocalSize(HLOCAL hMem)
#define ERROR_ALREADY_EXISTS
static OUT PIO_STATUS_BLOCK IoStatusBlock
static BOOL bInheritHandle
#define InitializeObjectAttributes(p, n, a, r, s)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
_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
#define SECTION_MAP_EXECUTE
#define SECTION_MAP_WRITE
#define PAGE_EXECUTE_READ
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define NtCurrentProcess()
#define PAGE_EXECUTE_WRITECOPY
#define PAGE_EXECUTE_READWRITE
#define STANDARD_RIGHTS_REQUIRED
NTSTATUS NTAPI NtFlushVirtualMemory(IN HANDLE ProcessHandle, IN OUT PVOID *BaseAddress, IN OUT PSIZE_T NumberOfBytesToFlush, OUT PIO_STATUS_BLOCK IoStatusBlock)
#define STATUS_OBJECT_NAME_EXISTS
#define STATUS_INVALID_PAGE_PROTECTION
DWORD BaseSetLastNTError(IN NTSTATUS Status)
BOOLEAN NTAPI RtlFlushSecureMemoryCache(IN PVOID MemoryCache, IN OPTIONAL SIZE_T MemoryLength)
#define STATUS_NOT_MAPPED_DATA
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_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