Re: wrapping C functions

new topic     » goto parent     » topic index » view thread      » older message » newer message
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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu