Never use stl classes in interfaces between modules. Your problem is probably that you communicated between 2 DLLs that were compiled with different configurations, for example one of them compiled using Debug and the other with Release. Depending on your compiler settings and defines the binary representation expected by the 2 DLLs for the same container type (like std::string) might differ slightly. If you communicate between 2 DLLs compiled with different settings then either use primitive types (like char*) or your own container types that are guaranteed to have the same memory layout (binary representation) with both compiler settings.
Some more explanation to point you out what I mean:
class CMyString
{
...
...
private:
#ifdef _DEBUG
array<iterator> m_DebugIteratorList;
#endif
char* m_Buffer;
...
...
};