Guest stefan braunewell Posted April 2, 2003 Report Posted April 2, 2003 Hi guys, whatever i have tried (reading the aircraft name from the 3D00 offset, my visual basic crashes). has anyone an idea how to read that? maybe an example? thanks a lot stefan :cry:
cyberavia Posted April 3, 2003 Report Posted April 3, 2003 Hello, You need to have an long variable (256 bytes) with /0 caract. terminator to read 3D00 offset. Try to define long variable to read this. Fabrice.
Guest hsors Posted April 3, 2003 Report Posted April 3, 2003 Stefan You will need special coding techniques to read "0 terminated strings" in VB since there is no VB variable type that fits Here is the code I used for such strings Dim b(255) as byte 'defined a byte array (256 values) Dim result as string 'will contain the final result Dim i as integer FSUIPC_Read (&H3D00,256,VarPtr (b(0))) 'read all bytes at offset 3D00 in byte array FSUIPC_Process For i=0 to 255 If b(i)=0 then exit for 'leave at last char result=result+Chr(b(i)) 'otherwise adds to result (don't forget the Chr) Next Hope it will helps Hervé
Guest stefan braunewell Posted April 3, 2003 Report Posted April 3, 2003 thanks guys, it works great. you saved a poor mans life :-)
tomcontr Posted March 21, 2005 Report Posted March 21, 2005 I used the VB script on this POST to get the Aircraft name, it works. but it didnt worked on FS98 with FSUPC 2.974 Was that a problem of the FSUIPC version, or just that FS98 does not supper that offset? Regards Thomas.
Pete Dowson Posted April 2, 2005 Report Posted April 2, 2005 I used the VB script on this POST to get the Aircraft name, it works. but it didnt worked on FS98 with FSUPC 2.974 Was that a problem of the FSUIPC version, or just that FS98 does not supper that offset? Download the FSUIPC SDK and check the programmer's guide document. As it says against the offset 3D00 "Valid for FS2K only", with columns for FS2002 and FS2004 marked "Ok". This means the information isn't available from FS98. Further to this, I do not know when FSUIPC started to obtain this data. If it was after version 2.974 then it won't be readable in FS2000 or FS2002 either, with that version. The documentation only refers to the latest version, always. 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