Jump to content
The simFlight Network Forums

FSUIPC Client DLL for .NET - Version 2.0


Recommended Posts

  • 2 weeks later...
  • 1 month later...
What would happen if I decalred this fsx only variable if the user was NOT running FSX? Would the app throw an error or would it simply ignore it?

Dim fuelfsx As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H126C)

All offsets in range (i.e. 0000 to FFFF) are "valid" in all versions of FS -- you just read zero or rubbish if that version doesn't support it. If you write to an unsupported offset you might have it logged as a failure in FSUIPC if it is a read-only one, or you might possibly crash FS if it relates to some unknown location inside its workings -- though this cannot happen in FSX because all of the offsets are artificially presented by FSUIPC and only valid ones get through to FSX via SimConnect or FS events. Mostly reading or writing unsupported things has no effect, but take greater care with writing.

Regards

Pete

Link to comment
Share on other sites

Should the VB .NET FSUIPC Client executable run in a 64-bit environment? I'm having trouble running the program in Vista 64.

Hi Pat,

I've never tested it in a 64bit environment. At the moment the project is set compile to a duel 64/32 bit binary. On your 64bit system it will be running as a 64bit DLL. This could be causing a problem. Are there any specific errors you can give me?

I could just try compiling the DLL to force it to run on the 32bit compatibility layer. That might solve the problem but I'm not too sure what the problem is at the moment.

Paul

Link to comment
Share on other sites

I could just try compiling the DLL to force it to run on the 32bit compatibility layer. That might solve the problem...

From the reading I've done it sounds like this is the solution - dictate that the program runs as a 32-bit app. This apparently means that Vista 64 will run the program in an compatibility environment called wow64.

I've tried to figure out how to make this happen, but I'm a mechanical engineer and not a programmer, so no joy yet :)

Link to comment
Share on other sites

Hi!

Maybee someone can help me with reading from offset 0354?

I'm trying to read the transponder (currently "1200"), but my application returns "4608". :?

'Declaring...
Dim xpdr As Offset(Of Short) = New FSUIPC.Offset(Of Short)(&H354)
...
' Code to show transponder
xpdr_label.Text = xpdr.Value

Link to comment
Share on other sites

I'm trying to read the transponder (currently "1200"), but my application returns "4608". :?

4608 is decimal, and that most certainly that equals (i.e. is IDENTICAL to) 0x1200 (hexadecimal). As clearly documented, the transponder value is in Binary-Coded Decimal -- there's even an example shown -- the "0x" is the prefix for hexadecimal -- in Basic I believe it is &H. In BCD each group of 4 bits gives one digit.

Code to show transponder

Show it in hexadecimal and it will look right. Please please do read the documentation a little closer! Even use the tools provided, like FSINterrogate and the FSUIPC IPC logging, both of which would have clearly shown you that 0x1200 = 4608. ( = 1 x 4096 + 2 x 256 + 0 x 16 + 0 x 1)

Regards

Pete

Link to comment
Share on other sites

