I have a question about how to make an application global variable be accessible from a DLL.
The problem is that some of the classes that this DLL uses need access to a logging object that is a global object instantiated by the application. Whenever the call from the DLL accesses this object, I get a crash.
I was wondering if there is a way to access this global object from a function called by the DLL?
do a __declspec(dllimport) instead of __declspec(dllexport)
i think it will work.
you do an export from dll when you access something in the dll from a .exe. similarly to access something in dll from .exe you need to import that way.