From 7870e9741e2ccd777f78cc5ef9af993431e5e2f3 Mon Sep 17 00:00:00 2001 From: David Hall Date: Fri, 16 Sep 2022 16:24:37 -0600 Subject: [PATCH] Fixed Kernel32.MapViewOfFileEx parameter #316 --- PInvoke/Kernel32/MemoryApi.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PInvoke/Kernel32/MemoryApi.cs b/PInvoke/Kernel32/MemoryApi.cs index 29e35cd0..ef987633 100644 --- a/PInvoke/Kernel32/MemoryApi.cs +++ b/PInvoke/Kernel32/MemoryApi.cs @@ -1666,7 +1666,7 @@ namespace Vanara.PInvoke // dwFileOffsetLow, _In_ SIZE_T dwNumberOfBytesToMap); [DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true)] [PInvokeData("WinBase.h", MSDNShortId = "aa366761")] - public static extern IntPtr MapViewOfFile([In] HSECTION hFileMappingObject, FILE_MAP dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, uint dwNumberOfBytesToMap); + public static extern IntPtr MapViewOfFile([In] HSECTION hFileMappingObject, FILE_MAP dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, SizeT dwNumberOfBytesToMap); /// /// Maps a view of a file or a pagefile-backed section into the address space of the specified process. @@ -1866,7 +1866,7 @@ namespace Vanara.PInvoke // dwFileOffsetLow, _In_ SIZE_T dwNumberOfBytesToMap, _In_opt_ LPVOID lpBaseAddress); [DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true)] [PInvokeData("WinBase.h", MSDNShortId = "aa366763")] - public static extern IntPtr MapViewOfFileEx([In] HSECTION hFileMappingObject, FILE_MAP dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, uint dwNumberOfBytesToMap, + public static extern IntPtr MapViewOfFileEx([In] HSECTION hFileMappingObject, FILE_MAP dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, SizeT dwNumberOfBytesToMap, [In] IntPtr lpBaseAddress); /// Maps a view of a file mapping into the address space of a calling Windows Store app.