我想调用api编辑(*.res)文件,但是搞了半天也没成,大家帮个忙? .net framework里有现成的,在第一张光盘搜索reseditor,可以编辑.resx和.resource 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 老三,我说的是.res资源模板文件,是VB6或是VC++中的,不是你所说的.resx和.resource. System.Resources.ResourceReader andSystem.Resources.ResourceWriter TO: cometsky(天空中自由翱翔的彗星)我说的是.res文件不是.resx和.resource文件用ResourceReader读的时候报错。无效的文件格式。但.res绝对是好的。 Try this:[DllImport("kernel32.dll")]public static extern IntPtr FindResource(int hModule, [MarshalAs(UnmanagedType.LPWStr)] string lpName, [MarshalAs(UnmanagedType.LPWStr)] string lpType); or[DllImport("kernel32.dll")]public static extern IntPtr FindResource(IntPtr hModule, [MarshalAs(UnmanagedType.LPWStr)] string lpName, [MarshalAs(UnmanagedType.LPWStr)] string lpType); hModulec参数是指向.exe或.dll的句柄,我是打开一个存在的.res文件,并在C#中调用,那么我将hModule的值设为什么好?假如res文件是1.res,我的调用方法是FindResource(0,"1.res","RT_STRING"),这样的返回结果是0,这是不对的,那么对的应该怎么写? To thinkc(【抗火,抗冰冻,抗闪电,物理攻击无效】) Try this:[DllImport("kernel32.dll")]public static extern IntPtr FindResource(IntPtr hModule, [MarshalAs(UnmanagedType.LPWStr)] string lpName, [MarshalAs(UnmanagedType.LPWStr)] string lpType);FindResource(IntPtr.Zero,"1.res","RT_STRING") Excel.Application excel = new Excel.Application()抛出异常??? 如何实现C#登陆后过段时间永远在线,不必重新登陆 新手求助 数据库导入导出问题 高手进来帮忙,急救,C#2.0中是不是不能使用键盘钩子了 请教个vs2005连接sql2000的问题? ??? gif的网页是文本文件么? 关于委托的疑问 请教一个在ASP.NET页面中,用C#执行CMD命令行的问题,谢谢! 关于字符串的问题。 c# 关于 关于DATASET的问题
and
System.Resources.ResourceWriter
我说的是.res文件不是.resx和.resource文件
用ResourceReader读的时候报错。无效的文件格式。但.res绝对是好的。
public static extern IntPtr FindResource(int hModule,
[MarshalAs(UnmanagedType.LPWStr)] string lpName,
[MarshalAs(UnmanagedType.LPWStr)] string lpType);
public static extern IntPtr FindResource(IntPtr hModule,
[MarshalAs(UnmanagedType.LPWStr)] string lpName,
[MarshalAs(UnmanagedType.LPWStr)] string lpType);
假如res文件是1.res,
我的调用方法是FindResource(0,"1.res","RT_STRING"),这样的返回结果是0,这是不对的,那么对的应该怎么写?
[DllImport("kernel32.dll")]
public static extern IntPtr FindResource(IntPtr hModule,
[MarshalAs(UnmanagedType.LPWStr)] string lpName,
[MarshalAs(UnmanagedType.LPWStr)] string lpType);FindResource(IntPtr.Zero,"1.res","RT_STRING")