IRP_MJ_CREATE and IRP_MJ_CLEANUP question

I have a project that needs to save the file object in the queue when the
file created success and remove the file object when the file closed. What I
do is to insert the file object when the file created success and remove it
from the IRP_MJ_CLEANUP. I found the problem. If I just run one process and
100 loop for create file and close file, it is fine. But if it run 100
processes and 100 loops, when I check the queue there will be many file
objects do ot remove from the queue. I dumped the message after create
success and at the cleanup function. I found IRP_MJ_CREATE and
IRP_MJ_CLEANUP is not one to one correspondent. Does anyone know what the
file close function translate to IRP function? Thanks.

IRP_MJ_CREATE = opening brace
IRP_MJ_CLOSE = closing brace.

Please read the MSDN documentation first. Please read the DDK/IFS kit
documentation next. Please read the past archives after that.
If you still dont have an answer then ask here.

Your question was probably answered several times in all of the
mentioned knowledge sources.
I am amazed at the path you took to come to your eventual conclusion.
It would have been simpler to read up the documentation.

Thanks

fc wrote:

I have a project that needs to save the file object in the queue when the
file created success and remove the file object when the file closed. What I
do is to insert the file object when the file created success and remove it
from the IRP_MJ_CLEANUP. I found the problem. If I just run one process and
100 loop for create file and close file, it is fine. But if it run 100
processes and 100 loops, when I check the queue there will be many file
objects do ot remove from the queue. I dumped the message after create
success and at the cleanup function. I found IRP_MJ_CREATE and
IRP_MJ_CLEANUP is not one to one correspondent. Does anyone know what the
file close function translate to IRP function? Thanks.