Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SimConnect and Delphi XE2 / A Working Solution - Enjoy!

Featured Replies

After reading numerous posts from all over the web, I decided to spend my entire weekend trying to figure this out.Good news! I did!!! Thanks to the multitude of frustrated posters on this, and other forums.NOTE: This post assumes... (1) you have experience in Delphi and (2) have done work with SimConnect within Delphi before, but are just having difficulty getting SimConnect and Delphi XE2 to play nice together.1. Start by downloading the latest Delphi SimConnect files from C. Scott Hendry's web site (this is the latest FSX SimConnect):http://members.iinet...her/Delphi2.zip2. Following these instructions in editing the SimConnect.pas file to support AnsiChars and AnsiStrings:http://www.fsdevelop...52&postcount=11This is where everyone starts to lose ground because although you might be able to compile/build you FSX project, either the connection to the SimConnect.dll file fails OR calls to the SimConnect.dll file cause exceptions errors every time. Hang tight, we're almost there!3. I had to do this to make sure I got a connection with worrying about my Windows 7 path, or executable/project path where my application was running from. COPY the latest "SimConnect.dll" file on your machine to your project folder or where your application (exe or DLL) will run from. You guys can work out alterative locations later, but I was too excited to get this posted to worry about this step. (Please share your insight into NOT having to copy the DLL; I tried to place it into a global/Win7 path and it didn't work)Anyway, to find the latest DLL on Windows 7 Pro (x64) check the following location which is where I installed the SDK: (it may be installed in a different location on your PC):

C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Core Utilities Kit\SimConnect SDK\lib\managed

4. Here is the big one... there is a file inside C. Scott Hendry's zip file (downloaded frome #1 above), under the folder "Delphi\HeaderRT" folder called "SimConnect.Pas.embed.manifest". You will need to override your project's Run-Time Theme (the what? exactly!) with this predefined manifest. To do that in Delphi XE2 you need to do the following:- Delphi menu path: Project -> Options- In the options window click on the item in the navigation tree called "Application"- On the Application settings panel (on the right) you we see "Runtime Themes". When you first see that it is likely set to "Enable runtime themes". Change it to "Use custom manifest".- After changing the runtime theme setting, select the manifest file "SimConnect.Pas.embed.manifest" mentioned above by clicking the open file dialog box using the elipsis button [...] next to the Custom Manifest edit box and navigating to the file, wherever you unzipped it to.- Once selected and the file appears it the "Custom Manifest" edit box, click "OK"- Resave your projectNow you're ready to Build and Run your project under Delphi XE2.*** Sorry, I'm not sure if/how/where this may / may not work in other versions of Delphi ***Another tip to make sure you're FSX/Delphi projects are consistently compiled... always add the following lines to "uses" clause in your main Project "program" code file (under Project -> View Source):

SimConnectSupport in '<your specific path>\HeaderRT\SimConnectSupport.pas',SimConnect in '<your specific path>\HeaderRT\SimConnect.pas'

Then, as usual, make sure you include these units in your "uses" clause in your main program units (where needed) for SimConnect function and constant / variable references.This just solves the environmental issues between SimConnect and Delphi XE2 causing people to not be able to build their FSX applications, or properly connect to the SimConnect.dll.... and those are the biggest hurdles people have been facing for a few years. Now, you may still have your own specific implementation / function call issues. There are other posts that can help you with those.This should work for you. Read thoroughly and carefully, apply your already established knowledge of these tools and it will all work out fine.

PHIL CHIMBOLO

"Flight Simming for 40-years"

Intel Core i7 3970X 3.50GHz (OC @ 4.20GHz) | 32GB RAM | Windows 10 Pro 64-bit
NVIDIA GeForce GTX 1070 8GB | Four Monitors | GoFlight Pro Yoke

GoFlight TQ6 Advance Throttle | CH Rudder Pedals | TrackIR 5

  • 2 months later...
  • Commercial Member

Thanks for this!

Joshua C.

WSSS

 

coloraerosofta320extdev.png

  • 1 year later...

Good evening everyone :)

Could someone give me an address to find the "simconnect.pas" file because other links are long dead

Thank you.

I assume that this is for managed code only?

Gerry Howard

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.