When a tstring goes out of scope or is deleted, the following error is reported.
HEAP[XXXX.exe]: Invalid Address specified to RtlValidateHeap(
8e0000, 8c3510 )
Unhandled exception at 0x77fa144b in Usage1.exe: User breakpoint
Windows has triggered a breakpoint in XXXXX.exe.
This may be due to a corruption of the heap, and indicates a bug in XXXXXX.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information
In debug, all memory allocations are tracked within the debug version of
CRT (C runtime libraries). They keep track of all the allocations, and
tick them off as there de-allocated. When you are using 2 libraries
different versions (or instances) of the CRT, then you have 2 lists of
objects. This may not sound like a problem, but it is posible (and
memory will be allocated against one, and de-allocated against
another. It is
under these sucumstances that you see this problem. More on this can
on the Microsoft site Potential Errors Passing CRT Objects Across DLL Boundaries
Change the way the projects are linked (See linking
E.g. Visual Studo 6.0 - change from Debug
to Debug Multithreaded DLL (/MDd):
E.g. Visual Studio .Net (version 7.0) - change from
Debug (/MTd) to Multi-threaded Debug DLL (/MDd):
All Builds of Liquid XML DataBinder, when using Microsoft Visual C++ (all Versions)