Why not pass the application pointer to your dll? Then, you don't need to directly access the allocated memory, but use the application pointer to have member functions in the main application do the work for you:
GetMyStuff(), SetMyStuff(), ClearMyStuff() or FreeMyStuff()... or whatever other member functions you want.