Technically speaking, you cannot store variables to a DLL. A DLL is just a collection of program code that can be shared between applications.

What you are looking for is globally allocated...