c# - 为什么这个字节在我的 Program.cs 中抛出空异常
问题描述
我的 Program.cs 中的代码 不要评判我,但我正在尝试为 roblox 漏洞利用创建一个 imgui(副本),因为有人要求它我不知道要在这里添加它只是说我需要添加详细信息,所以我正在尝试这样做是打包我引用的 dll
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ImguiBase
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
AppDomain.CurrentDomain.AssemblyResolve += (Object sender, ResolveEventArgs args) =>
{
String thisExe = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
System.Reflection.AssemblyName embeddedAssembly = new System.Reflection.AssemblyName(args.Name);
String resourceName = thisExe + "." + embeddedAssembly.Name + ".dll";
using (var stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
{
Byte[] assemblyData = new Byte[stream.Length];
stream.Read(assemblyData, 0, assemblyData.Length);
return System.Reflection.Assembly.Load(assemblyData);
}
};
Application.Run(new Form1());
}
}
}
解决方案
推荐阅读
- sql - 遇到除以零错误。当联合代码
- ios - NSNumberFormatter 没有按预期工作
- gtk3 - 如何获取已知GDK窗口所属的WNCK窗口?
- java - 生菜使用带有非字符串、字符串编解码器的 RedisAsyncCommands
- javascript - 有没有办法使用 chess.js 启用促销不足?
- flutter - Flutter Json 错误路径 = '/data/user/0/com.example.projeto1/app_flutter/data.json' (操作系统错误:没有这样的文件或目录,errno = 2)
- flash - Adobe AIR - 描述符文件中内容标签的动态 SWF 值
- php - 如何运行
- python - 安装 Kivy 时出错(错误:退出状态为 1 的命令出错:python setup.py egg_info 检查日志以获取完整的命令输出。)
- c++ - 在这种情况下我应该使用 lock_guard、scoped_lock 还是 unique_lock?