BAW019 Posted November 13, 2007 Report Posted November 13, 2007 I'm trying to read the NWI offsets at xC024 onwards but VB6 is having none of it, just returns zero for each variable. I don't believe it's my code as I'm just adding extra reads to a program that works fine for loads of other offsets (altitude speed etc). I believe I'm using the correct data types eg Private RC As Long Private WindCeiling As Integer FSUIPC_Read &HC0FC, Len(WindCeiling), VarPtr(WindCeiling), RC and it appears be only having trouble with the weather offsets and above, so any ideas would be gratefully received. Anyone else had trouble with these offsets in VB6? (Using FSUIPC 4.2.5) Many thanks Ian
BAW019 Posted November 13, 2007 Author Report Posted November 13, 2007 Sorted! (Funny how the answer only ever comes to me once I've published my ignorance to the world!) The VB6 "&H" prefix returns negative numbers for large hex values which is no good for FSUIPC. A simple conversion function to return the true Long value of a hex code fixes this (ie returns big friendly positive numbers) . Ian
Pete Dowson Posted November 14, 2007 Report Posted November 14, 2007 The VB6 "&H" prefix returns negative numbers for large hex values which is no good for FSUIPC. I seem to recall someone saying you had to postpend a '&' too to stop thati.e. &HC0FC&. But maybe I'm mis-remembering? Regards Pete
BAW019 Posted November 14, 2007 Author Report Posted November 14, 2007 Great tip, thanks Pete - works a treat! Best Ian
gianpy.it Posted November 19, 2007 Report Posted November 19, 2007 I have a problem!!! I'm creating a new add-on that works out from flight simulator 2004!It's a flight planner in particular!!! But I need an information! How can I read weather data using NWI and Visual Basic .NET?????I'm a Mechanical Engineer, I write only mathematical algo, I don't study connections between programs, this is my first experience! Can you give me an example code in VB? Something really easy such: A little program that reads wind speed and direction using Area 3 by longitude and latitude or by ICAO code!!! I don't understand notes for programmers (FSUIPC SDK) because I'm not a real programmer!!!!!!!! I'm a dummy in programs connections.......I need examples!!!Please, please!!!! Thankyou!!!
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