chazzie Posted February 23, 2004 Report Share Posted February 23, 2004 I'm trying to get the GPS name string from FS, it says the length is 6 and the type is a string, however the program tends to hang and produce an error that asks me to send information to Microsoft. I'm programming in VB and it seems like I can only get numreric variables from FSUIPC but not strings. Here's a code-sample: If FSUIPC_Read(&H60A4, 6, VarPtr(Tmp), dwResult) Then If FSUIPC_Process(dwResult) Then ArrICAO = Tmp End If End If Text1.Text = ArrICAO This only produce a value around 20000, and not the ICAO which currently should be KPHX. Link to comment Share on other sites More sharing options...
rickalty Posted February 23, 2004 Report Share Posted February 23, 2004 Do you have ArrICAO and Tmp both Dim'd as Strings ? Richard Link to comment Share on other sites More sharing options...
chazzie Posted February 24, 2004 Author Report Share Posted February 24, 2004 I have ArrICAO dim'd as a string, but when I use a string instead of Tmp (i.e. TmpStr) I get a program error and the program shuts down. Link to comment Share on other sites More sharing options...
Indagroove Posted February 25, 2004 Report Share Posted February 25, 2004 Ok, If you are reading strings from FSUIPC you need to convert them into charecters from the ASCII table. First grab the info until you you find the 0 byte. This will let you know that the string of bytes have ended. Put them into an array. Then you can loop through the array with MyByte = MyByte & Chr(YourByte(2)) Hope this helps, Mike Link to comment Share on other sites More sharing options...
chazzie Posted February 27, 2004 Author Report Share Posted February 27, 2004 I've soloved this another way, I did not need to get the ICAO from FS at this moment, but I'll see if I'll use it later. Thanks anyways! Patrik Link to comment Share on other sites More sharing options...
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