mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Previously the FSX/P3D driver tried to link a very specific SimConnect version from the Windows Assembly cache. This caused issues with machines which did not have this specific version of SimConnect in the assembly cache since drivers refused to load without much information. Having a different version of SimConnect in the assembly cache or even in the bin folder did not help. To fix this problem, SimConnect is now loaded and resolved manually at runtime. This allows to try loading different versions from the assembly cache or prefer to load the shipped one. For this, the manifests are linked into the binary's resource section and activated manually before loading. This has the positive effect, that loading errors can be handled by code instead of raising a cryptic error and aborting.
21 lines
851 B
C
21 lines
851 B
C
/* Copyright (C) 2018
|
|
* swift project Community / Contributors
|
|
*
|
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
|
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
|
* contained in the LICENSE file.
|
|
*/
|
|
|
|
//! \file
|
|
|
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSYMBOLS_H
|
|
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSYMBOLS_H
|
|
|
|
//! Load and resolve SimConnect.
|
|
//! \param manifestProbing Set to true if you want to try loading from the assembly cache with manifests.
|
|
//! Otherwise the library in the bin folder will be loaded.
|
|
bool loadAndResolveSimConnect(bool manifestProbing);
|
|
|
|
#endif // guard
|