tomcontr Posted May 2, 2005 Report Share Posted May 2, 2005 I´m using this script to check if the connection to FSUIPC is alive, but I may be it´s not the best one, please if someone can make it better, I will appreciate very much, because I getting timeout very offten with this script, and onestly I think that is this particulary offset or many this login. any way here is the code: // fsuipc_error_msg() is a function that I create to display the error msg.// //I choose that offset randomly so may be that could be a problem too.// If FSUIPC_Read(&H264, 2, VarPtr(f), dwResult) Then If FSUIPC_Process(dwResult) Then Else fsuipc_error_msg(Str(dwResult) & "_1") End If Else fsuipc_error_msg(Str(dwResult) & "_2") End If I hope that some one can help. Regards Thomas Link to comment Share on other sites More sharing options...
kiek Posted May 6, 2005 Report Share Posted May 6, 2005 Hi, I'm using this function in my FSCONV program. I call it every other minute, works fine! The rationale is that if you're not able to get the Time from FSUIPC, it is no longer running. BOOL stillAlive() { char chTime[3]; return (! ((!FSUIPC_Read(0x238, 3, chTime, &DwResult) || ! FSUIPC_Process(&DwResult)))); } Link to comment Share on other sites More sharing options...
kiek Posted May 6, 2005 Report Share Posted May 6, 2005 and, by the way, it's a piece of C-code ;-) Link to comment Share on other sites More sharing options...
kiek Posted May 6, 2005 Report Share Posted May 6, 2005 Hi, Have done some logic symplification. This should do the same: BOOL stillAlive() { char chTime[3]; return ( FSUIPC_Read(0x238, 3, chTime, &DwResult) && FSUIPC_Process(&DwResult)); } Link to comment Share on other sites More sharing options...
tomcontr Posted May 6, 2005 Author Report Share Posted May 6, 2005 Thanks a lot guys, Thomas 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