public static SafeMemoryMappedFileHandle CreateFileMapping(
         IntPtr hFile,
         ref mincore.SECURITY_ATTRIBUTES securityAttributes,
         int pageProtection,
         long maximumSize,
         string name)
 {
     return Interop.mincore.CreateFileMappingFromApp(hFile, ref securityAttributes, pageProtection, maximumSize, name);
 }
예제 #2
0
    public static SafeMemoryMappedFileHandle CreateFileMapping(
            IntPtr hFile,
            ref mincore.SECURITY_ATTRIBUTES securityAttributes,
            int pageProtection,
            long maximumSize,
            string name)
    {
        // split the long into two ints
        int capacityHigh, capacityLow;
        SplitLong(maximumSize, out capacityHigh, out capacityLow);

        return Interop.mincore.CreateFileMapping(hFile, ref securityAttributes, pageProtection, capacityHigh, capacityLow, name);
    }