Jump to content
The simFlight Network Forums

FSUIPCConnect error #12 only with FS2004!


IanAbel

Recommended Posts

I'm sure there may be an obvious answer, but I can't find it <sigh>

Developing an ACARS application for BAVirtual, I have only one real problem.

FSUIPCConnection.Open() works without issue for all flavors of FSX, P3Dv3/4 and X-Plane 10/11, the only sim that refuses the connection is FS2004.

This is vb.net/Visual Studio, using the latest client DLL (3.1.5).

FS2004 reported by several beta testers AND on my own installation, using FSUIPC 3.991 returns an exception and the ex.message "Error #12: FSUIPC_ERR_SENDMSG. Error sending message to FSUIPC."

       Try
            ' Attempt to open a connection to FSUIPC (running on any version of Flight Sim)
            FSUIPCConnection.Open()
        Catch ex As Exception
            If DebugingOn And mainfrm.debugRepeatCount < 10 Then
                WriteDebugEntry("", "FSUIPCConnect", ex.Message)
                mainfrm.debugRepeatCount += 1
            End If
        End Try
 

Suggestions? I'm certainly doing something wrong, just don't know what it is :(

Link to comment
Share on other sites

I think on Windows 10 you need to run FS2004 'as administrator' to get it to run. If that's the case then your ACARS program (or Visual Studio if you are developing/debugging) must also run 'as administrator' or they won't be able to communicate.

If that's not the problem here, let me know and I'll see if I can find my FS9 discs.

Paul

Link to comment
Share on other sites

Paul,

 Thanks for the quick reply. I'm actually on Win7 with my test version, but I'll try running both as admin, and one of the users (who is very savvy and can be relied on to provide accurate info) is on Win10 but said he always runs FS9 as admin and also ran my ACARS as admin too.

Link to comment
Share on other sites

Paul,

  Thanks and I'm sorry I put you too that work. Since you confirmed it actually works, I re-checked the code (I've inherited it), turns out the Connect was wrapped in a "Try" that included updating some FSUIPC setting, AND it was throwing an arithmetic exception since the batterymaster offset was declared as 8-bytes instead of 4. Interestingly FS2004 seems to be the only sim where adjacent bytes result in a huge number which throws an exception being moved into a long!

Onward and upward, I'm hoping to master this but grateful for the support on the forum here, especially your timely and so very helpful assistance.

 

Regards,

Ian.

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.