var
ResourceLocation: HRSRC;
ResourceSize: LongWord;
ResourceHandle: THandle;
ResourcePointer: Pointer;
----------------------------
ResourceLocation := FindResource(HInstance, 'TXTFILE', RT_RCDATA);
if ResourceLocation <> 0 then
begin
ResourceSize := SizeofResource(HInstance, ResourceLocation);
if ResourceSize <> 0 then
begin
ResourceHandle := LoadResource(HInstance, ResourceLocation);
if ResourceHandle <> 0 then
begin
ResourcePointer := LockResource(ResourceHandle);
if ResourcePointer <> nil then
begin
我想在这里对ResourcePointer指向的里面长度为ResourceSize的内容加密
请问我该如何做?
能直接对ResourcePointer的内容进行操作嘛?
end;
end;
end;
end;
ResourceLocation: HRSRC;
ResourceSize: LongWord;
ResourceHandle: THandle;
ResourcePointer: Pointer;
----------------------------
ResourceLocation := FindResource(HInstance, 'TXTFILE', RT_RCDATA);
if ResourceLocation <> 0 then
begin
ResourceSize := SizeofResource(HInstance, ResourceLocation);
if ResourceSize <> 0 then
begin
ResourceHandle := LoadResource(HInstance, ResourceLocation);
if ResourceHandle <> 0 then
begin
ResourcePointer := LockResource(ResourceHandle);
if ResourcePointer <> nil then
begin
我想在这里对ResourcePointer指向的里面长度为ResourceSize的内容加密
请问我该如何做?
能直接对ResourcePointer的内容进行操作嘛?
end;
end;
end;
end;
解决方案 »
- 100分 求一个方案 局域网中客户端上Delphi将文件上传到服务器,并且能下载
- 50 分求dxSpinEdit 控件
- Delphi中如何执行.sql脚本啊(求一实例)
- 菜鳥求助。快來搶分啊,在線等。
- 怎样确定 delphi中的DBGRID的某个单元格的值?
- 使用RichEdit或者Memo控件,怎么在程序里面清除或者加入一个换行符?
- readln为什么不能这么用?
- 安装从网上下载的组件时,dcc50.dll文件出错
- adoconnection怎动态样连接数据库
- 如何编程实现Telnet功能
- [关于窗体设计]无标题窗体--始终在最上面、可移动、只可以改变宽度
- 将16进制数C9,BA转换成字符串“上海”,该怎样做?有专门的函数吗
ResourcePointer^即ResourcePointer指针所指的内容
type
TByteArray=array[0..0] of Byte;
PByteArray=^TByteArray;然后将ResourcePointer的类型由Pointer改为PByteArray,这样就能直接这样访问数据了:ResourcePointer[xxx]
用VirtualProtect改段保护属性。所以,楼上的,统统拖出去打PP