Dll using Assembly.LoadFrom

  • Thread starter Thread starter marlos
  • Start date Start date
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
 
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#
 
Back
Top