[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FFI in ACL/W 2.0



In my interface to a windows-dll I use a function which return a pointer
to structure.
the c code looks like:
struct struct-name FAR * PASCAL FAR fn-name (...)

I declared the lisp function with
(ct:defun-dll fn-name (...)
  :return-type (struct-name *)
  :16-bit t
 ...)

Unfortunately, all I get back from the function is a null pointer.
I also tried (struct-name **) as :return-type to get a 16:16 far pointer
instead of a 32 bit near pointer, but that makes no difference at all.

Of course, I'm not sure, whether the dll-function returns the wrong value
or my declaration is wrong. If there is anybody, who can tell me about the
correct syntax of the declaration, I can eliminate another error source.

thanks,

- stefan

_____________________________________________________________________
***  Support bacteria -- it's the only culture some people have! ****
_____________________________________________________________________
Stefan K. Bamberger          email: bambi@informatik.uni-wuerzburg.de
Lehrstuhl fuer Informatik VI
Universitaet Wuerzburg                       voice : ++49 931 7056114
Allesgrundweg 12                               Fax : ++49 931 7056120
97218 Gerbrunn / Germany
_____________________________________________________________________