Re: wrapping C functions
- Posted by petelomax Feb 21, 2013
- 1474 views
SDPringle said...
That's a little risky
I was thinking that too. Then it dawned on me, there is a far simpler way:
serialPrintf = link_c_proc(dll_ptr, "serialPrintf", {C_INT, C_POINTER}) procedure euSerialPrintf(integer fd, sequence fmt, object args) c_proc(serialPrintf, {fd, allocate_string(sprintf(fmt,args),1)}) end procedure
Pete