drnicolas Posted December 18, 2005 Report Share Posted December 18, 2005 Hi! I am fighting with problems in a VB-Porgram. At first i use the return code of FSUIPC_Open and the dwresult to start the communication with FS2004. This works and the communication starts quite early (at the point the blue window to choose a flight appears). Now the program reads timer-controlled many values from the FS using FSUIPC_Read. The result for the first FSUIPC_Read is used to test for a succssful read. Nevertheless my program locks up whenever the FS becomes "unavailable". Is there a safe way to test for successful contact with FS ? Link to comment Share on other sites More sharing options...
Pete Dowson Posted December 18, 2005 Report Share Posted December 18, 2005 Nevertheless my program locks up whenever the FS becomes "unavailable". It shouldn't "lock up" -- the SendMessageTimeout used in the code you call has a timeout 9that is why it is used). There may be several retries too, but it would probably do, say, 10 retries with a timeout of 2 seconds, so in the worst case take 20 seconds. I don't know the VB stuff, but this would be typical -- take a look. All the source is supplied, so there's really nothing hidden here, no mystery. Is there a safe way to test for successful contact with FS ? If FS crashes or hangs the problem is usually thatnothing happens. Hence the time-out on the only part of your code which communicates with the FS process -- the SendMessageTimeout. How your program is hanging I don't know, but you should be able to find out by debugging. Regards, Pete Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now