3 // Copyright (c) Microsoft Corporation. All rights reserved.
8 using System.Reflection;
9 using System.Runtime.CompilerServices;
10 using System.Runtime.ConstrainedExecution;
11 using System.Runtime.InteropServices;
12 using System.Security;
14 namespace Microsoft.Win32.SafeHandles
17 /// Handle to a VM PEFile *
20 internal sealed class SafePEFileHandle : SafeHandleZeroOrMinusOneIsInvalid
22 private SafePEFileHandle() : base(true)
26 [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
27 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
28 [SuppressUnmanagedCodeSecurity]
29 private static extern void ReleaseSafePEFileHandle(IntPtr peFile);
32 protected override bool ReleaseHandle()
34 ReleaseSafePEFileHandle(handle);