IAntimalware2::Notify method (amsi.h)
Sends to the antimalware product a notification of an arbitrary operation. The notification doesn't imply the request of an antivirus scan. Rather, IAntimalware2::Notify is designed to provide a quick and lightweight mechanism to communicate to the antimalware product that an event has taken place. In general, the antimalware product should process the notification, and return to the caller as quickly as possible.
HRESULT Notify( PVOID buffer, ULONG length, LPCWSTR contentName, LPCWSTR appName, AMSI_RESULT *pResult );
The buffer that contains the notification data.
The length, in bytes, of the data to be read from buffer.
The filename, URL, unique script ID, or similar of the content being scanned.
The name of the application sending the AMSI notification.
The result of the scan.
This method can return one of these values.
|E_INVALIDARG||One or more arguments is invalid.|
|E_NOT_VALID_STATE||The object isn't initialized.|
|Minimum supported client||Windows 10 [desktop apps only]|
|Minimum supported server||Windows Server 2016 [desktop apps only]|