//调用DLL的文件
unit main;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;
  TShowF1=function(AHandle:THandle):String;StdCall;
var
  Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
  HDLL:THandle;
  ProcAddr: TShowF1;
begin
  HDLL:=LoadLibrary('DLL.dll');
  if HDLL<32 then exit;
  @ProcAddr:=GetProcAddress(HDLL,'ShowF1');
  procAddr(Application.Handle);
  FreeLibrary(HDLL);
end;end.
//dll文件
library DLL;uses
  SysUtils,
  Classes,
  DLLF in 'DLLF.pas' {DLLFrm};
exports
 ShowF1;
begin
end.
//////////////////////
unit DLLF;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;type
  TDLLFrm = class(TForm)
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  DLLFrm: TDLLFrm;
  function ShowF1(AHandle:THandle):String;StdCall;implementation
function ShowF1(AHandle:THandle):String;stdcall;//
var
  DLLF: TDLLFrm;
begin
   //Application.Handle:=AHandle;
   DLLF:=TDLLFrm.Create(Application);
try
if DLLF.ShowModal=mrok then//改
   result:='dllopen';//改
finally
   DLLF.Free;
end;
end;end.
////
出现的问题是:
Exception:EResNotFound in Module DLL.dll at000318C4