fig Posted October 20, 2003 Report Posted October 20, 2003 I'm using FSUIPC for internal users, when I call this function: FSUIPC_Open2 I get this error: FSUIPC_ERR_NOFS - // Cannot link to FSUIPC or WideClient Can someone tell me how to fix it? I'm probably doing something stupid
ddawson Posted October 20, 2003 Report Posted October 20, 2003 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
jcboliveira Posted October 20, 2003 Report Posted October 20, 2003 I use a timer and FSUIPC connection is delayed 2 seconds. The retries are also 2 second apart but since it is a module / gauge I think there is no need for retries. José
fig Posted October 26, 2003 Author Report Posted October 26, 2003 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.
Pete Dowson Posted October 26, 2003 Report Posted October 26, 2003 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
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