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.

How to manifest a DLL that may not exist?

Featured Replies

Hello SimConnect gurus, I'm using VS2005 and C++ to create a program and now I want to add functionality to connect to Microsoft Flight Simulator X. To do this, I want to load the required DLL (SimConnect.dll) in runtime. There is one very important requirement: the program MUST also be able to run, when the SimConnect DLL is NOT present on the PC (many existing users of my program don't have FSX). Off course, the program should report the absence (when necessary) and exit gracefully... I have read that the SimConnect DLL was setup as a side-by-side assembly; I know I must do something with it's manifest to get the program to work. I have read a whole bunch of information on manifests and such, but I'm not sure how to implement it. As a small test, I have just included the header file for SimConnect in my code and 'programmed' a LoadLibrary call, to load the DLL. On my development-system that works: the DLL loads. On a second PC however (where FSX is not installed), I get the message that 'The program is not installed correctly...' and the program does not start at all (even when the LoadLibrary function is not called ...). How can I solve this? Should the header-file be modified or is there another (more elegant?) way? Thanks in advance. BTW: The program does not use .NET and has an embedded manifest which is generated automatically.

Did you add a reference to the simconnect.lib file as explained in the simconnect sdk documentation? If so, then the DLL will be linked statically. If you want to load the library dynamically, you should not add the .lib file to the project.Daniel

  • Author
Did you add a reference to the simconnect.lib file as explained in the simconnect sdk documentation? If so, then the DLL will be linked statically. If you want to load the library dynamically, you should not add the .lib file to the project.Daniel
Hello Daniel,Thanks for your reply. I have also posted this question at the MSDN C++ forum (here) and received an answer that comes down to this:
  • Exclude the manifest from the SimConnect DLL from the manifest of the program (using '#define SIMCONNECT_H_NOMANIFEST' before including simconnect.h);
  • Include the manifest in the .EXE as a resource, with an ID greater than 100 (using a post-build script: mt.exe -manifest "$(InputDir)SCServer.manifest" -outputresource:"$(OutDir)\$(TargetFileName)";^#101)
  • Activating the DLL-manifest, just before calling LoadLibrary (with the Windows functions found here).

I haven't completely finished my code, but the manifest-part and loading the SimConnect DLL works!BTW: Later I found this post with answers from Pete Dowson (here). I didn't understand the post earlier, but now it makes sense...

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.