dll return type? 
Author Message
 dll return type?

I'm using VA Smalltalk 4.5.....

I make dll file with delphi...
====================================================
Function GetIPfromHost(hostnm : pchar ): pchar; stdcall;
var
  tcpclient : TTcpClient;
  resultHost : pchar;
begin
  tcpclient := TTcpclient.Create(nil);
  resultHost := pchar(TcpClient.LookupHostAddr(hostnm));
  tcpclient.free;
  result := resultHost;
end;

====================================================
this is 'mycom' --> 100.1.1.1     function

and make VA smalltalk PlatformFuction

getIPfromHost := PlatformFunction
 callingConvention: 'c'
 function: 'GetIPfromHost'
 library: 'c:\kyobo\mymsg\Mymsgdll.dll'
 parameterTypes: #(pointer )
 returnType: #pointer.

r := (getIPfromHost callWith: (nm asPSZ) ).

I think "r" is '100.1.1.1' but that is something another SmallInteger....

why????
How to do?

thanks



Sun, 27 Jun 2004 08:02:24 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. DLL return type and parmaters

2. Call function from DLL with return type void*

3. returning ARRAY structures from DLL-functions in Dyalog

4. How do I return values from Clarion DLL

5. Returning stings under VW2.0 via DLL and C Connect on PC

6. Return Value From DLL

7. returning multiple data from c function dll

8. returning a C string from a win32 dll

9. returning a C string from a win32 dll

10. shared libraries, dll, on error return to caller and skip rest of vi

11. call function from dll with return void*

12. calling a dll that returns a handle

 

 
Powered by phpBB® Forum Software