HighTechTalks DotNet Forums  

Importing a C#.NET dll into Delphi Options

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Importing a C#.NET dll into Delphi Options in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
sarah_c_clough@hotmail.com
 
Posts: n/a

Default Importing a C#.NET dll into Delphi Options - 05-24-2007 , 07:14 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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.