using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32.SafeHandles;

namespace Valg.EVA.Skanning.Services.Security
{
	internal sealed class SafeTokenHandle : SafeHandleZeroOrMinusOneIsInvalid
	{
		internal SafeTokenHandle(IntPtr handle)
			: base(true)
		{
			this.handle = handle;
		}

		protected override bool ReleaseHandle()
		{
			return NativeMethods.CloseHandle(handle);
		}
	}
}

