I am creating a C++/CLI dll that will be loaded into a legacy c++ application. The legacy application does this with a traditional call to LoadLibrary. Both the application and
I just has a similar scenario. LoadLibrary failed with 193. My DLL is a managed C++/CLI DLL called from a native application with LoadLibrary.
However I only get the error on win7 systems. It loads fine on win10. The date of this original question suggests it was win7.
I narrowed it down to a thread_local class. It appears win7 only supports basic types such as C pointers as thread_local. Anything more complex, even std::shared_ptr which win10 accepts, generates error 193 on Dll load.
For the record, the compiler is VS2015, and the code style is c++11.