Jump to content
The simFlight Network Forums

alexberry

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by alexberry

  1. Pete,

    How does VB allow you to define a full 32-bit word in hex, then? What if you used &H00008000? The value being used in the IPC interface is a 32-bit value, after all. In C/C++ the upper zeroes are rather implied by the notation, as in 0X8000. Maybe just VB &X08000 should work?

    These all seem reasonable, but don't appear to work.

    I think the way to tell the VB compiler that your original is unsigned is to add an & at the end, thus: &HC000&.

    That certainly does work though. Didn't see that in the help, so that's a good spot. :D

    Regards,

    Alex

  2. Pete, thanks for your excellent advice. Using the IPC log soon showed what the problem was...

    Just in case anyone else is interested (might be worth putting it in future versions of the VB SDK) -

    You can enter Hex values in VB by typing &H at the start of the number, for example &H3AF0 for the Hex value 3AF0. However, VB treats these as a signed 2-byte integer, so anything greater than &H8000 (dec 32768) is actually treated as a negative number.

    So entering the IPC addresses in Hex format only works up to &H8000. If addressing values up where the NWI is (&HC000), you need to use decimal notation for the addresses.

    Anyway, worked for me and problem solved...

    Thanks again,

    Alex Berry

    Edinburgh, Scotland.

  3. I'm hoping somebody might be able to help me.

    I'm trying to write a program that uses Pete's FSUIPC module to interface with MS FS9. While I'm having no trouble with most of what I'm trying to do, one area that is proving difficult is using the 'New Weather Interface'.

    I want to be able to read the weather for any airport (by entering in the appropriate ICAO code). Unfortunately, I just can't get it to work; I consistenly get no data back after entering the ICAO in to the correct (I think) FSUIPC address together with the 'Signature' in the other address as detailed in the NWI programming guide.

    I am programming in VB6, using the FSUIPC SDK that includes a VB6 module to read / write / process addresses in FSUIPC.

    Have you programmed anything like this in VB6 (or VB generally, though not .NET)? Have you managed to get the NWI to work in VB? If so, would you be able to offer me some help or advice, or perhaps even show me some example code.

    I appreciate that I'm asking a lot. However, If you are able to help, I promise to share with you the fruits of my programming endeavours (for what it's worth...)

    Kind regards,

    Alex Berry

    Edingburgh, Scotland

  4. Hi Pete,

    I'm trying (as a beginner) to do some programming for FS using your fantastic FSUIPC module (of which I have a registered version.)

    While eveything else seems to be working fine, I can't get text to display properly in the scroll bar that goes across the top of the screen in FS2K4. All I get is nonsense scrolling across the top...

    The short piece of code is:

    strMessageB = ""

    disString = "Distance to " & DestICAO & ": " & Format(Distance, "#0.0 nm")

    For iCount = 1 To Len(disString)

    strMessageB = strMessageB & ChrBAsc(Mid(disString, iCount, 1)))

    Next iCount

    strMessageB = strMessageB & Chr(0)

    myInt = -1

    If FSUIPC_Write(&H3380, 128, VarPtr(strMessageB), dwResult) Then

    If FSUIPC_Write(&H32FA, 2, VarPtr(myInt), dwResult) Then

    If FSUIPC_Process(dwResult) Then

    End If

    End If

    End If

    If you have a spare moment, please could you see if you can spot any silly mistakes I've made in the above.

    Kind regards,

    Alex Berry,

    Edinburgh.

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