Re: DECLARE FUNCTION - DLL
- From: "zzzxtreme@xxxxxxxxx" <zzzxtreme@xxxxxxxxx>
- Date: Fri, 4 Jan 2008 09:41:09 -0800 (PST)
thanks i found out the problem
delphi WideString is actually OLE-String.
I just changed to PAnsiChar
On Jan 5, 1:01 am, "Juan T. Llibre" <nomailrepl...@xxxxxxxxxxx> wrote:
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/
======================================
<zzzxtr...@xxxxxxxxx> wrote in messagenews:35d8e10e-3bb6-4d36-a379-21562d0745d4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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?
.
- References:
- DECLARE FUNCTION - DLL
- From: zzzxtreme@xxxxxxxxx
- Re: DECLARE FUNCTION - DLL
- From: Juan T. Llibre
- DECLARE FUNCTION - DLL
- Prev by Date: Re: Downloading file from database causes page to stop responding???
- Next by Date: Re: Where is HTML Tidy
- Previous by thread: Re: DECLARE FUNCTION - DLL
- Next by thread: Downloading file from database causes page to stop responding???
- Index(es):
Relevant Pages
|