private void CheckDotNetPE(string path)
{
FileStream fs = new FileStream(path, FileMode.Open);
BinaryReader br = new BinaryReader(fs);
fs.Seek(360L, SeekOrigin.Begin);
int temp = (int)br.ReadUInt32();
if (temp == 8200)
{
MessageBox.Show("该程序由于 C#/VB.NET 编译");
}
else
{
MessageBox.Show("未知");
} br.Close();
fs.Close();
}
请看下这个函数写得正不正确。请问这样判断.net pe 文件正确吗?
解决方案 »
- 求一个C#写的通过调用WinAPI来实现的连接VPN的一段代码~
- 哪个数据归一化公式比较好
- 关于二维数组的一个问题
- 急!用.NET如何实现 “短信平台”也就是 “用一台内部服务器的USB接口,实现向手机发短信。。不通过Internet网" 谢谢^_^ 高分赠送啊。。
- 一个关于概念的问题
- sql server 数据有关问题,大家帮忙~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 为什么winform中media控件的endofstream事件不能被触发
- 急!!!求助:WebService直接启动错误,WebService中可用类型有何限制?
- 怎样在.NET中察看OCX控件的方法!!
- 关于Timer的启动和关闭!谢谢……
- 为什么项目最高的"解决方案:XXXXXXX"不见了?
- ListView背景图片(BackgroundImageTiled)问题
VS2005开发的肯定有一个namespace. try
{
System.Reflection.Assembly ass = System.Reflection.Assembly.LoadFile("c:\\regedit.exe");
//如果不是VS2005开发的程序,第一句都过不去。不信试试
System.Reflection.Module[] ms = ass.GetModules();
int i = ms.Length;
}
catch (Exception ee)
{
MessageBox.Show("This Execute File is Not built by VS2005")
}