Re: Passing a pointer of function to a c function

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

David Ryder wrote:
> 
> Please could anyone help me to use this c function thanks.
> 
> SWHANDLE SWModule_doSearch(SWHANDLE hmodule, const char *searchString, int
> type,
> int params ,void (*percent) (char, void *), void *percentUserData) 
> 
> it's the bit that points to a function that I am not sure how to get it to
> work
> in Euphoria: void (*percent) (char, void *)
> 
> this is the euphoria that imports this function.
SWModSearch = define_c_func(swordLib, "SWModule_doSearch", {C_POINTER, C_CHAR,
C_INT, C_INT, C_POINTER, C_POINTER},
C_POINTER)
global function EuSWModSearch(atom mod, sequence searchString, atom searchType,
atom params ,atom


You want to use call_back():
constant EuSWModSearch_cb = call_back( routine_id("EuSWModSearch") )


Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu