Create path IoCallDriver

I do querying fileobject by copying current irp to next and making
IoCallDriver. Then I complete the request. Is there anything else I have to
take care before completing request.

case IRP_MJ_CREATE:


KeInitializeEvent(&event, NotificationEvent, FALSE);
IoCopyCurrentIrpStackLocationToNext(Irp);
IoSetCompletionRoutine(Irp, CreateComplete, &event, TRUE, TRUE, TRUE);
if ((RC = IoCallDriver(pPwrDevExt->FileSystem, Irp)) == STATUS_PENDING)
{
KeWaitForSingleObject(&event, UserRequest, KernelMode, TRUE, NULL);
RC = Irp->IoStatus.Status;
ReturnedInformation = Irp->IoStatus.Information;


IoCompleteRequest(Irp, IO_NO_INCREMENT);
}

return RC;

NTSTATUS CreateComplete(
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
PVOID Context)
{
KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE);
return (STATUS_MORE_PROCESSING_REQUIRED);
}

After opening and closing of file using explorer, I could not rename the
folder. It gives error saying that “… It is accessed”

Thanks
Ramaraj


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com