﻿// Decompiled with JetBrains decompiler
// Type: Plugin.Helper.Browsers.SortFileTimeAscendingHelper
// Assembly: PluginPasswordRecovery, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E94068A8-BD3A-4D1E-9D36-4F12AED48A05
// Assembly location: C:\Users\ian\Downloads\Telegram Desktop\fein\Plugins\PluginPasswordRecovery.dll

using System.Collections;
using System.Runtime.InteropServices;


namespace Plugin.Helper.Browsers
{
	public class SortFileTimeAscendingHelper : IComparer
	{
		int IComparer.Compare(object a, object b)
        {
            STATURL statA = (STATURL)a;
            STATURL statB = (STATURL)b;

            return SortFileTimeAscendingHelper.CompareFileTime(
                ref statA.ftLastVisited,
                ref statB.ftLastVisited
            );
        }

		[DllImport("Kernel32.dll")]
		private static extern int CompareFileTime([In] ref System.Runtime.InteropServices.ComTypes.FILETIME lpFileTime1, [In] ref System.Runtime.InteropServices.ComTypes.FILETIME lpFileTime2);

		public static IComparer SortFileTimeAscending()
		{
			return (IComparer) new SortFileTimeAscendingHelper();
		}
	}
}
