geodirk Posted April 18, 2018 Report Posted April 18, 2018 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
Paul Henty Posted April 18, 2018 Report Posted April 18, 2018 Hi Dirk, Thanks for reporting this. It's now fixed. Please use Nuget to update to the latest version of the DLL (3.1.3). Paul 1
geodirk Posted April 19, 2018 Author Report Posted April 19, 2018 Thanks Paul - It works as expected now.
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