


SimConnectDemo

About the program
To illustrate the article How to correctly use SimConnect in standalone applications in C++ 
a program SimConnectDemo was created. The program gets some flight data from the simulator and 
outputs these data on the simulator screen and writes to a disk file. This file may be written 
with different separators signs and with different extensions. It is important that the executable 
file absents in the archive due to license restrictions. You can build it from the source code.

How to compile the program from source code?

Visual Studio 2010 and more modern version of it may be used to compile the program from source code. 
There is a project for Visual Studio 2010 in attached archive. It was created in Visual Studio 2010 
especially because it is possible convert the project in a more modern version of the Visual Studio.
By default all constants and paths in the project are set to build for Prepar3D SDK. However it is 
not a trouble to make these values in correspondingly with compilation for the Microsoft Flight 
Simulator. For Visual Studio 2010 etc. there is a configuration file AlexShag.props in which all my 
settings for Prepar3D are stored. You should change this setting accordingly your installation of 
the Prepar3D SDK. Note that the SimConnect server in the Prepar3D application is backwards 
compatible with the SimConnect.dlls of FSX. This means that if you are trying to develop an add on 
that will work with FSX and Prepar3D, you will need to use a version of the SimConnect SDK that works 
with FSX.
How to change settings to compile the application in your environment? If you use Visual Studio 
Express be sure that Settings is Expert Settings then in menu View the Property Manager item appears. 
Select menu View->Property Manager. Property Manager will be displayed on the left side on your IDE 
screen. Select Debug|Win32 find item AlexShag.props and double click on it. This opens a dialog. 
On the left side you can see UserMacros section, on the right side of the dialog finds the name: 
SimConnectSDK. This value must be set in full path to folder where your SDK is placed.

Limitations

The program was created for studying purposes only. This source code is only intended as 
a supplement to my article How to correctly use SimConnect in standalone applications in C++. 
This source code is provided "as is" and without any express or implied warranties, including 
warranties fitness for a particular purpose. This program is not suitable for direct use in 
the simulator with the gaming or any other purpose. It is possible that this program has bugs 
and is not working properly. 
For the author all your responses and wishes about this program are important. To make 
a suggestion or report a bug or another feature of this product, write to alxshag@gmail.ru 
or alexey_shag@yahoo.com
