Jump to content
The simFlight Network Forums

getting error in FSUIPC_Open2(..)


Recommended Posts

Don't know about something stupid... :twisted:

This worked for me:

case PANEL_SERVICE_PRE_INITIALIZE:

FSUIPC_Open2(FSReq, &Result, Mem, Size);

Are you in fact creating a gauge? The readme makes reference to delaying opening the link:

"You will probably need to delay opening the link for several seconds after FS starts your module. If it is a gauge you may not have a problem. One way is to simply retry the Open2 each time you are supposed to do something, until it works. The reason for the possible delay is that FSUIPC's interface is not available until everything else in FS is initialised. this can be a few seconds after loading."

If you are writing a "stand alone" module, have you tried delaying access to FSUIPC for a few seonds?

Doug Dawson

Link to comment
Share on other sites

I put FSUIPC_Open2 in a loop, 20 cycles, with 3 second delays after each failure.

I think I am doing something stupid because my program used to work. I didn't have this error before. But after I reinstalled FS2002 on different computer a while later, I started getting this error.

I'm not using panel stuff, I just need to read certain data from FS2002 continuously.

Link to comment
Share on other sites

I think I am doing something stupid because my program used to work. I didn't have this error before. But after I reinstalled FS2002 on different computer a while later, I started getting this error.

The complete source is provided for FSUIPC_Open2, so you should be able to see what is happening. You will see that the error "FSUIPC_ERR_NOFS" is only reported when the call to:

FindWindowEx(NULL, NULL, "UIPCMAIN", NULL)

fails. Since FSUIPC always creates a window with this class name, it should not fail unless your module is initialised before FSUIPC -- in which case another attempt later should work.

Check your FSUIPC.LOG. There should be a line like this:

ClassOptions: UIPCMAIN=FF7F, FS98MAIN=FF7F, FS2KMAIN=FF5E

This shows the Window Class names created or supported by FSUIPC. The first one listed should always be "UIPCMAIN", as this is used by both the internal and external library.

Regards,

Pete

Link to comment
Share on other sites

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.