How can I open (execute) a specific file(txt, exe ... ) using the mini filter driver IRP_MJ_CREATE?

Hi.

I really need help.

First of all, I hope you understand that the sentence structure can be strange as I ask questions using a translator machine.

I want to make IRP_MJ_CREATE work only when files are double-clicked, whether preprocessing or postprocessing.

However, IRP_MJ_CREATE does so much.

I want to prevent the file from executing when I double-click a file, except for directories.

In other words, I want to deny reading files.

How can I do this in IRP_MJ_CREATE, whether pre-processing or post-processing?

I think that whether preprocessing or postprocessing
PFLT_CALLBACK_DATA->IO_STATUS_BLOCK.status = STATUS_ACCESS_DENIED;
PFLT_CALLBACK_DATA->IO_STATUS_BLOCK.Information = 0;

I think it should be done this way, but I don’t know if it is correct.

If it says yes, I don’t know what conditions to call.

I hope my words make sense.

I would be grateful if you could tell me anything that could help.

Thank you for reading the long article.