gene92110 Posted July 7, 2015 Report Posted July 7, 2015 We developed c++ code about 10 years ago to interface to FS2004 using FSUIPC running on XP. We are in the process updating the code to run on Win7 and FSX. I downloaded the latest FSUIPC 4.939 from schiratti.com and installed it successfully (it found FSX). However, when I try to run our sw, it can't connect to FS. Are the FSUIPC calls the same and the way to connect to FS? I can't recall where I got the fsuipc.h and fsuipc.cpp files, it's been too long. The call that's failing is SendMessageTimeout, which is returning a value of 0 for dwError. I apologize if I'm forgetting to do something simple, as I said it's been a long time since we developed the code and interface to FS. Thank you.
Pete Dowson Posted July 7, 2015 Report Posted July 7, 2015 We developed c++ code about 10 years ago to interface to FS2004 using FSUIPC running on XP. We are in the process updating the code to run on Win7 and FSX. I downloaded the latest FSUIPC 4.939 from schiratti.com and installed it successfully (it found FSX). However, when I try to run our sw, it can't connect to FS. Are the FSUIPC calls the same and the way to connect to FS? Yes, the interface is 100% compatible right back to FS98 days. The call that's failing is SendMessageTimeout, which is returning a value of 0 for dwError. 0 = no error. So how is it failing? FSUIPC produces a Log, in the FS Modules folder. Have you checked? There are logging facilities to record application reads and writes. Have you tried checking that way? If you don't understand any of the logging or other data, paste it here and I'll have a look. But an error code od 0 is not helpful. Pete
gene92110 Posted July 14, 2015 Author Report Posted July 14, 2015 Hmm, the code I have says: if (dwError != FS6IPC_MESSAGE_SUCCESS) then it got an error. FS6IPC_MESSAGE_SUCCESS = 1, so it's looking for a 1 for a return value. The code was able to interface to FS2004 now, although I've run into an annoying problem in that, after FS starts, if I start my app, FS pauses. FS running on XP doesn't pause if my app, or any other app, starts up. But other than that, it looks like I'm up and running. Thanks. BTW, there is an acknowledgement to Adam Szofran at the top of the fsuipc.cpp file. Maybe you, or Mr. Schiratti wrote the fsuipc.cpp and fsuipc.h files I got from somewhere?
Pete Dowson Posted July 22, 2015 Report Posted July 22, 2015 Hmm, the code I have says: if (dwError != FS6IPC_MESSAGE_SUCCESS) then it got an error. FS6IPC_MESSAGE_SUCCESS = 1, so it's looking for a 1 for a return value. The codes for dwError are all named "FSUIPC_ERR_ ...",. FS6IPC_MESSAGE_SUCCESS will be referring not the the error code returned in dwError but the return from the function itself. You only look at the dwError code if the return says FAILURE (i.e returns FALSE). BTW, there is an acknowledgement to Adam Szofran at the top of the fsuipc.cpp file. Maybe you, or Mr. Schiratti wrote the fsuipc.cpp and fsuipc.h files I got from somewhere? Aren't you getting the files from the FSUIPC SDK? Adam wrote FSUIPC's version-specific predecessor, FS6IPC, for FS98 (and FS5IPC before that for FS95). Pete Pete
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