Hello all,
I'm a newbie here trying to tie into FS2004 with vb.net. I find the best way to learn is by example. I have looked at the vb.net sample code with the SDK, but it is lacking somewhat. There is no description of what the parameters being passed are (i.e., dwOffset, token, dwSize, etc.). Also, the basics on how exactly to retrieve info is unclear. I assume this is legacy stuff whose explanation is "understood". As I prefer not to try to reinvent the wheel, does this forum have an area where sample code is posted by users? If not, could someone show me how to retrieve a peice of data by clicking a button (maybe bank?). I tried the following code after using the FSUIPC_Initialization and FSUIPC_Open in the form_load:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim t_Bank As Integer
Dim Bank As Integer
Dim dwResult As Integer
''try to read bank...
Dim Errcatch As Boolean
Errcatch = FSUIPC_Read(&H57C, 4, t_Bank, dwResult)
Errcatch = FSUIPC_Process(dwResult)
Errcatch = FSUIPC_Get(t_Bank, Bank)
TextBox1.Text = t_Bank
TextBox2.Text = Bank
TextBox3.Text = dwResult
End Sub
When I do this code repeatedly, t_bank counts up in 8 increments and bank and dwresult remain zero. Errcatch was always true. Also, when using FSinterrogate, there is an expression...*360/(65536*65536). Am I supposed to use this to actually calculate the bank after I get some number from FSUIPC_Get?
If anyone has some code and pointers they would be greatly appreciated.
Thanx!