Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Vincent Snijders
Marc Weustink wrote: Vincent Snijders wrote: Micha Nelissen wrote: On Tue, 30 Aug 2005 11:09:30 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: In windows, it's slightly more difficult (surprise, surprise :-) ) You can use MsgWaitForMultipleObjects to do this

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Michael Van Canneyt
On Tue, 30 Aug 2005, Micha Nelissen wrote: On Tue, 30 Aug 2005 11:09:30 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: On Tue, 30 Aug 2005, Micha Nelissen wrote: What do you mean with Idle handler? TApplication.OnIdle ? In any sane app, that is only

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Vincent Snijders
Micha Nelissen wrote: On Tue, 30 Aug 2005 11:09:30 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: In windows, it's slightly more difficult (surprise, surprise :-) ) You can use MsgWaitForMultipleObjects to do this for a windows handle, or use WaitForSingleObject on

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Michael Van Canneyt
On Tue, 30 Aug 2005, Vincent Snijders wrote: Micha Nelissen wrote: On Tue, 30 Aug 2005 11:09:30 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: In windows, it's slightly more difficult (surprise, surprise :-) ) You can use MsgWaitForMultipleObjects to do

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Micha Nelissen
On Tue, 30 Aug 2005 12:20:40 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: You can wait on any handle: file, pipe, socket. From msdn: The WaitForSingleObject function can wait for the following objects: * Change notification * Console input *

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Micha Nelissen
On Tue, 30 Aug 2005 11:09:30 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: On Tue, 30 Aug 2005, Micha Nelissen wrote: What do you mean with Idle handler? TApplication.OnIdle ? In any sane app, that is only called once when the user goes idle; after that, the

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Florian Klaempfl
Vincent Snijders wrote: And how are you doing that? In lazarus the following code is used (more or less): repeat Windows.PeekNamedPipe(PipeHnd, nil, 0, nil, @TotalBytesAvailable, nil); if TotalBytesAvailable0 then break; Application.ProcessMessages Sleep(10); until false;

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Florian Klaempfl
Micha Nelissen wrote: On Tue, 30 Aug 2005 12:23:06 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: Things you could use this function for: file change notifications, events, ... all have to be seperately implemented in the FCL/LCL to make them work universally and

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Marc Weustink
Vincent Snijders wrote: Marc Weustink wrote: Vincent Snijders wrote: Micha Nelissen wrote: On Tue, 30 Aug 2005 11:09:30 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: In windows, it's slightly more difficult (surprise, surprise :-) ) You can use

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Michael Van Canneyt
On Tue, 30 Aug 2005, Micha Nelissen wrote: On Tue, 30 Aug 2005 12:20:40 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: You can wait on any handle: file, pipe, socket. From msdn: The WaitForSingleObject function can wait for the following objects:

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Michael Van Canneyt
On Tue, 30 Aug 2005, Vincent Snijders wrote: Michael Van Canneyt wrote: On Tue, 30 Aug 2005, Vincent Snijders wrote: Micha Nelissen wrote: On Tue, 30 Aug 2005 11:09:30 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: In windows, it's slightly more

Re: [lazarus] Simple IPC implementation.

2005-08-30 Thread Michael Van Canneyt
On Tue, 30 Aug 2005, Micha Nelissen wrote: On Tue, 30 Aug 2005 12:23:06 +0200 (Romance Daylight Time) Michael Van Canneyt [EMAIL PROTECTED] wrote: Things you could use this function for: file change notifications, events, ... all have to be seperately implemented in the FCL/LCL to make

Re: [lazarus] Simple IPC implementation.

2005-08-29 Thread Michael Van Canneyt
On Mon, 29 Aug 2005, Micha Nelissen wrote: On Mon, 29 Aug 2005 16:32:42 +0200 (CEST) Michael Van Canneyt [EMAIL PROTECTED] wrote: 3. Currently a loop must be implemented with a timer. (the server app shows how) Any suggestions on how to integrate it in a message loop would

Re: [lazarus] Simple IPC implementation.

2005-08-29 Thread Michael Van Canneyt
On Mon, 29 Aug 2005, Micha Nelissen wrote: On Mon, 29 Aug 2005 23:22:53 +0200 (CEST) Michael Van Canneyt [EMAIL PROTECTED] wrote: On Mon, 29 Aug 2005, Micha Nelissen wrote: Do you know the TThread.Synchronize eventloop hooks ? (WakeMainThread and friends). I think this can be