From 597283dde116fc1af62989c3461eb48d40f8232e Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Tue, 21 Aug 2018 11:29:36 +0200 Subject: [PATCH] Only link to SimConnect SP1 and XPack SimConnect RTM is missing two important symbols: - SimConnect_Text - SimConnect_SubscribeToFacilities Therefore remove it from the probing list. --- src/plugins/simulator/fsxcommon/simconnectsymbols.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/simulator/fsxcommon/simconnectsymbols.cpp b/src/plugins/simulator/fsxcommon/simconnectsymbols.cpp index 766ab485c..180a5b348 100644 --- a/src/plugins/simulator/fsxcommon/simconnectsymbols.cpp +++ b/src/plugins/simulator/fsxcommon/simconnectsymbols.cpp @@ -112,7 +112,12 @@ bool loadAndResolveSimConnect(bool manifestProbing) wchar_t szModuleName[MAX_PATH]; GetModuleFileName(hInst, szModuleName, MAX_PATH); - std::array resourceNumbers = {{ 101U, 102U, 103U }}; + // 101 => "SimConnect_RTM.manifest" + // 102 => "SimConnect_SP1.manifest" + // 103 => "SimConnect_XPack.manifest" + // Use only SP1 and XPack, since RTM is missing two important symbols. + // Try the latest one first. + std::array resourceNumbers = {{ 103U, 102U }}; for (const auto resourceNumber : resourceNumbers) { @@ -139,7 +144,8 @@ bool loadAndResolveSimConnect(bool manifestProbing) } } - // Try once without activation context + // If at that stage, no SimConnect library was found in the WinSxS folder, try once without activation context to link to the one we + // ship ourselves. if (!simConnectDll.isLoaded()) { simConnectDll.load();