Var<br> DLLApp:Tapplication;<br> DLLScr:Tscreen;<br>Procedure proDLL_CreateDllForm(App:TApplication;Scr:TScreen;ChildName,DataConnect,Pss_MenuName,<br> Pss_Cur_UserNo,Pss_Cur_User,Pss_DeptCode,Pss_DeptName,Pss_ModuleName:shortstring);<br>Begin<br> application := app;<br> screen := scr;<br> {......}<br>end;<br>procedure ExitDLL(DwReason: Dword);//定义释放dll过程<br>begin<br> if DwReason = DLL_PROCESS_DETACH then<br> begin<br> Application := DLLApp;<br> Screen := DLLScr;<br> end;<br>end;<br>exports<br> proDLL_CreateDllForm;<br>begin<br> DLLApp:= Application;<br> DLLScr:= screen;<br> DllProc := @ExitDLL;//释放DLL模块<br>end