Browse Source

Disable dynamic library error messages on Windows

tags/v0.5.0
Andrew Belt 7 years ago
parent
commit
84831e06aa
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/plugin.cpp

+ 2
- 1
src/plugin.cpp View File

@@ -109,8 +109,9 @@ static int loadPlugin(std::string path) {

// Load dynamic/shared library
#if ARCH_WIN
SetErrorMode(SEM_NOGPFAULTERRORBOX);
SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
HINSTANCE handle = LoadLibrary(libraryFilename.c_str());
SetErrorMode(0);
if (!handle) {
int error = GetLastError();
warn("Failed to load library %s: %d", libraryFilename.c_str(), error);


Loading…
Cancel
Save