Link to home
Start Free TrialLog in
Avatar of DMSINTL
DMSINTL

asked on

Calling Managed Code From Unmanaged Code

I am working on an MDI application written in Delphi.  All the child documents are in DLL's.  The names of the DLLs are stored in the database so that they can be dynamiclly added into the system.  The all except the same parameter when they are instantiated, an ADO connection string to the database.  Is it possible to write the child documents in C#, compile them into DLL's, and call them from the Delphi parent document without modifing the parent application?
ASKER CERTIFIED SOLUTION
Avatar of c_myers
c_myers

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of c_myers
c_myers

Yeah, what he said. :)

You have to be careful though, sometimes you can get into a situation where the CLR isn't loaded at the right time. For *most* purposes that should work, but sometimes you have to actually hook into the DLL init stuff and handle the CLR initialization manually. That gets ugly.
I think he (existenz2) should get more of the points (maybe 25/75 me/him)? His answer was more useful. Mine was mostly a "Me too" answer.