Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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!

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.