Dll using Assembly.LoadFrom

M

marlos

Hi,

I would like to know if it is possible to call a dll written in C#
(.NET 2.0) from an app written in C# (.NET 1.0). I tried to do this but
I received an execution error saying that my dll is incompatible
("version 2.0 is not a compatible version").

I also would like to know if it is possible to call a dll written in
C++ Win32. I received the error "the format of the file * is invalid."

Thanks,

Marlos Fabris
 
G

Greg Young

The first answer is no .. I have yet to see mixed mode work in an appdomain
(maybe someone smarter than me has found some way of doing it but I am 99%
sure it is not possible). You can however do something like use com to
interop between the two.

For other dlls .. you can use pinvoke to call them http://www.pinvoke.net/
is a great resource on this.

Cheers,

Greg Young
MVP - C#
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top