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

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

View File

@@ -49,7 +49,7 @@ ADD_LIBRARY(
# define the dependencies
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
IF(MSVC)

View File

@@ -11,6 +11,10 @@
#include "stdafx.h"
#include <gsl/gsl>
#include <Shlwapi.h>
#include <Windows.h>
#include "PlugIn.h"
using namespace aman;
@@ -22,6 +26,14 @@ PlugIn::PlugIn() :
PLUGIN_DEVELOPER,
PLUGIN_COPYRIGHT),
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 { }