[fpc-pascal]executing different gtk applications from FPC

Fernando Lozano fsl at centroin.com.br
Thu Jul 19 01:29:16 CEST 2001


Andreas,


> > The exec function from the dos unit always waits till the started
> > application closes.
> > If you don't want to wait, use the linux unit:
> 
> And how can I make that with Win32?
> Where can I get informations about the windows unit?
> Is the windows unit compatible with the linux unit?


You should get the Win32 API help file (from Microsoft plataform SDK, or
from VB Enterprise, or from Delphi...). All APIs calls are declared on
the Windows unit and you can create processes, threads (use this instead
of processes) and wait for them to finish if you want, or query their
status. The "2" examples show how to use semaphores to implement
critical regions when the pararel processes create problems with each
other.

If someone from the fpc developers is reading, I'll be glad to donate
these samples to the fpc team and translate/comment them if you wish. I
use these examples on a computer science course.

I am sending some examples atached that show how to start
processes/threads and wait for them under Linux and Windows. As the two
OSes are very different on process handling, the programs will also be
very different.


[]s, Fernando Lozano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiconta-win2.pas
Type: application/x-unknown-content-type-pas_auto_file
Size: 2085 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20010718/d0a7bf7e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiconta-lin2.pas
Type: application/x-unknown-content-type-pas_auto_file
Size: 2615 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20010718/d0a7bf7e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiconta-win.pas
Type: application/x-unknown-content-type-pas_auto_file
Size: 1156 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20010718/d0a7bf7e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiconta-lin.pas
Type: application/x-unknown-content-type-pas_auto_file
Size: 867 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20010718/d0a7bf7e/attachment-0003.bin>


More information about the fpc-pascal mailing list