![]() Given this structure, it might seem obvious that the caller of FilterReplyMessage would set dwReplyBufferSize to sizeof(REPLY_STRUCT), and set the ReplyLength parameter of FltSendMessage to the same value. MY_STRUCT Data // The structure to be sent to the minifilter The user-mode component might declare the following structure to do so: typedef struct _REPLY_STRUCT As an example, assume data must be sent via FilterReplyMessage to a minifilter. When the application calls FilterReplyMessage, the minifilter driver receives the reply, and FltSendMessage returns STATUS_SUCCESS.ĭue to (system-specific) structure padding requirements, accuracy is required when you set the size of buffers that are associated with FltSendMessage and FilterReplyMessage. If Timeout is zero when the minifilter driver is waiting for the reply, the minifilter driver is put into a wait state indefinitely. (Note: STATUS_TIMEOUT is a success code.) If Timeout is nonzero and the minifilter driver does not receive a reply before the Timeout interval expires, FltSendMessage returns STATUS_TIMEOUT. If Timeout is nonzero and the application calls FilterReplyMessage before the Timeout interval expires, the minifilter driver receives the reply, and FltSendMessage returns STATUS_SUCCESS. Otherwise, if ReplyBuffer is not NULL, the minifilter driver is put into a wait state as follows: When the application calls FilterGetMessage, the message is delivered.Īfter the message is delivered, if ReplyBuffer is NULL, FltSendMessage returns STATUS_SUCCESS. If Timeout is zero, the minifilter driver is put into a wait state indefinitely. If Timeout is nonzero and the application doesn't call FilterGetMessage before the Timeout interval expires, the message is not delivered, and FltSendMessage returns STATUS_TIMEOUT. If Timeout is nonzero and the application calls FilterGetMessage before the Timeout interval expires, the message is delivered. Otherwise, if an application has not called to get a message, the minifilter driver is put into a wait state as follows: This is typically the case when the application calls FilterGetMessage from inside a message loop. If the application calls FilterGetMessage to get the message before the minifilter driver calls FltSendMessage to send it, the message is delivered immediately. This is a success code.įltSendMessage sends a message to a user-mode application on behalf of a minifilter driver or a minifilter driver instance. ![]() The Timeout interval expired before the message could be delivered or before a reply was received. The wait was interrupted because the thread has been terminated by an application or user. The communication port has been disconnected. Return valueįltSendMessage returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following: Return codeįltSendMessage encountered a pool allocation failure. Set to NULL if the caller can be put into a wait state indefinitely. A negative value specifies an interval relative to the current time. This parameter is optional, but must be non- NULL when ReplyBuffer is not NULL.Ī pointer to a timeout value that specifies the total absolute or relative length of time, in units of 100 nanoseconds, for which the caller can be put into a wait state until the message is received by the user-mode application and until it receives a reply (if one is expected).Ī positive value specifies an absolute time, relative to January 1, 1601. Size, in bytes, of the buffer that ReplyBuffer points to. This parameter is optional and can be NULL. Pointer to a caller-allocated buffer that receives the reply, if any, from the application. Size, in bytes, of the buffer that SenderBuffer points to. This parameter is required and cannot be NULL. Pointer to a caller-allocated buffer containing the message to be sent to the user-mode application. For more information about the client port pointer, see the description of the ConnectNotif圜allback parameter in the reference entry for FltCreateCommunicationPort. Pointer to a variable that contains the opaque client port pointer for the connection port between the user-mode application and the kernel-mode minifilter driver. FltSendMessage sends a message to a waiting user-mode application on behalf of a minifilter driver or a minifilter driver instance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |