Unload DLL
Tenho uma aplicação que utiliza uma DLL com um Data module, e sempre que crio o DM ela nunca é descarregada de memória quando minha aplicação é finalizada!!!
Não sei mais o que faço!! Ja tentei o UnloadDLL.. DM.Free dentro da DLL
Não sei mais o que faço!! Ja tentei o UnloadDLL.. DM.Free dentro da DLL
_||bern||_
Curtidas 0
Respostas
Edilcimar
05/12/2003
já tentou release?
GOSTEI 0
Ljr
05/12/2003
Pesquisando na net vi este codigo. Retirei do site: [url]http://lib.seven.com.br/ampliar.asp?codcat=1&codartigo=571[/url]
site muito bom!!
site muito bom!!
function KillDll(aDllName: string): Boolean; var hDLL: THandle; aName: array[0..10] of char; FoundDLL: Boolean; begin StrPCopy(aName, aDllName); FoundDLL := False; repeat hDLL := GetModuleHandle(aName); if hDLL = 0 then Break; FoundDLL := True; FreeLibrary(hDLL); until False; if FoundDLL then MessageDlg(´Success!´, mtInformation, [mbOK], 0) else MessageDlg(´DLL not found!´, mtInformation, [mbOK], 0); end;
GOSTEI 0