21.03.2014, 18:12
|
|
Let Me Show You
|
|
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
|
|
MagicFile.rc
Код:
CALC BIN c:\Windows\System32\calc.exe
Код:
unit Unit1;
interface
{$R 'MagicFile.res' 'MagicFile.rc'}
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
ResourceStream: TResourceStream;
FileStream: TFileStream;
begin
FileStream:=TFileStream.Create('calc.exe', fmCreate);
ResourceStream:=TResourceStream.Create(HInstance, 'CALC', 'BIN');
FileStream.CopyFrom(ResourceStream, ResourceStream.Size);
ResourceStream.Free;
FileStream.Free;
end;
end.
__________________
Пишу программы за еду.
__________________
|