hello,
FltCbdqRemoveIo removes entry from cbdq. when it is called it calls user defined function pointed by CbdqRemoveIo field of FltCbdqInitialise function. But FltCbdqRemoveIo has return type as PFLT_CALLBACK_DATA while user defined function
CbdqRemoveIo has void as return type. How this mapping takes place.
thanking in advance…
Hi Varun,
FltCbdqRemoveIo removes entry from cbdq. when it is called it calls
user defined function pointed by CbdqRemoveIo field of FltCbdqInitialise function.
But FltCbdqRemoveIo has return type as PFLT_CALLBACK_DATA while user defined function
CbdqRemoveIo has void as return type. How this mapping takes place.
Ok. Let’s begin from the point where you actually inserted the callback data in the cbdq.
What did you do? You linked the callback data into the cbdq. Basically, you added it to the queue.
Next, what should you do to remove it?
De-queue it. Of course, while de-queuing you have two options:
- FltCbdqRemoveIo
- FltCbdqRemoveNextIo
If I remember correctly, FltCbdqRemoveNextIo makes use of the CbdqPeekNextIo routine that you pass in the call to FltCbdqInitialize.
Whereas, FltCbdqRemoveIo does not.
The objective is to remove the item from the queue. How do you do it? By unlinking the callback data from the queue.
That is done on your CbdqRemoveIo routine. The filter manager passes the callback data that you have to unlink from your Cbdq.
You don’t have to return anything. The filter manager has already taken a decision to return a callback data (which was passed to you to unlink from the Cbdq).
Once the control is returned from the CbdqRemoveIo routine, the callback data is returned to the caller of FltCbdqRemoveIo.
Regards,
Ayush Gupta