📄 runres.dpr
字号:
{=======================================================}
{ }
{ DelphiUpx- 内存运行EXE文件演示程序 }
{ }
{ 版权所有 (c) 2004 陈经韬.lovejingtao@21cn.com }
{ }
{ http://www.138soft.com }
{=======================================================}
program RunRes;
uses
Windows,
{如果该资源里面的EXE文件引用了VCL窗口,则必须引用Forms}
MemoryRun;
{$R *.res}
{$R Setup.res} //包含资源文件.
var
ResourceLocation: HRSRC;
ResourceSize: LongWord;
ResourceHandle: THandle;
ResourcePointer: Pointer;
begin
ResourceLocation := FindResource(HInstance, pchar('setup'), 'exefile');
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 CjtMemoryRun(ResourcePointer);
end;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -