If you included the same static library in your DLL as you did in your app, and the declaration of a variable pointing to the object which your DLL is trying to access is found in the static library's code, your application and your DLL are both going to have their own > SEPERATE \< copy of the variable.
If you initialize the variable in your application, your application's copy of the variable will have a value, but when you refer to that variable in the DLL, you will be refering to the DLL's copy of that variable. Static libraries are built into your applications and DLLs, not connected to during runtime, so their variables aren't shared among all things that use them.
Use static libraries only for reuseable methods that don't depend on outside variables, such as useful math functions:
float dot3( vec3 v );
Now, if you declare a variable in the DLL, and make it available to the application:
Your DLL's source:
MYDLLAPI SomeClass *theOneClass = NULL;
Then your application can set that variable:
theOneClass = new SomeClass( );
Then when your DLL acts on that class:
MYDLLAPI void SomeFunction( void )
if( theOneClass )
It will be affecting an object provided by the application, which the application can also use at will.
You could also pass an instance of an object class defined in a static library to the DLL.
MYDLLAPI void DoSomethingToSomething( SomeClass *pob )