编辑资源RCDATA从LockResource获取 [英] Edit resource RCDATA Getten form LockResource

查看:72
本文介绍了编辑资源RCDATA从LockResource获取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这段代码,我想直接在内存中编辑资源,然后再将其附加到另一个exe文件.或者至少我可以将数据复制到字节数组中.

 hExe = LoadLibrary(Application.StartupPath +"\ exeicon.exe")
            如果(hExe = 0),则MsgBox(无法加载exeicon",MsgBoxStyle.OkOnly,"Error"):退出子程序
            hRes = FindResource(hExe,106,10)
            lpResLock = LockResource(hRes)

以及为什么我不能这样定义?

DIM作为byte()=新的Byte()

解决方案

使用ReDim创建一个新数组.或将Dim s(9)作为字节"

关于LockResource:这有帮助吗?
在Managed C ++中使用LoadResource从DLL加载JPEG图像

是的,这是另一种语言,但是基于.Net.


Hi 

I have this code and I want to edit the resource in the memory directly before I append it to another exe file .or at least I can copy the data to an array of byte .

            hExe = LoadLibrary(Application.StartupPath + "\exeicon.exe")
            If (hExe = 0) Then MsgBox("Couldn't load the exeicon", MsgBoxStyle.OkOnly, "Error") : Exit Sub
            hRes = FindResource(hExe, 106, 10) 
            lpResLock = LockResource(hRes)

and why I cannot define like this ?? 

DIM s as byte() = new Byte() 

解决方案

Use ReDim to create a new array. Or "Dim s(9) as byte"

Regarding LockResource: Does this help?
Load JPEG images from DLL with LoadResource in Managed C++

yes, it's a different language, but .Net based.


这篇关于编辑资源RCDATA从LockResource获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