I have a C++ DLL routine that returns a pointer to a character buffer that is created and managed by the DLL. The pointer is defined as a string in VB and is passed by reference. After multiple successful calls to the DLL routine, the VB program invariably gets either an "Out of memory" error or a memory access error. It appears that VB is claiming this storage as string space, and thus "cleaning it up". Is there any way to avoid this?