#include <StatusInterface.h>
The status interface is used for main application - filter communication. The SetLastError method should be called from within the filter code when an error occurs. The main application can then retrieve this information using GetLastError.
The SetMediaEventSink method provides us with a way of letting the filter notify the application of an event asynchronously via Windows events. If an error occurs in the DirectShow pipeline during processing, this can be communicated to the main application provided that the Media Event Sink has been set. The friendly ID is passed as a part of the windows message and allows the main application to determine in from which filter the notification came.