那位兄弟给我个例子看看
我的e-mail:
[email protected]
非常感谢!

解决方案 »

  1.   

    unit Unit1;interfaceuses
      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;var
      Form1: TForm1;
      procedure sayhello; external'Project1.dll' name 'sayhello';implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    begin
      sayhello;
    end;end.
    dll代码
    library Project1;
    uses
      SysUtils,
      Classes,
      windows,
      forms;
    {$R *.res}
    procedure sayhello;
    begin
      application.MessageBox(pchar('你好'),pchar('提示'),mb_yesno+mb_iconinformation)
    end;exports
      sayhello;
    end.