C# DLL and C

  • Thread starter Thread starter GTi
  • Start date Start date
G

GTi

I have a old C project that is to big to be converted to C# at once.
So we are tinking of doing it step by step.

Is it possible to execute a C# DLL function from C ?

It is possible to execute a C function in C# but what about the other way?
 
From C you will have to use COM interop (CoCreateInstance and friends) to call the C# code (lookup tlbexp.exe and regasm.exe)

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

I have a old C project that is to big to be converted to C# at once.
So we are tinking of doing it step by step.

Is it possible to execute a C# DLL function from C ?

It is possible to execute a C function in C# but what about the other way?
 
Hmmm, never had a affair with CoCreateInstance with hers friends before....
Tanks Richard, will check her up.
 
GTi said:
I have a old C project that is to big to be converted to C# at once.
So we are tinking of doing it step by step.

Is it possible to execute a C# DLL function from C ?

Via COM you can. Generate a typelib from your C# dll and you can then
use it as a dll with COM components in C. Though I wouldn't go there,
it's far from optimal.

FB

--
 
Back
Top