Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[13580] 델파이7로 dll제작중인데 폼이안떠요;
delphi [zxpro] 2239 읽음    2011-02-06 03:33
델파이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.

+ -

관련 글 리스트
13580 델파이7로 dll제작중인데 폼이안떠요; delphi 2239 2011/02/06
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.