Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Michael Schnell
On 08/08/2013 02:41 PM, Lukasz Sokol wrote: Very well then, thanks :) I suggest that - to exclude problems that might be imposed by some external non-Lazarus and software not by yourself - you do a test creating a combination of a Lazarus Application and a Lazarus-made dll (and/or so) that

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Henry Vermaak
On Fri, Aug 09, 2013 at 09:28:47AM +0200, Michael Schnell wrote: On 08/08/2013 02:41 PM, Lukasz Sokol wrote: Very well then, thanks :) I suggest that - to exclude problems that might be imposed by some external non-Lazarus and software not by yourself - you do a test creating a combination

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Sven Barth
Am 08.08.2013 13:31, schrieb Michael Schnell: On 08/08/2013 01:15 PM, Lukasz Sokol wrote: but I would then need to make the wrapper object aware of the Application or its forms then? This is provided by Runtime Packages with Delphi. Michael, it seems that you understood Lukasz wrong, this has

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Michael Schnell
On 08/09/2013 10:57 AM, Henry Vermaak wrote: You seem to think that Lukasz is making a library, This is what I understood from self contained wrapper unit. But maybe I am wrong. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Michael Schnell
On 08/09/2013 11:02 AM, Sven Barth wrote: Michael, it seems that you understood Lukasz wrong, Yep. I thought he intents to do a dll himself, but maybe I am wrong. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Lukasz Sokol
On 09/08/13 08:28, Michael Schnell wrote: On 08/08/2013 02:41 PM, Lukasz Sokol wrote: Very well then, thanks :) I suggest that - to exclude problems that might be imposed by some external non-Lazarus and software not by yourself - you do a test creating a combination of a Lazarus

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-09 Thread Marco van de Voort
In our previous episode, Sven Barth said: It's not only the memory that needs to be shared. All DLLs need to use the same RTL functions and the VMT pointers need to be equal as well. If you have two DLLs and both use TObject than for a TObject variable of DLL A is is not true for a TObject

[fpc-pascal] Re: Library callback : how do I do that?

2013-08-08 Thread Lukasz Sokol
On 08/08/13 11:52, Michael Schnell wrote: On 08/08/2013 12:34 PM, Lukasz Sokol wrote: Hello, I am making a Pascal wrapper for a library, which states in its API description: Note that the Callback function will be called from an independent child thread, not from the Application’s

[fpc-pascal] Re: Library callback : how do I do that?

2013-08-08 Thread Lukasz Sokol
On 08/08/13 11:58, Henry Vermaak wrote: On Thu, Aug 08, 2013 at 11:34:53AM +0100, Lukasz Sokol wrote: This would be fine, IFF i was adding this to the main form of my application... but I'm not. I'm trying to wrap this .dll in a separate unit, only communicating to the form through a wrapper

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-08 Thread Michael Schnell
On 08/08/2013 01:15 PM, Lukasz Sokol wrote: but I would then need to make the wrapper object aware of the Application or its forms then? This is provided by Runtime Packages with Delphi. Lazarus does not support Runtime packages (yet) so you are quite on your own to implement something

[fpc-pascal] Re: Library callback : how do I do that?

2013-08-08 Thread Lukasz Sokol
On 08/08/13 12:31, Michael Schnell wrote: On 08/08/2013 01:15 PM, Lukasz Sokol wrote: but I would then need to make the wrapper object aware of the Application or its forms then? This is provided by Runtime Packages with Delphi. Lazarus does not support Runtime packages (yet) so you are

Re: [fpc-pascal] Re: Library callback : how do I do that?

2013-08-08 Thread Henry Vermaak
On Thu, Aug 08, 2013 at 12:15:44PM +0100, Lukasz Sokol wrote: but I would then need to make the wrapper object aware of the Application or its forms then? I wanted the wrapper unit to be as self-contained as much as possible, (so the callback function is defined in a unit that only has

[fpc-pascal] Re: Library callback : how do I do that?

2013-08-08 Thread Lukasz Sokol
On 08/08/13 13:04, Michael Schnell wrote: On 08/08/2013 01:42 PM, Lukasz Sokol wrote: i see then, having a chain (callback procedure) - MyObject.CallbackNotify - (processing callback data) - call a function within a form unit that does Application.QueueAsyncCall() is really my best bet