473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dll using Assembly.LoadFrom

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

May 10 '06 #1
3 2161
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#
"marlos" <ma***********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.com...
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

May 10 '06 #2
Thanks Greg,

I will try to use COM interop.

Marlos

May 10 '06 #3
Thanks Greg,

I will try to use COM interop.

Marlos

May 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: samlee | last post by:
Hi, all I must apologise if these questions had been asked before. 1) Why Assembly.Load("System.Windows.Forms") ? 2) How can I set/get property of an object using reflection. More...
1
by: Benjamin | last post by:
Hi, I'm currently writing a Web Services that interacts with a database. To allow me to use not just one database provider (for example, I could use MS Access, SQL Server or MySQL), the Web...
11
by: Michael Maes | last post by:
Hello, I want to be able to load an assembly by selecting a dll from an OpenFileDialog. This seems to work, exept when that assembly references "3rd-Party dll's". Just this simple line: Dim...
1
by: Gujju | last post by:
Hi all, Whats the difference betwn Assembly.Load(FileName) and Assembly.LoadFrom(FileName.dll) ? Cheers C
1
by: lgbjr | last post by:
Hi All, I am moving some of my MDI Child forms to DLLs. The first 3 forms worked fine. But the 4th one is causing me some grief! I use the following code to load a form from a DLL: Dim...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.