Hi all
I have a problem regarding how to free TNCNX component correctly. I have created a DLL which have a hidden form with a TNCNX component on. Everything works fine, connect telnet commands, disconnect and so, but when the calling application terminates, the TNCNX is not destroyed proberly, and the application hangs. I create the form for the TNCNX component I DLL ATTACH method and destroys It in the DETACH method. Does anyone have a hint for this problem.. Rgds, Peter Denmark { Procedure invoked by a DLL entry point. } {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * } procedure LibraryProc(Reason: Integer); begin case Reason of DLL_PROCESS_ATTACH: // dll loaded/initialize begin SetMainState(TN_Idle); DllForm := TDllForm.Create(Application); DllForm.Timer1.Enabled := false; PDel := '/'; end; DLL_PROCESS_DETACH: begin // unloading dll better cleanup Logwrite('Kalder DLL Detach'); DllForm.free; end; end; end; begin DllProc := @LibraryProc; { Now invoke the procedure to reflect that the DLL is attaching to the process } LibraryProc(DLL_PROCESS_ATTACH); end. -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.8/414 - Release Date: 09-08-2006 -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be