Two FltSendMessage on one FilterGetMessage

Hey guys,

this subject is different to the other started today relating to the communication mechanism of the filter manager.

When a mini filter driver is calling FltSendMessage() two times on the same port, with a indefinite timeout and no FilterGetMessage() function waiting, what happens if some times later, FilterGetMesasge is called? Is there something like a queuing mechanism implemented in the Filter Manager? Or which function will succeed?

I don’t think there are any ordering guarantees. I imagine there must be some queuing but I’m not sure whether it’s explicit (implemented in FltMgr) or using some kernel primitive (a semaphore looks appropriate for this use case) and then just using one of the wait functions in windows. However, this is an implementation detail and since it’s not documented it might change anyway…


The other problem around is:
If a few Threads wait with FilterGetMessage on a message. They call get notified by a single call to FltSendMessage. This seems more than a bug than expected behavior.

I would’ve assumed that there are two queues. One - in kernel - waiting with the message buffer pointer from kernel mode for a element in the second queue - in user mode - which inserts user mode message buffer adresses and events for signalization.