bpollock Posted February 20, 2009 Report Share Posted February 20, 2009 What would happen if I decalred this fsx only variable if the user was NOT running FSX? Would the app throw an error or would it simply ignore it? Dim fuelfsx As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H126C) Link to comment Share on other sites More sharing options...
Pete Dowson Posted February 20, 2009 Report Share Posted February 20, 2009 What would happen if I decalred this fsx only variable if the user was NOT running FSX? Would the app throw an error or would it simply ignore it?Dim fuelfsx As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H126C) All offsets, 0000 to FFFF, are valid offsets in all versions of FS/CFS/ESP since and including FS98. The offset is either a memory reference to an area in FSUIPC itself, or it is mapped into a place somewhere in FS's other modules or assigned memory. Reading any offset cannot do any harm, though you may just get rubbish. Writing to an undefined offset may just get an error logged by FSUIPC, if it is listed as a definite no-no, but it could conceivably crash FS or get other unexpected results -- not in FSX or ESP, because ALL the memory is owned by FSUIPC in those cases -- but certainly in FS9 and before, since some of the mappings are to areas of unknown use in FS. So, for reading only you shouldn't need to worry. For writing you should realy first check the FS version number, which is avaiolable for you as an numeric code in offset 3308. Regards Pete Link to comment Share on other sites More sharing options...
bpollock Posted February 20, 2009 Author Report Share Posted February 20, 2009 Perfect...thanks for your reply. As I'm only reading, I will not worry! 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