Occurs when the internal buffer overflows.
[Visual Basic] Public Event Error As ErrorEventHandler [C#] public event ErrorEventHandler Error; [C++] public: __event ErrorEventHandler* Error;
[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.
The event handler receives an argument of type ErrorEventArgs containing data related to this event.
The system notifies you of file changes, it stores those changes in a buffer that the component creates and passes to the Application Programming Interfaces (APIs). If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer is expensive, as it comes from non paged memory that cannot be swapped out to disk, so keep the buffer as small as possible. To avoid a buffer overflow, use the NotifyFilter, Filter, and IncludeSubdirectories properties to filter out unwanted change notifications.
Note Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several OnChanged and some OnCreated and OnDeleted events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, anti-virus software) might cause additional file system events that are detected by FileSystemWatcher.
Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family