Re: call_back ?
- Posted by Mario Steel <eumario at tuscanchat.com> Jul 24, 2004
- 496 views
Juergen Luethje wrote: >I think in Euphoria this would be a procedure rather than a function, >wouldn't it? > > This is the correct way to do it. If the function your calling requires no return, then use procedure. That C/C++ Function would translate into this in Euphoria procedure RasDialFunc(integer unMsg, atom rasconnstate, atom dwError) ... Your handling of the Data that is returned to you .... end procedure c_proc(xRasDialFunc,{call_back(routine_id("RasDialFunc"))}) This should work. And I assume that rasconnstate is a C/C++ Structure, so you will need to know the structure, in order to properly get the information from it. >In the Euphoria 2.4 documentation for define_c_func(), it reads: >"If you are not interested in using the value returned by the C function, >you should instead define it with define_c_proc() and call it with >c_proc()." > >Does that work for you? > >Regards, > Juergen > Good Luck, Mario