<div class="gmail_quote">2009/7/2 Eli Barzilay <span dir="ltr"><<a href="mailto:eli@barzilay.org">eli@barzilay.org</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Jul 2, Elena Garrulo wrote:<br>
> Well, I finally nailed it down. It would look like this (code<br>
> shrinked down from major example, not tested!) :<br>
><br>
> ;; void fill_buffer (BYTE* buffer, DWORD* buffer_size);<br>
> (define fill_buffer<br>
> (get-ffi-obj "fill_buffer"<br>
> my_dll<br>
> (_fun<br>
> (buffer : _pointer)<br>
> (buffer_size : ((_ptr io _DWORD)))<br>
> -> _void<br>
> -> (list buffer_size)))) ;; <- OUTPUT?<br>
<br>
</div>I'm still not sure about the point of this -- is the foreign function<br>
supposed to put data in your block and tell you the size of the data<br>
through the extra return value (eg, instead of using 0 as a<br>
terminator, or instead of you giving it a block of the right size)?<br>
IMO, this doesn't sound like a good API.</blockquote><div><br>You got the point. They are legacy Win32 APIs. <br>
<div class="im"></div></div><div><br>Thank you for your other suggestions.<br> <br></div></div>