[RESOLVED] simconnect disconnected and can't recover after a few minutes
-
- Posts: 58
- Joined: Fri Aug 18, 2017 1:04 am
[RESOLVED] simconnect disconnected and can't recover after a few minutes
In my C# program, I remotely communicate with P3D (server and client in different PCs), I connect to SimConnect automatically and recover automatically if there are connection problems. For the first few minutes it works fine, but then it can't recover. In the code it is still trying to recover but every time it gets the following error: 'HRESULT E_FAIL has been returned from a call to COM port'. What is wrong? Thanks.
- Rob McCarthy
- Lockheed Martin
- Posts: 3703
- Joined: Wed Aug 24, 2011 1:37 pm
Re: simconnect disconnected and can't recover after a few minutes
How are you attempting to recover the connection?
Regards,
Rob McCarthy
Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
Prepar3D® Core Lead
-
- Posts: 58
- Joined: Fri Aug 18, 2017 1:04 am
Re: simconnect disconnected and can't recover after a few minutes
Hi Rob,
I got this when I use another thread for connection. Then I used the same thread but got a AccessViolationException:"Attempted to read or write protected memory" and I deleted 'simconnect.dispose() & simconnect=null' and it seemed to be fixed.
Kind regards,
Jeff
I got this when I use another thread for connection. Then I used the same thread but got a AccessViolationException:"Attempted to read or write protected memory" and I deleted 'simconnect.dispose() & simconnect=null' and it seemed to be fixed.
Kind regards,
Jeff