initial commit
Pulsar .NET 9.0 Windows Release / build (push) Waiting to run
Mirror to Codeberg and Gitea / mirror (push) Waiting to run

This commit is contained in:
i2p
2026-08-27 10:57:58 -06:00
commit 773d05f8f1
1038 changed files with 109261 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
using Pulsar.Client.Config;
using Pulsar.Client.IO;
using System;
using System.Diagnostics;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
namespace Pulsar.Client
{
internal static class Program
{
[DllImport("user32.dll", SetLastError = true)]
private static extern IntPtr GetThreadDesktop(uint dwThreadId);
[DllImport("kernel32.dll")]
private static extern uint GetCurrentThreadId();
[DllImport("user32.dll", SetLastError = true)]
private static extern bool SetProcessDPIAware();
[STAThread]
private static void Main()
{
// enable TLS 1.2
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
SetProcessDPIAware();
// Set the unhandled exception mode to force all Windows Forms errors to go through our handler
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
SaveOriginalDesktop();
Application.Run(new PulsarApplication());
}
private static void SaveOriginalDesktop()
{
Settings.OriginalDesktopPointer = GetThreadDesktop(GetCurrentThreadId());
}
}
}