1
0
mirror of https://github.com/mastercodeon314/KsDumper-11.git synced 2024-11-28 08:20:53 +01:00
KsDumper-11/KsDumper11/Program.cs

56 lines
1.3 KiB
C#
Raw Normal View History

using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
2023-01-22 02:32:57 +01:00
using KsDumper11.Driver;
2023-01-22 02:32:57 +01:00
namespace KsDumper11
{
public class Program
{
[STAThread]
private static void Main()
{
KduSelfExtract.DisableDriverBlockList();
KduSelfExtract.Extract();
2023-01-23 05:06:08 +01:00
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
bool driverOpen = KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper");
//Debugger.Break();
2023-01-23 05:06:08 +01:00
if (!driverOpen)
{
if (!File.Exists(KduSelfExtract.AssemblyDirectory + @"\\Providers.json"))
{
// Run the selector here to populate the providers and set a default provider.
Application.Run(new ProviderSelector());
Application.Run(new Dumper());
}
else
{
KduWrapper wr = new KduWrapper(KduSelfExtract.AssemblyDirectory + @"\Driver\kdu.exe");
wr.LoadProviders();
wr.Start();
if (KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
Application.Run(new Dumper());
}
else
{
Environment.Exit(0);
}
}
}
else
{
Application.Run(new Dumper());
}
}
}
}