首页
社区
课程
招聘
Patch code 到delphi开发的程序中,扩展原来没有的功能 [讨论]
发表于: 2007-1-7 15:32 3907

Patch code 到delphi开发的程序中,扩展原来没有的功能 [讨论]

2007-1-7 15:32
3907
我最近自己写了一个程序,用delphi开发的。
目的:Patch code 到delphi开发的程序中,扩展原来没有的功能
希望高手指点。
附上源代码:
uMain.pas

unit uMain;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function dlltest(s1:pchar ):pchar;external 'dll.dll';
var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(dlltest(pchar('bona.shen')));
end;

end.

dll实现部分:
dllimpl.pas

unit dllimpl;

interface
function
dlltest(s1:pchar):pchar;
function second(s1:pchar):pchar;
function third(s1:pchar):pchar;
exports dlltest,second;//third 没有导出,目的是想通过修改Dll文件导出表来完成
implementation

function
third(s1:pchar):pchar;
begin
result := pchar(string(s1)+' third function been called!');
end;

function second(s1:pchar):pchar;
begin
result := pchar(string(s1)+' secord function been called!');
end;

function dlltest(s1:pchar):pchar;
begin
result := pchar(string(s1)+'hello world!');
end;

end.

[课程]FART 脱壳王!加量不加价!FART作者讲授!

上传的附件:
收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
没有人愿意讨论呀
2007-1-8 16:12
0
游客
登录 | 注册 方可回帖
返回
//