If you're using Delphi 6 then you could always use TShellChangeNotifier which I believe wraps the Win32 API call FindFirstChangeNotification in a thread (I could be wrong about this claim)...
-Andreas -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, 14 August 2002 07:42 To: Multiple recipients of list delphi Subject: [DUG]: How do I create a passive listner in Delphi? Hi, I'm wanting to have Delphi passively listen for a change in a windows folder / directory i.e. when a file suddenly appears in the directory, having been created by another application, this wakes Delphi up. I don't want Delphi to be actively polling the directory, but rather sleeping (while listening on a port), until Windows wakes it up, notifying it that the directory has changed. This way the Delphi exe, which will sit on the server, won't be gobbling up CPU when nothing is happening. What's the term for this and any comments to get me started - e.g. where to look on the Net? TIA. Dave --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/