Hi friends,
I wrote a DLL with Delphi. Now I am migrating my applications to C#.Net. In
this way I have a few question.
1- How can I create a DLL in C#.Net
2-How can I load DLL's at runtime dynamically?
3-Can I use my old DLL in C#.Net? How can I do it?
Thanks
Arda Han
Software Engineer 2 3602
Hi Arda
this is a short answer you quistions , i will be wiling to give more
explination if you post others once you get into somedetails.
1- How can I create a DLL in C#.Net
Answer: create a new project of type Class Library. That is, open new
project, select C#, then in the project type select Class Library.
2-How can I load DLL's at runtime dynamically?
Answer: to load a DLL, you use the DllImport attribute, then
define the function you are to use form the dll as external(you can read
more about that attribute on the MSDN online) However, if it is your dll,
why don't you just add reference to it (right click you project, select add
reference), you select it from the project tab, assuming you will have the
two project inside the same solution.
3-Can I use my old DLL in C#.Net? How can I do it?
Ansewer : yes you can , if it is com , you can make register it using
TlpExp ,if not , still you can alway use the DllImport
Thanks
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
Thanks Mohamoss,
"Mohamoss" <mo************@egdsc.microsoft.com>, haber iletisinde şunları
yazdı:QX*************@cpmsftngxa10.phx.gbl...
Hi Arda
this is a short answer you quistions , i will be wiling to give more explination if you post others once you get into somedetails.
1- How can I create a DLL in C#.Net Answer: create a new project of type Class Library. That is, open new project, select C#, then in the project type select Class Library. 2-How can I load DLL's at runtime dynamically? Answer: to load a DLL, you use the DllImport attribute, then define the function you are to use form the dll as external(you can read more about that attribute on the MSDN online) However, if it is your dll, why don't you just add reference to it (right click you project, select
add reference), you select it from the project tab, assuming you will have the two project inside the same solution. 3-Can I use my old DLL in C#.Net? How can I do it? Ansewer : yes you can , if it is com , you can make register it using TlpExp ,if not , still you can alway use the DllImport
Thanks Mohamed Mahfouz MEA Developer Support Center ITworx on behalf of Microsoft EMEA GTSC This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: beliavsky |
last post by:
Many of my C++ programs have the line
using namespace std;
but the "Accelerated C++" book of Koenig and Moo has many examples
where the library names are included one at a time, for example
...
|
by: Enos Meroka |
last post by:
Hallo,
I am a student doing my project in the university.. I have been trying
to compile the program using HP -UX aCC compiler, however I keep on
getting the following errors.
...
|
by: Calum Grant |
last post by:
In older C++ computer books, you'll often see
using namespace std;
even in my 1996 copy of Stroustrup. Nowadays, it seems to be considered
better to qualify names to make it clearer what...
|
by: canasdaq |
last post by:
Can anyone please help me. I was looking at the article "http://www.eggheadcafe.com/articles/20030603.asp". I am new to .net and know nothing in c#. I want to write a menu in asp.net. Can anyone...
|
by: Grasshopper |
last post by:
Hi,
I am automating Access reports to PDF using PDF Writer 6.0. I've
created a DTS package to run the reports and schedule a job to run this
DTS package. If I PC Anywhere into the server on...
|
by: John Spiegel |
last post by:
Hi All,
I've been working on building a .dll in C# (framework 1.1) and using it in
VFP8. As always, the example that runs so smoothly in the article fails at
a rather basic point in practice. ...
|
by: acb |
last post by:
Hi,
I wrote a DLL Component (using Visual Studio 2005) and managed to
include it into a C# Console application.
I am now trying to include this component into a Web project. I copy
the DLL...
|
by: Eugene Anthony |
last post by:
The problem with my coding is that despite removing the records stored
in the array list, the rptPages repeater
control is still visible. The rptPages repeater control displayes the
navigation...
|
by: JDeats |
last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting
and decrypting a file.
http://support.microsoft.com/kb/307010
In .NET 2.0 this approach is not fully supported (a .NET 2.0...
|
by: =?Utf-8?B?Q2hyaXMgSGFsY3Jvdw==?= |
last post by:
Hi there
I've successfully added some .NET validation controls to a page (using
<asp:RequiredFieldValidator ...), however when I try to set the 'display'
property to 'dynamic', my page then...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |