[Gambas-devel] Callbacks

Benoit Minisini gambas at ...1...
Mon May 30 17:52:35 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
>

OK. So I have to add an API, something like GB.GetReturnValue() that will 
return a pointer to the GB_VALUE where the return value is stored.

Sigh... I have to recompile everything when I add an API in the GB 
structure :-(

Regards,

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




More information about the Devel mailing list