Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SimConnect server closes

Featured Replies

Hi, From a standalone client application (EXE), hSimConnect = Simconnect_open(...) is used to open a connection to the SimConnect server and receiving a valid handle. SimConnect_Close(hSimConnect) will close this session. Is there a possibility to detect that the SimConnect Server itself is closing (i.e. FSX is about to shut down) or no longer available ? Can you subscribe to a system event that will give you this information ? The standalone application would have to try reconnecting to the FSX server unless FSX is again started and the server is again available ... Any ideas ? rudolf

  • Commercial Member

>Is there a possibility to detect that the SimConnect Server>itself is closing (i.e. FSX is about to shut down) or no>longer available ? Can you subscribe to a system event that>will give you this information ? There doesn't appear to be anything we can use. From my DLL (FSUIPC4) which is of course also a SimConnect Client I do get a call to an exported routine called "DLLstop", after which I can tidy my own resources, but by the time this is called it is mostly too late to do anything with FS, even via SimConnect.I have put in a request for some early warning event to be provided which still leaves scope for calls back to SimConnect.Regards,Pete Dowson

Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

Yes, there is actually ... when you get SIMCONNECT_RECV_ID_QUIT in the DispatchProc (or the OnRecvQuit event in C#) you know that FSX was exited.

I was going to say, my online flight tracker (shameless plug) uses that and pops up a little message. It's been about a week and a half since I looked at the code, since I'm building the web interface for it, so I couldn't remember if that was the case.

Thanks gurious, this sounds as it is exactly what I am looking for ...regardsrudolf

  • Commercial Member

>Yes, there is actually ... when you get>SIMCONNECT_RECV_ID_QUIT in the DispatchProc (or the OnRecvQuit>event in C#) you know that FSX was exited.Ah ... I'd seen that and forgotten all about it! It's because it is one you don't need to subscribe to!Thanks ... that may just come in handy for something I've been wanting to try!RegardsPete

Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

  • Commercial Member

>Thanks ... that may just come in handy for something I've been>wanting to try!Well, after trying it I remembered why I didn't consider the QUIT event in my earlier reply here. It doesn't work, at least for a DLL! Maybe it is only applicable to external programs and is effectively the same as the DLL having its exported DLLstop routine called -- which is too late for my needs.I'll let my request for a proper, early warning, notification stand. ;-)Regards,Pete

Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

Pete, the previously mentioned event works well for me in a standalone client application. In fact, it is included in all the samples of SimConnect, just did not really see it before. When the event is received, I close the SimConnect connection and set hSimConnect = NULL. After that, I check in a timer procedure with 10 Hz whether SimConnect can be opened again (i.e. FSX is restarted, and my client has to go to work). I found it also helpful to subscribe to the 6Hz Simconnect event and the SimStop/Start events for doing all my client work - this seems to prevent SimConnect to flood with messages when FSX becomes slow or is loading ...regardsrb

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.