From 30fe442f524e91639e9d5f27d86c2edf290ab9c0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 5 Jul 2013 00:19:03 +0200 Subject: Robustify SimConnect protocol - No longer leaks library handle/address space - Use an activation context instead of hardcoding probable DLL filenames --- ftnoir_protocol_sc/ftnoir_protocol_sc.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'ftnoir_protocol_sc/ftnoir_protocol_sc.h') diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index 62210d32..c22c36c7 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -30,7 +30,6 @@ #ifndef INCLUDED_SCSERVER_H #define INCLUDED_SCSERVER_H #include "facetracknoir/global-settings.h" - // // Prevent the SimConnect manifest from being merged in the application-manifest // This is necessary to run FaceTrackNoIR on a PC without FSX @@ -38,11 +37,11 @@ #define SIMCONNECT_H_NOMANIFEST #define _WIN32_WINNT 0x0502 -#include "Windows.h" -#include "SimConnect.h" +#include +#include -#include "..\ftnoir_protocol_base\ftnoir_protocol_base.h" -#include "ui_FTNoIR_SCcontrols.h" +#include <..\ftnoir_protocol_base\ftnoir_protocol_base.h> +#include #include #include #include @@ -92,7 +91,6 @@ public: private: // Private properties QString ProgramName; - QLibrary SCClientLib; static float virtSCPosX; static float virtSCPosY; @@ -121,7 +119,7 @@ private: importSimConnect_AddClientEventToNotificationGroup simconnect_addclienteventtonotificationgroup; importSimConnect_SetNotificationGroupPriority simconnect_setnotificationgrouppriority; - static HANDLE hSimConnect; // Handle to SimConnect + static HANDLE hSimConnect; // Handle to SimConnect static void CALLBACK processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD cbData, void *pContext); void loadSettings(); }; -- cgit v1.2.3