[Gambas-devel] Callbacks

Benoit Minisini gambas at ...1...
Mon May 30 18:15:31 CEST 2005


On Monday 30 May 2005 17:43, Daniel Campos wrote:
> >If you use GB.Call() to call the function, then the returned value of the
> >called Gambas function automatically becomes the return value of the
> >component C function, as if you have called GB.ReturnXXX().
> >
> >I think it is what you need... :-)
>
> May be I didn't understood fine, but I think this is not what I want, I
> follow the following process:
>
> 1) The library calls my callback in the gb.api component.
> 2) Into my callback, I "map" it to a Gambas function in the main program,
> so I pass the parameters using GB.Push() and then I call GB.Call().
> 3) The main application returns any value.
> 4) I must convert that  value to a C type and then use the "C" return,
> to return
> that value to the library.
>
> Regards,
>
> D. Campos
>
>

If GB.Call() returns a pointer to the GB_VALUE * structure including the 
return value, will it be sufficient ? 

You will have to the test the type yourself to decide what to return exactly.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list