drni Posted October 4, 2004 Report Posted October 4, 2004 After doing all my programming projects in VB so far, I now switched to VB.NET Is there any good sample application project available where I can study how offsets are read or written correctly in VB.NET ? Thanks in advance
Pete Dowson Posted October 4, 2004 Report Posted October 4, 2004 Is there any good sample application project available where I can study how offsets are read or written correctly in VB.NET ? It isn't my subject, but isn't the VB .Net Shell part of the FSUIPC SDK useful? Regards, Pete
scruffyduck Posted March 16, 2005 Report Posted March 16, 2005 The SDK from Pete's webpage includes the basic code to read and write using VB.Net. Are you looking for something else?
Rhysa Posted March 25, 2005 Report Posted March 25, 2005 Its easy. Once you have connected to read stuff just call these functions: FSUIPC_Read(offset, size, token, result) FSUIPC_Process(result) FSUIPC_Get(token, value) Offset (ie &H2342) and size are from the SDK and relate to the variable you are trying to read. Value is the actual final value. You need a different token for each variable you want to read. Multi-reads: FSUIPC_Read(offset1, size1, token1, result) FSUIPC_Read(offset2, size2, token2, result) FSUIPC_Process(result) FSUIPC_Get(token1, value1) FSUIPC_Get(token2, value2) And writes are simply: FSUIPC_Write(offset, value, token, result) FSUIPC_Process(result) Email if you want my .Net dll. MOST important, remember to declare your variables as the same data type as specified in the SDK. ie if it says integer with length 2 then use int16 data type. BONUS FUNCTION ( :D :D ) To register your app with FSUIPC Dim token As Integer Dim bytecode() As Byte Dim a As New System.Text.ASCIIEncoding 'Insert your key in this line bytecode = a.GetBytes("A4729AOCNPVU") FSUIPC_Write(&H8001, bytecode.Length, bytecode, token, dwresult) 'if Process returns true then success else failed to register If FSUIPC_Process(dwresult) = True Then '...success code Else 'failure End If
scruffyduck Posted March 30, 2005 Report Posted March 30, 2005 ReadOnly Property COM1() As Integer Get Return CInt(Hex(myCOM1)) End Get End Property This is how I do it. I have a separate class which reads all the FS data I need on a regular cycle. myCOM1 is a private vriable of type Int16 and I place the data I get via FSUIPC into myCOM1. This returns the com frequency * 1000 but without the starting 1. for example if property COM1 returns 2346 then the actual com1 frequency is 123.46 Same works for COM2 and I presume the Nav frequencies altho I do not currently collect them Hope this helps
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