FFI is fun (was Suggestions for C++ or DLL code)

Ron Teitelbaum Ron at USMedRec.com
Tue Aug 1 01:45:08 UTC 2006


Andreas and John,

Ok that was a lot more fun then I thought it would be.  And I understand
what John was saying, you pull your hair out until it actually works.  When
it did it was quite fun!

> From: John M McIntosh
> In using FFI, mapping the parms/return values to the correct Smalltalk 
> external objects will at some point drive you crazy, it does all work, 
> but sometimes late at night you wonder.

I parsed out the parameters and used apicall and it WORKED!!  FFI is pretty
powerful, I really like the form shifting it is much easier the VW!!  I
hadn't realized that you could use structures as parameters, it's very cool.

One of the things that really made it easier is I wrote a C++ app that just
prints out the final values of the parameters, it's a hack to keep from
having to look everything up.

Thank you for your help getting it to work!!

> From: Andreas Raab
> Sent: Monday, July 31, 2006 3:22 AM
>
> If you only have a few api calls, you may just support the structures
> you need for those FFI calls.> 





More information about the Squeak-dev mailing list