C Run Time Library Problem in Delphi???

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
doneDadAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
atul_parmarConnect With a Mentor Commented:
Hi,

The problem is with MSVCR71.dll. (I m not sure about MSVCP71.dll) see
http://support.microsoft.com/kb/326922/en-us

The solution is to put MSVCR71.dll with your applications private directory. If your application is distributable you will also need to distribute the MSVCR71.dll with your application.
0
 
atul_parmarCommented:
If it is .Net compiled assembly, it can not be used with Delphi 5. Only Win32 DLL can be used with Delphi 5.
0
 
doneDadAuthor Commented:
Thanks for the comment.  The DLL is a "normal" WinTel DLL consisting of compiledfor X86 platform machine code.
0
 
doneDadAuthor Commented:
Again, thanks for the comment.  That changed the location of the crash.  I need to track down the new location as I did with the original to see if the crash is still of the same type, or maybe a new and different problem.  It'll be another day or two before I know.
0
 
doneDadAuthor Commented:
The new crash location was an unrelated problem.  Putting the MSVCR71.dll in the same directory as the C++ DLL fixed the original porblem.  Thanks foryour help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.