Files
SabreTools.Serialization/SabreTools.Wrappers/_EXTERNAL/StormLibSharp/Native/MpqFileSafeHandle.cs

25 lines
511 B
C#
Raw Normal View History

2025-11-02 21:41:58 -05:00
using System;
using Microsoft.Win32.SafeHandles;
2025-11-02 21:11:39 -05:00
namespace StormLibSharp.Native
{
internal sealed class MpqFileSafeHandle : SafeHandleZeroOrMinusOneIsInvalid
{
public MpqFileSafeHandle(IntPtr handle)
: base(true)
{
2025-11-03 08:36:12 -05:00
SetHandle(handle);
2025-11-02 21:11:39 -05:00
}
public MpqFileSafeHandle()
: base(true)
{
}
protected override bool ReleaseHandle()
{
2025-11-03 08:36:12 -05:00
return NativeMethods.SFileCloseFile(handle);
2025-11-02 21:11:39 -05:00
}
}
}