You create global variables in a
DLL
like you do in standard applications, there is nothing special with it.
If you need to
export such variables you may use (on Windows platform) the
dllexport
attribute (see
dllexport, dllimport at MSDN[
^] (or better, you may export accessor functions).