Check loading of blacklisted dlls and show warning dialog at startup. Also show these dlls in sysinfo dialog.

This commit is contained in:
David Kocik 2021-01-27 10:39:39 +01:00
parent 4f161607c7
commit fa2568a5e3
11 changed files with 172 additions and 5 deletions

View file

@ -0,0 +1,45 @@
#ifndef slic3r_LibraryCheck_hpp_
#define slic3r_LibraryCheck_hpp_
#ifdef WIN32
#include <windows.h>
#include <vector>
#include <string>
#endif //WIN32
namespace Slic3r {
#ifdef WIN32
class LibraryCheck
{
public:
static LibraryCheck& get_instance()
{
static LibraryCheck instance;
return instance;
}
private:
LibraryCheck() {}
std::vector<std::wstring> m_found;
public:
LibraryCheck(LibraryCheck const&) = delete;
void operator=(LibraryCheck const&) = delete;
// returns all found blacklisted dlls
bool get_blacklisted(std::vector<std::wstring>& names);
std::wstring get_blacklisted_string();
// returns true if enumerating found blacklisted dll
bool perform_check();
static bool is_blacklisted(std::string dllpath);
static bool is_blacklisted(std::wstring dllpath);
private:
static const std::vector<std::wstring> blacklist;
};
#endif //WIN32
} // namespace Slic3r
#endif //slic3r_LibraryCheck_hpp_