Hello,
I've been developing a windows app in .net C# for GSM Modems and i've come across a strange error:
System.ObjectDisposedException was unhandled
Message="The secure parameter identifier was closed (pt: O parâmetro identificador seguro foi fechado)"
Source="System"
ObjectName=""
StackTrace:
at Microsoft.Win32.UnsafeNativeMethods.GetOverlappedResult(SafeFileHandle hFile, NativeOverlapped* lpOverlapped, Int32& lpNumberOfBytesTransferred, Boolean bWait)
at System.IO.Ports.SerialStream.EventLoopRunner.WaitForCommEvent()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
This has only happened recently - i have no idea why... could it be i am disposing of a SerialPort and getting an answer of the modem later?? - shouldn't this be avoided when i dispose of the SerialPort?