My application uses async transfers and as long as I don't interrupt the transfers it shuts down quickly. However if I call AbortAsynchronous() and then shut down my app refuses to exit completely. After a couple of minutes I find that a thread from the ftp lib tries to call back into my code:
> Framework.UI.BLLInterface.dll!Stc.Bll.FileTransfer.FileTransferList.ftpConnection_Downloaded(object sender = {EnterpriseDT.Net.Ftp.ExFTPConnection}, EnterpriseDT.Net.Ftp.FTPFileTransferEventArgs e = {EnterpriseDT.Net.Ftp.FTPFileTransferEventArgs}) Line 440 C#
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) + 0x5a bytes
mscorlib.dll!System.Delegate.DynamicInvoke(object[] args) + 0x5 bytes
edtFTPnetEx.dll!EnterpriseDT.Net.Ftp.FTPConnection.InvokeDelegate(bool preferGuiThread = true, bool permitAsync = true, System.Delegate del = {EnterpriseDT.Net.Ftp.FTPFileTransferEventHandler}, object[] args = {Dimensions:[2]}) + 0x51f bytes
edtFTPnetEx.dll!EnterpriseDT.Net.Ftp.FTPConnection.InvokeEventHandler(System.Delegate eventHandler = {EnterpriseDT.Net.Ftp.FTPFileTransferEventHandler}, object sender = {EnterpriseDT.Net.Ftp.ExFTPConnection}, System.EventArgs e = {EnterpriseDT.Net.Ftp.FTPFileTransferEventArgs}) + 0xb8 bytes
edtFTPnetEx.dll!EnterpriseDT.Net.Ftp.FTPConnection.OnDownloaded(string localPath = "C:\\Documents and Settings\\DiLynch\\My Documents\\Spirent\\Test Center\\dummy1.log", string remoteFile = "C:\\TestCenterServer\\TestCenterServerManager2008-02-29_09-22-39\\STC_Core\\2.30.3118.0000\\Test Session 9 - DiLynch\\dummy1.log", System.Exception ex = {"The FTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established."}) + 0x90 bytes
edtFTPnetEx.dll!EnterpriseDT.Net.Ftp.FTPConnection.DownloadFile(string localPath = "C:\\Documents and Settings\\DiLynch\\My Documents\\Spirent\\Test Center\\dummy1.log", string remoteFile = "C:\\TestCenterServer\\TestCenterServerManager2008-02-29_09-22-39\\STC_Core\\2.30.3118.0000\\Test Session 9 - DiLynch\\dummy1.log") + 0x135 bytes
[Native to Managed Transition]
[Managed to Native Transition]
edtFTPnetEx.dll!EnterpriseDT.Net.Ftp.ExFTPConnection.a.a(System.Reflection.MethodInfo A_0 = {Void DownloadFile(System.String, System.String)}, object[] A_1 = {Dimensions:[2]}) + 0x27 bytes
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) + 0x5a bytes
mscorlib.dll!System.Delegate.DynamicInvoke(object[] args) + 0x5 bytes
edtFTPnetEx.dll!EnterpriseDT.Net.Ftp.FTPConnection.InvokeDelegate(bool preferGuiThread = false, bool permitAsync = false, System.Delegate del = {EnterpriseDT.Net.Ftp.ExFTPConnection.a.a}, object[] args = {Dimensions:[2]}) + 0x51f bytes
edtFTPnetEx.dll!EnterpriseDT.Net.Ftp.ExFTPConnection.a.f() + 0xc3 bytes
edtFTPnetEx.dll!EnterpriseDT.Net.Ftp.ExFTPConnection.b.a() + 0xdf bytes
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(System.RuntimeMethodHandle md, object[] args, object server, int methodPtr, bool fExecuteInContext, out object[] outArgs) + 0x30 bytes
mscorlib.dll!System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage msg, System.Runtime.Remoting.Messaging.IMessageSink replySink = {System.Runtime.Remoting.Messaging.AsyncResult}) + 0x1ab bytes
mscorlib.dll!System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(object o) + 0x51 bytes
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(object state) + 0x1a bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x81 bytes
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(System.Threading._ThreadPoolWaitCallback tpWaitCallBack) + 0x50 bytes
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(object state) + 0x60 bytes