Ok, it turned out to be an error on my part, i screwed up my pointers a bit in the dll and so they lost reference to what they were supposed to be pointing to - they were still pointing to the right place it was just there was nothing there and being me i just assumed the worst and that all variables were lost!!. my dlls variables infact remain in memory as required.