IRP_MJ_CREATE

Hello,

I want IRP_MJ_CREATE to do nothing. To return SUCCESS but still not do anything. Just complete it.
How can I do this, if it is posible.

Thank you,

Ciubotaru Ovidiu Andrei wrote:

Hello,

I want IRP_MJ_CREATE to do nothing. To return SUCCESS but still not do anything. Just complete it.
How can I do this, if it is posible.

Is this a trick question? And if not, what’s the point?

DriverEntry(…)
{

DriverObject->MajorFunction[IRP_MJ_CREATE] = Xxxx_Create;

}

NTSTATUS
Xxxx_Create( PDRIVER_OBJECT fdo, PIRP Irp )
{
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
IoCompleteIrp( Irp, IO_NO_INCREMENT );
return STATUS_SUCCESS;
}