F22Raptor Posted July 25, 2004 Report Posted July 25, 2004 Hi Pete, trying to read out some fuel capacity values from FS9 using FSUIPC, I've encountered some problems. While reading the capacity from FS 2002 works without a problem, my application and FS Interrogate show "0" at the relevant offsets (e.g. 0B78, 0B7C...) in FS9 although the SDK docs show that it should be compatible. I've tried several versions of FSUIPC, any idea what is going wrong here? Thanks in advance!
Pete Dowson Posted July 25, 2004 Report Posted July 25, 2004 trying to read out some fuel capacity values from FS9 using FSUIPC, I've encountered some problems. While reading the capacity from FS 2002 works without a problem, my application and FS Interrogate show "0" at the relevant offsets (e.g. 0B78, 0B7C...) in FS9 although the SDK docs show that it should be compatible. I've tried several versions of FSUIPC, any idea what is going wrong here? The offsets, values and methods are the same for FS2000, FS2002 and FS2004 (probably also CFS2 as well). Please use FSInterrogate to check the values you should be expecting. Please use FSUIPC's IPC read logging to check that you are, in fact, reading the right things. If you don't understand what is going on by all means show me the log extracts, but first, please do use the tools provided. I assume you have registered your copy of FSUIPC? Otherwise your application may not be getting access, and in that case you will get zeroes for most everything. Again, the Log will show you what is going on That is what it is for. You can also verify this by running version 3 of FSUIPC on FS2002 or FS2000 -- I assume you were using version 2 before? Finally, please do not "try several versions of FSUIPC". Only the current one (3.30 at present) is supported. I don't want to see any reports from old versions, please. Regards, Pete
F22Raptor Posted July 25, 2004 Author Report Posted July 25, 2004 Please use FSInterrogate to check the values you should be expecting. As stated above, I'd already tried FSInterrogate with the same results. Finally, please do not "try several versions of FSUIPC". Only the current one (3.30 at present) is supported. I don't want to see any reports from old versions, please. Well, actually I did also test it with 3.30, however, I mentioned it in order to show that this presumably wasn't a bug introduced with the newest version :wink:. However, I probably figured out the cause of this problem eventually. Obviously, FS9 does only init these values after you have started a flight, i.e. they are initially set to "0" whilst in the main menu for the first time (had always checked out the values while being in the menu till now). In FS 2002, they were already set after selecting the aircraft in the menu interface (as far as I know/have tested), so I guess that's the cause and probably there's nothing you could do about. Thanks for your efforts anyway, Pete! Keep up the great work!
Pete Dowson Posted July 26, 2004 Report Posted July 26, 2004 As stated above, I'd already tried FSInterrogate with the same results. Oh, terribly sorry -- must've read it too fast. :oops: However, I probably figured out the cause of this problem eventually. Obviously, FS9 does only init these values after you have started a flight, i.e. they are initially set to "0" whilst in the main menu for the first time Actually, it probably isn't FS9. Most of FSUIPC doesn't start until you've started a flight, at least in FS9. This is because there are many SIM1.DLL data sections which are not set up until then and attempting to access them would create an access violation crash. FS2000 and FS2002 aren't quite so drastic -- in FS2000 the SIM1 data areas were mostly in its own data memory (i.e. in predefined areas), so there was no danger of crashing. In FS2002 the areas are created on the heap, but they are all part of one large structure and all created at once. In FS2004 this has all been split into different structures for different subsystems and only a subset of those actually exist depending upon aircraft type, engine type, number of engines, and so on. It is very complicated and, although some stuff may be available earlier, I dare not take the risk, nor wreck performance by making lots of extra pre-checks just in case. The same can apply when you are in other menus or dialogues -- FSUIPC detects this and deliberately stops accessing most of the data -- of course, by then some values will have been set, if they are copied into global or FSUIPC memory (not all are -- if no conversions are needed the mapping works directly to the original data). Before the start none are set either way, hence the zeroes. Regards Pete
F22Raptor Posted July 26, 2004 Author Report Posted July 26, 2004 Ah, thanks for your extensive explanation at this late hour :)!
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