I am trying to connect and reply file minifilter driver. For connection I am using this
hr = FilterConnectCommunicationPort(MyPortName,0,NULL, 0,NULL, &port);
completion = CreateIoCompletionPort(port,NULL,0,1);
FilterGetMessage to recieve message I am using this:
hr = FilterReplyMessage(context.Port(PFILTER_REPLY_HEADER)&replyMessage.ReplyHeader,My_REPLY_MESSAGE_SIZE);
These functions are working fine but some time FilterReplyMessage is taking time and giving error of Error = 0x801F0020
As this is a random issue so we are not able to find out what is happening.
Found the solution. Set time out as last parameter in FltSendMessage in driver code. It will make it wait for only till time out period not infinitely until client send the response.
User contributions licensed under CC BY-SA 3.0