WMT_STATUS Event Notification in DirectShow

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Both the ASF Reader and the ASF Writer forward WMT_STATUS events to applications. The writer forwards all such events, and the reader forwards only those that pertain to DRM license acquisition. To receive these event notifications in your application, add a case for the EC_WMT_EVENT in your event-handling function. The lParam1 parameter associated with the event contains the WMT_STATUS code (which can be WMT_ERROR) and lParam2 contains an AM_WMT_EVENT_DATA that includes the HRESULT.