Actually, i searched for transponder in every document i could find in the SDK without any result. :(

You need to use a better search program then! The write up for offset 0354 starts off saying "Transponder setting" before it goes on to show 0x1200 as an example. How on Earth do you know 0354 is the correct offset if you don't even refer to the offsets listings? Surely they are the mainstay of the SDK!!!

Please ALWAYS refer to the documentation for any offset you plan to use. It will help!

Pete

Link to comment
Share on other sites

Transponder setting, 4 digits in BCD format: 0x1200 means 1200 on the dials.

That is all the info i got. I searched all the pdf's for any information about how to use the value, as the value wasn't 0x1200 for the code "1200" i didn't know what to do. :(

Link to comment
Share on other sites

Transponder setting, 4 digits in BCD format: 0x1200 means 1200 on the dials.

That is all the info i got. I searched all the pdf's for any information about how to use the value, as the value wasn't 0x1200 for the code "1200" i didn't know what to do. :(

That is all the information you need. Plus an elementary book on programming. To write programs you need to at least have a rudimentary understanding of bits, bytes and number representations. If you are a complete beginner then interfacing to FSUIPC is certainly not the place to start.

Pete

Link to comment
Share on other sites

Everything went just fine until a friend of mine discoverd a bug in the program, it thinks that the aircrafts longitude is 243 degrees while it actually is 116 degrees.

No problem in europe, the position report in the program is correct, this bug occured while my friend was flying in western canada.

Anybody know how to correct it?

A code sample:

       
Dim lon As Offset(Of ULong) = New FSUIPC.Offset(Of ULong)(&H568)
...
'Longitude=
Dim real_lon As Double
real_lon = lon.Value * 360.0 / (65536.0 * 65536.0 * 65536.0 * 65536.0)
lon_label.Text = real_lon

Link to comment
Share on other sites

Anybody know how to correct it?

       
Dim lon As Offset(Of ULong) = New FSUIPC.Offset(Of ULong)(&H568)

The longitude is signed. -tve longitudes are West. So you should declare the offset as a Long, not ULong. You'll then get -116 which means 116 degrees west.

Paul

Link to comment
Share on other sites

  • 2 weeks later...

I have been using this AWESOME .DLL on a C# project of mine, for well over a year now. This .DLL surely was a blessing and I am very thankful for it.

With that being said, I have a quick question! :D

Is there any way to access the offsets for the Level-D 767? I need to find out specifically, what are the offsets for all the Level-D lights such as the landing lights, nav lights, taxi lights, etc etc.

Thanks for any help... :D

Link to comment
Share on other sites

Is there any way to access the offsets for the Level-D 767? I need to find out specifically, what are the offsets for all the Level-D lights such as the landing lights, nav lights, taxi lights, etc etc.

I don't know the LevelD, but I'm pretty sure that its use of offsets is well documented in their own SDK. I assume you can download this from their website, but if not try Niko Kaan's site: http://www.lekseecon.nl/sdk.html

That said, I would have thought that minor things already well-implemented in FS are still the same as in FS -- e.g. the light switches via the bits in offset 0D0C.

Regards

Pete

Link to comment
Share on other sites

Hi!

I was trying to use this library with FSUIPC 3.9.

on FSUIPCConnection.Open(); program throws exception,

Message = "FSUIPC Error #7: FSUIPC_ERR_VERSION. Incorrect version of FSUIPC."

Before, I tested the same program with FSUIPC version 3.4.8 and everything was OK.

What can be done to make this work? If there would be a source code for library, it would be easy to understand what is happening. But it is not necessary if I would receive answer here =) Thank you.

Link to comment
Share on other sites

Hi!

I was trying to use this library with FSUIPC 3.9.

on FSUIPCConnection.Open(); program throws exception,

Message = "FSUIPC Error #7: FSUIPC_ERR_VERSION. Incorrect version of FSUIPC."

Before, I tested the same program with FSUIPC version 3.4.8 and everything was OK.

What can be done to make this work? If there would be a source code for library, it would be easy to understand what is happening. But it is not necessary if I would receive answer here =) Thank you.

I doubt that is is in any way related to the library. Do you have any other working FSUIPC applications?

It may be the signature. Since 3.7 or so all my modules have been code-signed, for security against virus and other attacks. Right click on the DLL and look at the signature -- see if it says it is valid or ok. You could also check the FSUIPC.LOG file (in the modules folder) -- that would tell you too. If you check the User Guide it explains this and what to do.

Otherwise it may be some registration problem. try removing the FSUIPC.KEY file. if it then works, it's either a bad registration or the system date is incorrect.

Regards

Pete

Link to comment
Share on other sites

As far as I know there's no offset to tell you at which airport the plane is. You need to test the plane's Lon and Lat position with that of the airport you're interested in. I'm away at the moment but if you want help with this I'm back next week and I can show you what you need to do.

Paul

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.