Hallo ich bin gerade um bei Mir auf Meinem Localen Pc zu Testen mit Mono
Nur habe ich jetzt ein Grösseres Problem
root@vs3614:/home/habbo# mono "Phoenix.exe"[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: Kernel32 at (wrapper managed-to-native) Phoenix.Program:SetConsoleCtrlHandler (Phoenix.Program/EventHandler,bool) at Phoenix.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
Hier der code in PHX
namespace Phoenix
{
internal class Program
{
private delegate bool EventHandler(CtrlType sig);
private enum CtrlType
{
CTRL_BREAK_EVENT = 1,
CTRL_C_EVENT = 0,
CTRL_CLOSE_EVENT = 2,
CTRL_LOGOFF_EVENT = 5,
CTRL_SHUTDOWN_EVENT = 6
}
private static bool bool_0 = false;
private static EventHandler delegate0_0;
[DllImport("Kernel32")]
private static extern bool SetConsoleCtrlHandler(Program.EventHandler handler, bool add);
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
public static void Main(string[] args)
{
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(Program.smethod_0);
Program.delegate0_0 = (Program.EventHandler)Delegate.Combine(Program.delegate0_0, new Program.EventHandler(Program.smethod_1));
Program.SetConsoleCtrlHandler(Program.delegate0_0, true);
try
{
Phoenix @class = new Phoenix();
if (Licence.smethod_0(false))
{
return;
}
@class.Initialize();
Program.bool_0 = true;
}
catch (Exception ex)
{
Console.Write(ex.ToString());
}
while (true)
{
Console.ReadKey();
}
}
Wenn ihr Vileicht wiessen Könnt was ich da Machen könnte wäre ich dankbar