By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,893 Members | 1,231 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,893 IT Pros & Developers. It's quick & easy.

Create Native DLL

P: n/a
Hi

I don't know if it is possible, but I need to create a DLL in C# or
VB.Net, that can be invoke by function Loadlibrary from Delphi.

Is this possible? How?

Thanks a lot

Elton
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Is this possible? How?


No. Or at least it's not possible to export functions as static entry
points. You can still LoadLibrary but that will not do you much good.

Mattias

--
Mattias Sj÷gren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 16 '05 #2

P: n/a

"Elton Rabello" <Elton Ra*****@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi

I don't know if it is possible, but I need to create a DLL in C# or
VB.Net, that can be invoke by function Loadlibrary from Delphi.

Is this possible? How?

Thanks a lot

Elton

I think you have to write a call thru dll in C/C++ which then calls the real
dll. I'm not sure I understand. Do you want to call a C# dll from Delphi?

/Fredrik

Nov 16 '05 #3

P: n/a
Hi

I have to do a dll that can be loaded with the DLLImport of C# for
example, in case of Delphi, this use a LoadLibrary, because the function on
Delphi will map the functions of my dll, but on first call of LoadLibrary
this return "Unable to load DLL", this Delphi application don┬┤t run with COM
and .Net objects, only native.

Thanks a lot, this is very important for me

Elton

"Fredrik Wahlgren" wrote:

"Elton Rabello" <Elton Ra*****@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi

I don't know if it is possible, but I need to create a DLL in C# or
VB.Net, that can be invoke by function Loadlibrary from Delphi.

Is this possible? How?

Thanks a lot

Elton

I think you have to write a call thru dll in C/C++ which then calls the real
dll. I'm not sure I understand. Do you want to call a C# dll from Delphi?

/Fredrik

Nov 16 '05 #4

P: n/a
Create it as a .NET class library and register it as a COM Object.

You registry it by using RegAsm.exe. Then import it into Delphi as a COM
object.

"Elton Rabello" <El**********@discussions.microsoft.com> wrote in message
news:2C**********************************@microsof t.com...
Hi

I have to do a dll that can be loaded with the DLLImport of C# for
example, in case of Delphi, this use a LoadLibrary, because the function on Delphi will map the functions of my dll, but on first call of LoadLibrary
this return "Unable to load DLL", this Delphi application don┤t run with COM and .Net objects, only native.

Thanks a lot, this is very important for me

Elton

"Fredrik Wahlgren" wrote:

"Elton Rabello" <Elton Ra*****@discussions.microsoft.com> wrote in message news:33**********************************@microsof t.com...
Hi

I don't know if it is possible, but I need to create a DLL in C# or
VB.Net, that can be invoke by function Loadlibrary from Delphi.

Is this possible? How?

Thanks a lot

Elton

I think you have to write a call thru dll in C/C++ which then calls the real dll. I'm not sure I understand. Do you want to call a C# dll from Delphi?
/Fredrik

Nov 16 '05 #5

P: n/a
Thanks, but the object can┬┤t be a COM, this have to be a real API

"Relaxin" wrote:
Create it as a .NET class library and register it as a COM Object.

You registry it by using RegAsm.exe. Then import it into Delphi as a COM
object.

"Elton Rabello" <El**********@discussions.microsoft.com> wrote in message
news:2C**********************************@microsof t.com...
Hi

I have to do a dll that can be loaded with the DLLImport of C# for
example, in case of Delphi, this use a LoadLibrary, because the function

on
Delphi will map the functions of my dll, but on first call of LoadLibrary
this return "Unable to load DLL", this Delphi application don┬┤t run with

COM
and .Net objects, only native.

Thanks a lot, this is very important for me

Elton

"Fredrik Wahlgren" wrote:

"Elton Rabello" <Elton Ra*****@discussions.microsoft.com> wrote in message news:33**********************************@microsof t.com...
> Hi
>
> I don't know if it is possible, but I need to create a DLL in C# or
> VB.Net, that can be invoke by function Loadlibrary from Delphi.
>
> Is this possible? How?
>
> Thanks a lot
>
> Elton
>
I think you have to write a call thru dll in C/C++ which then calls the real dll. I'm not sure I understand. Do you want to call a C# dll from Delphi?
/Fredrik


Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.