FilterSendMessage function (fltuser.h)
The FilterSendMessage function sends a message to a kernel-mode minifilter.
HRESULT FilterSendMessage( HANDLE hPort, LPVOID lpInBuffer, DWORD dwInBufferSize, LPVOID lpOutBuffer, DWORD dwOutBufferSize, LPDWORD lpBytesReturned );
Communication port handle returned by a previous call to FilterConnectCommunicationPort. This parameter is required and cannot be NULL.
Pointer to a caller-allocated buffer containing the message to be sent to the minifilter. The message format is caller-defined. This parameter is required and cannot be NULL.
Size, in bytes, of the buffer pointed to by lpInBuffer.
Pointer to a caller-allocated buffer that receives the reply (if any) from the minifilter.
Size, in bytes, of the buffer pointed to by lpOutBuffer. This value is ignored if lpOutBuffer is NULL.
Pointer to a caller-allocated variable that receives the number of bytes returned in the buffer that lpOutBuffer points to if the call to FilterSendMessage succeeds. This parameter is required and cannot be NULL.
FilterSendMessage returns S_OK if successful. Otherwise, it returns an error value.
The FilterSendMessage function sends a message to a minifilter. The message is passed to the minifilter's message notification callback routine, which processes the message. (The minifilter registers its message callback notification routine by passing it as the MessageNotifyCallback parameter to FltCreateCommunicationPort.)
FilterSendMessage is synchronous. The caller is put into a wait state until the message is delivered and the minifilter's reply (if any) is received.
If the caller expects a reply, it must pass a non-NULL buffer for the lpOutBuffer parameter and a positive value for the dwOutBufferSize parameter.
To get a message from a minifilter, call FilterGetMessage.
To reply to a message from a minifilter, call FilterReplyMessage.
A minifilter sends a message to a user-mode application by calling FltSendMessage.
|Header||fltuser.h (include Fltuser.h)|