C Run Time Library Problem in Delphi???
Posted on 2006-06-14
I have developed a DLL using Microsoft Visual C++ .NET 2003 (7.1). Works fine in the C++ environment, works filein the Visual Basic 7.1 environment. In Delphi 5, it causes a crash. Have isolated the crash to an "xxx = new Object (xxx,xxx)" type statement. The result is an exception which cannot be caught by "catch (std::exception)", only by "catch (...)", so there is little information available. Suspect a C runtime library problem. The DLL I have created references MSVCP71.dll and MSVCR71.dll. Dependency walker suggests that Delphi 5 is using MSVCRT.dll.
Is the C run time library my problem? Is there something else I should look at? If the C run time library is my problem, how can I compile and link the DLL so it references MSVCRT.dll (or whatever it is that Delphi 5 is using)??? Thanks in advance.
PS>> Just prior to crash, _heapchk (called from within the DLL) says the heap is OK