Jump to content
The simFlight Network Forums

Problem reading ground traffic data


Recommended Posts

Using the FSUIPC Hello vb program in the SDK, I don't seem to have any problems reading any other positions but when i try to read the E000 ranges (i.e. E004 = number used slots) it only returns zero. The code is just added into the existing program after the timer loop:

Dim dwResult As Long

Dim NumGndTfc As Long

If FSUIPC_Read(&HE004, 2, VarPtr(NumGndTfc), dwResult) Then

If FSUIPC_Process(dwResult) Then

frmMain.lblGroundTraffic.Caption = NumGndTfc & " X"

Else

' Unable to "Process"

frmMain.lblGroundTraffic.Caption = "Processing: " & ResultText(dwResult)

End If

Else

' Unable to "Read"

frmMain.lblGroundTraffic.Caption = "Reading: " & ResultText(dwResult)

End If

Now in FSInterrogate it pulls the right data so I know i'm doing something wrong.

Using FS2K2 and FSUIPC 3.47

Thanks!

Link to comment
Share on other sites

Apologies for the delay in my reply -- as announced in this Forum I've been away with no Internet access from 24th September until 12th October.

If FSUIPC_Read(&HE004, 2, VarPtr(NumGndTfc), dwResult)

Try using the Logging provided in FSUIPC. If you enable IPC read logging you will probably see that your VB code actually tries to read offset &FFFFE004 (masked to 1FE004 probably). The stupid VB compiler sign-extends everything with a top bit set. Even stating &0000E004 doesn't appear to work. I think you have to postpend another & to stop this, i.e. &E004&.

Using FS2K2 and FSUIPC 3.47

Please always use the latest version -- 3.47 is well out of date.

Regards,

Pete

Link to comment
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...
 Share

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