Al Boldi wrote:
melchiorre caruso wrote:
Al Boldi wrote:
I do not know how to do it,
It turns out that you need an export trick to do this.

Include the attached 'LibSyncMgr.inc' into your lib after your
exports-line with this line:

        {$i LibSyncMgr.inc}

Make sure there is no LCL or Interfaces unit included in your library
project.

Then include the attached 'LibSyncMgr.pas' in your main-apps uses
clause.

Then add this line:

        TLibSyncMgr.Create(self).LibHandle := LibHandle;

right after your LoadLibrary call.
I have updated code with your suggestions, but synchronize still does
not work.

I tried your project, but it wouldn't work on linux. I had to change a few things:
1.  Add cthreads in uses clause
2.  Add a 'writeln('lib loaded');' inside begin end of libthread.dpr,
    otherwise it crashes.
3.  Change LoadLibrary('libthread.dll') to LoadLibrary('./liblibthread.so')

Then it works on linux.

To help further, you have to put a few debug writeln's throughout the code to see exactly where it stops working.

Thanks Al

---
Melchiorre

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to