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

C FFI question



Hi,

In Functional Developer, I want to pass a buffer of unsigned chars to a
C function, but I can't figure out how to do it.  There doesn't seem to
be any documention on how to do this task.


define C-function sendpacket
  parameter pdu :: <C-unsigned-char*>;
  parameter length :: <C-unsigned-short>;
  c-name: "sendpacket";
end;


  let data = "hel\<00>lo";
  sendpacket(data, data.size);  // should send out six bytes

Can someone give me a hint?

thanks


Sent via Deja.com http://www.deja.com/
Before you buy.



Follow-Ups: