Jump to content
The simFlight Network Forums
hkhoanguyen

How to check if P3D is running

Recommended Posts

Hi,

I'm developing a small application with FSUIPC .NET, i dont know if it exists a way to check P3D is running or not? 

//Check P3D running Before starting Process()

FSUIPCConnection.Process(); // Process the request to FSUIPC
FSUIPCConnection.Process("AircraftInfo"); // For aicraft typ

Thanks

Share this post


Link to post
Share on other sites

You can use

FSUIPCConnection.IsConnectionOpen()

e.g.:

            if (FSUIPCConnection.IsConnectionOpen())
            {
                FSUIPCConnection.Process(); // Process the request to FSUIPC
                FSUIPCConnection.Process("AircraftInfo"); // For aicraft type
            }

However, you'll need version 3 of the DLL for this. It's not in the 2.4 version.

I've attached it here. It requires .NET 4 or later, there is no build for earlier frameworks.

If you don't want to upgrade then you'll need to keep track of the connection yourself. In the 2.4 download there is a sample application in C# which tracks the connection status by catching exceptions.

Paul

FSUIPCClient3.0_RC5.zip

Share this post


Link to post
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


×