编译需要装BusinessSkin控件。当然,自己看代码自己修改个~~反正以前胡乱写的...代码烂得一塌糊涂~
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, bsSkinData, BusinessSkinForm, Mask,
bsSkinBoxCtrls, bsSkinCtrls, bsMessages, ComCtrls, bsSkinTabs,
bsSkinShellCtrls,ShellAPI;
type
TForm1 = class(TForm)
Timer1: TTimer;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinData1: TbsSkinData;
bsCompressedStoredSkin1: TbsCompressedStoredSkin;
bsSkinPanel1: TbsSkinPanel;
bsSkinStdLabel3: TbsSkinStdLabel;
bsSkinStdLabel4: TbsSkinStdLabel;
bsSkinPanel2: TbsSkinPanel;
bsSkinStdLabel1: TbsSkinStdLabel;
bsSkinPanel3: TbsSkinPanel;
bsSkinStdLabel2: TbsSkinStdLabel;
bsSkinStdLabel5: TbsSkinStdLabel;
bsSkinStdLabel6: TbsSkinStdLabel;
procedure Timer1Timer(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
var
NewData : array[0..1] of byte = ($00,$00);
Bytesread : DWORD;
procedure TForm1.Timer1Timer(Sender: TObject);
var
hwin, pid: DWORD;
hprocess: DWORD;
begin
hwin := FindWindow(nil,'Boss Player 秒杀版X');
if hwin = 0 then
Form1.bsSkinStdLabel1.Caption:='目标程序未运行'
else
Form1.bsSkinStdLabel1.Caption:='目标程序已运行';
GetWindowThreadProcessId(hwin, pid);
hprocess := OpenProcess(PROCESS_ALL_ACCESS, False, pid);
if WriteProcessMemory(hProcess ,Pointer($0041C633),@newdata,1 ,BytesRead ) then
begin
CloseHandle(hProcess);
Form1.bsSkinStdLabel2.Caption:='目标程序解密成功 ';
end
else
begin
CloseHandle(hProcess);
Form1.bsSkinStdLabel2.Caption:='目标程序解密失败 ';
end;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ShellExecute(Handle,'open','http://www.52pojie.cn/?u=3',nil,nil,SW_SHOWNORMAL);
end;
end.
|