diff --git a/SrcBehaviorLoader/PluginLoader.cpp b/SrcBehaviorLoader/PluginLoader.cpp index a7754e80da2939239330fb3fce89a9658bfd64b4..5adabb6de382f6501f46d06481d2558c9b97e104 100644 --- a/SrcBehaviorLoader/PluginLoader.cpp +++ b/SrcBehaviorLoader/PluginLoader.cpp @@ -13,9 +13,9 @@ #include <QFileInfo> #define MAX_KEY_LENGTH 255 #define MAX_VALUE_NAME 16383 - + std::vector<std::string> QueryKey(HKEY hKey, std::string path) -{ +{ //See https://docs.microsoft.com/en-us/windows/desktop/sysinfo/enumerating-registry-subkeys std::vector<std::string> list; TCHAR achClass[MAX_PATH] = TEXT(""); // buffer for class name @@ -28,12 +28,12 @@ std::vector<std::string> QueryKey(HKEY hKey, std::string path) DWORD cbMaxValueData; // longest value data DWORD cbSecurityDescriptor; // size of security descriptor FILETIME ftLastWriteTime; // last write time - - DWORD i, retCode; - + + DWORD i, retCode; + TCHAR achValue[MAX_VALUE_NAME]; DWORD cchValue = MAX_VALUE_NAME; - + // Get the class name and the value count. retCode = RegQueryInfoKey( hKey, // key handle diff --git a/SrcBehaviorLoader/PluginLoader.h b/SrcBehaviorLoader/PluginLoader.h index 5fb18fa1d41ee5aa0b44b18141721d4494694ffd..221a8b657aea813bbb2ae7c30200b965209712cc 100644 --- a/SrcBehaviorLoader/PluginLoader.h +++ b/SrcBehaviorLoader/PluginLoader.h @@ -8,8 +8,14 @@ #include <map> #include <memory> +/** + * \class PluginLoader + * This class loads Qt-Plugins, the related metadata and files the plugin depends on. + * \author Hauke Mönck, Gregor Barth + */ + class PluginLoader : QObject -{ +{ Q_OBJECT public: explicit PluginLoader(QObject *parent = 0); @@ -29,7 +35,8 @@ public: QStringListModel* getPluginList(); /** - * Loads a BioTracker Plugin from a filpaht. It returns true if the Plugin could be loaded, otherwise false. + * Loads a BioTracker Plugin from a file path. It returns true if the Plugin could be loaded, otherwise false. + * The loaded plugin acts as singleton! */ bool loadPluginFromFilename(QString const& filename); @@ -95,4 +102,4 @@ private: QStringListModel* m_PluginListModel; }; -#endif // PLUGINLOADER_H \ No newline at end of file +#endif // PLUGINLOADER_H