library 中定义如下输出过程: (注Form1 中定义 var DLLApplication:TApplication)
procedure ProvaChild(ParentApplication: TApplication; ParentForm: TForm); export; stdcall;
var
Form1: TForm1;
DllProc: Pointer; { Called whenever DLL entry point is called }
begin
Application:=ParentApplication;
Form1:=TForm1.Create(ParentForm);
Form1.MyParentForm:=ParentForm;
Form1.MyParentApplication:=ParentApplication;
// windows.SetParent(Form1.Handle,ParentForm.Handle);
// Form1.FormStyle:=fsMDIChild;
Form1.Show;
end;
procedure DLLUnloadProc(Reason: Integer); register;
begin
if Reason = DLL_PROCESS_DETACH then Application:=DllApplication;
end;
exports
ProvaChild;
begin
DllApplication:=Application;
DLLProc := @DLLUnloadProc;
end.
交流一下, 请问一下如何在DLL 中放上数据表,而调用在EXE中的TDatabase