-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cs
More file actions
35 lines (30 loc) · 1.09 KB
/
Main.cs
File metadata and controls
35 lines (30 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using BSS.Random;
using System.Windows.Forms;
using System.Runtime.InteropServices;
internal static partial class Program
{
[STAThread]
private static void Main()
{
ComWrappers.RegisterForMarshalling(WinFormsComInterop.WinFormsComWrappers.Instance);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (!Resources.Initialized)
{
MessageBox.Show("Failed to initialize resources", "Internal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!DwmInterop.Initialize())
{
MessageBox.Show("Failed to initialize DwmInterop", "Internal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (HWRandom.GetSupportedInstructions() != HWRandom.SupportedInstructions.All)
{
MessageBox.Show("RDSEED not supported!", "Environment Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
MainWindow.Run();
}
}