mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
21 lines
606 B
C#
21 lines
606 B
C#
using System;
|
|
using System.Runtime.ConstrainedExecution;
|
|
using Microsoft.Win32.SafeHandles;
|
|
|
|
namespace SevenZipExtractor
|
|
{
|
|
internal sealed class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid
|
|
{
|
|
public SafeLibraryHandle() : base(true)
|
|
{
|
|
}
|
|
|
|
/// <summary>Release library handle</summary>
|
|
/// <returns>true if the handle was released</returns>
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
protected override bool ReleaseHandle()
|
|
{
|
|
return Kernel32Dll.FreeLibrary(this.handle);
|
|
}
|
|
}
|
|
} |