Jump to content
The simFlight Network Forums

Recommended Posts

Posted
How can I detect that My program lost conection with FSUIPC?

Is there any offset, or pice of code that some one could share?

There's no offset you can read to tell you FSUIPC cannot supply the contents of the offset because if you have no connection it cannot tell you,if you see what I mean. :wink:

The timeout of the message request either indicates FS is too busy doing something else and therefore didn't process the message in time, or that FS has crashed or been closed. So, if you continually get timeouts over a period, you can only assume something's wrong. What it is you can't tell very easily.

If you are using the C library I supply in the FSUIPC SDK, it uses a timeout of 2 seconds and tries up to 10 times, so if the FSUIPC_Process call returns a timeout failure, you know it has failed to get any response for 20 seconds. This error is FSUIPC_ERR_TIMEOUT.

If FS just disappears so that its Window handle is no longer valid, I would expect the SendMessage to fail, so in that case the error should be FSUIPC_ERR_SENDMSG.

I hope that the other language libraries or support packages provide similar results, but you'd need to check the sources and headers.

Regards,

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.