Are you using Delphi 8 (Delphi.Net) ?
If not, you'll only get unmanaged assemblies,
which you'd need to create a wrapper for,
or use the Source Forge version to enable Delphi 5+ for .Net usage:
http://sourceforge.net/projects/delphinet
More info on Delphi 8.0 Basics:
http://www.delphibasics.co.uk/Net.html
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en espaņol :
http://asp.net.do/foros/
======================================
<(E-Mail Removed)> wrote in message news:35d8e10e-3bb6-4d36-a379-(E-Mail Removed)...
> hi i built a very simple dll with delphi
>
> library Printing;
> uses
> SysUtils, Classes, Dialogs;
> {$R *.res}
> function Hello: WideString; stdcall;
> begin
> ShowMessage('test');
> result := 'blah';
> end;
> exports Hello;
> begin end.
> In VB.Net, i tired calling it. the ShowMessage executes, so that's a
> start. I get this error afterwards, SEHException - "External component
> has thrown an exception."
>
> this is how i declared it
>
> Declare Function Hello Lib "Printing.dll" () As String
>
> It fails on returning a string. Does anyone know why?