[Gambas-user] External library and calling functions?

Alexie ualex73 at ...626...
Mon Nov 11 16:22:59 CET 2013


Ok, found an example on the following link:
http://www.gambasdoc.org/help/lang/extdecl?v3

Will try it out :)


2013/11/11 Alexie <ualex73 at ...626...>

> Hi Benoit,
>
> That sounds very promsing, but do you have an example of such callback
> coded in Gambas? I can't really find it in the previous link for external
> libraries.
>
> Regards,
> Alex
>
>
> 2013/11/11 Benoît Minisini <gambas at ...1...>
>
>> Le 11/11/2013 07:27, Alexie a écrit :
>> > Hi All,
>> >
>> > Gambas is very capable of interfacing with external libraries, as
>> > documented in:
>> > http://gambasdoc.org/help/howto/extern?v3
>> >
>> > I got it all working fine, i can call a function inside the library and
>> i
>> > get a value back (if there is a return value in the function).
>> >
>> > Only I want something else now ... Within the library there is a
>> > watch/notifier thread running which captures data from the serialport.
>> This
>> > data comes in independantly from the calls done to the library.
>> >
>> > Is it possible to define a hook in Gambas (or the library) that the
>> library
>> > can initiate calls and push information to the main Gambas application?
>> > Thus without having to call a certain function to poll the data, i want
>> to
>> > have it pushed from the library.
>> >
>> > Regards,
>> > Alex
>>
>> You can use any gambas function as callback *provided that the callback
>> is called in the main thread and not in another thread*.
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>>
>> ------------------------------------------------------------------------------
>> November Webinars for C, C++, Fortran Developers
>> Accelerate application performance with scalable programming models.
>> Explore
>> techniques for threading, error checking, porting, and tuning. Get the
>> most
>> from the latest Intel processors and coprocessors. See abstracts and
>> register
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>



More information about the User mailing list