델파이7로 dll을 제작중입니다;
폼추가도 했구요.
그런데 dll을 인젝션하면
폼이 안뜨네요...
소스는 아래에 ↓
library FormDLLProject;
{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }
uses
SysUtils,
Classes,
DLLForm in 'DLLForm.pas' {form1};
{$R *.res}
begin
end.
unit DLLForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, jpeg, StdCtrls, ComCtrls, registry ,buttons, shellapi,
Menus, ImgList;
type
Tform1 = class(TForm)
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Timer1: TTimer;
Timer2: TTimer;
Timer3: TTimer;
Label4: TLabel;
CheckBox4: TCheckBox;
Timer4: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure Timer3Timer(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure CheckBox2Click(Sender: TObject);
procedure CheckBox3Click(Sender: TObject);
procedure Timer4Timer(Sender: TObject);
procedure CheckBox4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
form1: Tform1;
implementation
{$R *.dfm}
const
damage = $00400000;
master = $00400001;
speeddamage = $00500000;
die= $00450000;
procedure Tform1.Timer1Timer(Sender: TObject);
begin
if odd(GetAsyncKeyState(VK_NUMPAD1)) then begin
CheckBox1.Checked:=True;
end;
end;
procedure Tform1.Timer2Timer(Sender: TObject);
begin
if odd(GetAsyncKeyState(VK_NUMPAD2)) then begin
CheckBox2.Checked:=True;
end;
end;
procedure Tform1.Timer3Timer(Sender: TObject);
begin
if odd(GetAsyncKeyState(VK_NUMPAD3)) then begin
CheckBox3.Checked:=True;
end;
end;
procedure Tform1.Timer4Timer(Sender: TObject);
begin
if odd(GetAsyncKeyState(VK_NUMPAD4)) then begin
CheckBox4.Checked:=True;
end;
end;
procedure Tform1.CheckBox1Click(Sender: TObject);
begin
if CheckBox2.Checked=True then begin
PDWORD(damage)^:=888; end;
if checkbox1.Checked=false then begin
PDWORD(damage)^:=999;
end;
end;
procedure Tform1.CheckBox2Click(Sender: TObject);
begin
if CheckBox1.Checked=True then begin
PDWORD(master)^:=1; end;
if checkbox1.Checked=false then begin
PDWORD(master)^:=999;
end;
end;
procedure Tform1.CheckBox3Click(Sender: TObject);
begin
if CheckBox1.Checked=True then begin
PDWORD(speeddamage)^:=123456; end;
if checkbox1.Checked=false then begin
PDWORD(speeddamage)^:=12345;
end;
end;
procedure Tform1.CheckBox4Click(Sender: TObject);
begin
if CheckBox1.Checked=True then begin
pbyte(die)^:=0; end;
if checkbox1.Checked=false then begin
PDWORD(die)^:=12345;
end;
end;
end. |