Jump to content
The simFlight Network Forums

FSUIPCConnection.Process() Error


geodirk

Recommended Posts

Hi Paul,

Found a way to make your DLL crash.  According to your docs, if I want to read a FSUIPC Offset with a size of 1, I should use 'byte' or 'sbyte'.  I've not had any issues with using 'byte' however any 'sbyte' will throw an exception when you do the FSUIPCConnection.Process(); command.  For instance, if you define this sbyte offset to be able to read the glideslope (0C49 1 NAV1 Glideslope Needle: –119 up to +119 down):

private Offset<byte> glideslope = new Offset<byte>(0x0c49);

Once the debugger hits, the Process() command, the exception of

System.InvalidCastException: 'Specified cast is not valid.'

Weird thing is it causes an exception not on the first time through but on subsequent runs.

- Dirk

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.