Unit DiscMon |
==================== DISC DRIVE MONITOR ===================================== // Class and Component to encapsulate the FindXXXXChangeNotification API calls // The FindXXXXChangeNotification API calls set up a disc contents change notification handle. You can set a filter to control which change types are notified, the directory which is monitored and set whether subdirectories from the monitored directory are monitored as well. // ------------------------------------------------------------------------------ This file contains a class derived from TThread which undertakes the disc monitoring and a simple component which encapsulates the thread to make a non-visual VCL component. This component works at design time, monitoring and notifying changes live if required. // Version 1.00 - Grahame Marsh 14 January 1997 Version 1.01 - Grahame Marsh 30 December 1997 Bug fix - really a Win 95 bug but only surfaces in D3, not D2 - see notes in execute method Version 1.02 - Grahame Marsh 30 January 1998 - adapted to work with version 2.30 TBrowseDirectoryDlg // Freeware - you get it for free, I take nothing, I make no promises! // Please feel free to contact me: grahame.s.marsh@courtaulds.com
Classes |
TDiscMonitor -
TDiscMonitorThread - === DISC MONITORING THREAD =================================================== This thread will monitor a given directory and subdirectories (if required) for defined filtered changes.
Functions |
Register -
Types |
TDiscMonitorDirStr
TMonitorFilter
TMonitorFilters
Constants |
Variables |
Functions |
Types |
TDiscMonitorDirStr = type string===================== DISC MONITORING COMPONENT ============================== specify directory string as type string so we can have our own property editor
TMonitorFilter = (moFilename, moDirName, moAttributes, moSize, moLastWrite, moSecurity);enumerated type for filter conditions (not directly usable in thread class) see the SetFilters procedure for the translation of these filter conditions into FILE_NOTIFY_CHANGE_XXXXXX constants.
TMonitorFilters = set of TMonitorFilterset of filter conditions
Constants |
Variables |