Jump to content
The simFlight Network Forums
Sign in to follow this  
Guest stefan braunewell

reading aircraft name from Offset &H3D00

Recommended Posts

Guest stefan braunewell

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:

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Guest hsors

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é

Share this post


Link to post
Share on other sites
Guest stefan braunewell

thanks guys, it works great.

you saved a poor mans life :-)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • 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.