add a log message and find the path of the DLL to load the configurations later

This commit is contained in:
Sven Czarnian committed 2021-08-11 08:29:14 +02:00
1 parent ac022f55fc
commit fad3ca0de1
2 files changed
+13 -1

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ ADD_LIBRARY(
# define the dependencies # define the dependencies
TARGET_INCLUDE_DIRECTORIES(ArrivalMANager INTERFACE EuroScope) TARGET_INCLUDE_DIRECTORIES(ArrivalMANager INTERFACE EuroScope)
TARGET_LINK_LIBRARIES(ArrivalMANager EuroScope GSL) TARGET_LINK_LIBRARIES(ArrivalMANager EuroScope GSL Shlwapi.lib)
# configure the debugger and update the linker flags # configure the debugger and update the linker flags
IF(MSVC) IF(MSVC)
+12
View File
@@ -11,6 +11,10 @@
#include "stdafx.h" #include "stdafx.h"
#include <gsl/gsl>
#include <Shlwapi.h>
#include <Windows.h>
#include "PlugIn.h" #include "PlugIn.h"
using namespace aman; using namespace aman;
@@ -22,6 +26,14 @@ PlugIn::PlugIn() :
PLUGIN_DEVELOPER, PLUGIN_DEVELOPER,
PLUGIN_COPYRIGHT), PLUGIN_COPYRIGHT),
m_configuration() { m_configuration() {
this->DisplayUserMessage(PLUGIN_NAME, "INFO", (std::string("Loaded ") + PLUGIN_NAME + " " + PLUGIN_VERSION).c_str(), true, true, false, false, false);
/* get the dll-path */
char path[MAX_PATH + 1] = { 0 };
const gsl::span<char, MAX_PATH + 1> span(path);
GetModuleFileNameA((HINSTANCE)&__ImageBase, span.data(), span.size());
PathRemoveFileSpecA(span.data());
std::string dllPath = span.data();
} }
PlugIn::~PlugIn() noexcept { } PlugIn::~PlugIn() noexcept { }