Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

access managed code ( CLR ) DLL with Delphi 7

Tags:

c#

.net

clr

dll

delphi

How delphi7 access C# .net managed dll ?

i'm trying to access some DLL that compiled in c# and they are not those old style DLL. ( i dont have source for those DLL)

i did tried to search online but they are confusing. i guess there is some limitation even if get to access it with D7 ..

thanks.

like image 920
inuteroy Avatar asked Feb 28 '23 06:02

inuteroy


1 Answers

@AngryHacker, For what you have suggested to be true, the .NET Assembly needs to be marked with the ComVisibleAttribute ( Register for COM Interop option enabled), and expose each function to COM using the [ComVisible(true)].

If you are trying to use a third party assembly (which you did not write) you have to check with the vendor whether that assembly can be used through COM.

Also the assembly does NOT need to be strong named to be accessible via COM.

If you do not want to go the COM way, check out CrossTalk for Delphi : http://www.atozed.com/CrossTalk/Docs/index.EN.aspx

like image 196
G-Man Avatar answered Mar 07 '23 11:03

G-Man