Note to self: Do not call SafeLoadLibrary simply as a replacement for LoadLibrary. It has a second parameter witch is used to call SetErrorMode. That parameter is optional and defaults to SEM_NOOPENFILEERRORBOX which is NOT always what you want. E.g. if the DLL you are loading depends on other DLLs which cannot be loaded, you … Continue reading Do not call SafeLoadLibrary(‘dllname.dll’)