Delphi 转换swf到exe


本文整理自网络,侵删。

 Delphi 转换swf到exe

function Swf2Exe(S, D, F: string): string;
var
SourceStream, DestinyStream, LinkStream: TFileStream;
flag: Cardinal;
SwfFileSize: Integer;
begin
Result := 'something error';
DestinyStream := TFileStream.Create(D, fmCreate);
try
LinkStream := TFileStream.Create(F, fmOpenRead or fmShareExclusive);
try
DestinyStream.CopyFrom(LinkStream, 0);
finally
LinkStream.Free;
end;
SourceStream := TFileStream.Create(S, fmOpenRead or fmShareExclusive);
try
DestinyStream.CopyFrom(SourceStream, 0);
flag := $FA123456;
DestinyStream.WriteBuffer(flag, SizeOf(Integer));
SwfFileSize := SourceStream.Size;
DestinyStream.WriteBuffer(SwfFileSize, SizeOf(Integer));
Result := '';
finally
SourceStream.Free;
end;
finally
DestinyStream.Free;
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
Swf2Exe('c:\somefile.swf', 'c:\somefile.exe',
'c:\Program Files\Macromedia\Flash MX\Players\SAFlashPlayer.exe');
end;

相关阅读 >>

Delphi xe5 android在桌面添加快捷方式

Delphi msxml 获取 api接口

Delphi捕获u盘插入或者拔出

Delphi 转换一批.bmp 文件为 .jpg

Delphi escape/unescape编码

Delphi获取图片的真实类型

Delphi 从listview组件中的选定行在数据库中删除

Delphi清除ie临时文件,历史记录

Delphi 关于多语言:如何获取当前系统语言

Delphi xe 枚举指定目录及子目录下的所有文件

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...