[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Importing a C#.NET dll into Delphi Options

sarah_c_clough

5/24/2007 11:15:00 AM

I have a dll created in C#.net, that I wish to call from Delphi 5. I
have strong-named the assembly, deployed it in the GAC, and registered
it with RegAsm, but whenever I create the pas file (either through the
'Import Type Library' option in Delphi, or via an InteropUtils program
I found on the web) it does not contain any types. In the 'const'
section in the pas file there is one GUID for the dll, but nothing
else, and there is no 'type' section at all.

Can somebody tell me where my problem lies, whether it's how I create
my dll, or am I missing a step before creating it and deploying it
into the GAC, or is there something I need to do before creating the
pas? (I'm pretty sure it's not the latter of these three, as when I
use the Delphi 'import type library', no classes are shown in the
'class names' box).

When I run RegAsm, I have to use the tlb option otherwise it tells me
'No types were registered'. I don't know if this is related, or what
it's telling me.

I tried disassembling the dll using ildasm, then reassembling it using
ilasm, based on a tip I found on the internet, but after I've done
that I can't put it in the GAC as the strong-naming appears to become
invalidated.

Thanks.
Sarah