I am also facing the same problem in my disk filter driver…
Since the driver traping each and every request and doing encryption or decryption
on the data… Some time the driver is not getting access to the data and it
gives me this error… How can we solve this problem ???
-----Original Message-----
From: Paul Delivett [SMTP:xxxxx@Carraig.co.uk]
Sent: Thursday, September 07, 2000 5:59 PM
To: File Systems Developers
Subject: [ntfsd] Encrypt Write
Hi again
Please can you tell me if my theory for performing encrypted writes is
correct as I am seeing some IRQL_NOT_LESS_OR_EQUAL errors.
In The IRP_MJ_WRITE
/* Get the Virtual Address of the user buffer */
LPBYTE UserBuffer = (LPBYTE)MmGetSystemAddressForMdl(Irp->MdlAddress);
/* Get the buffer Size */
DWORD BufferSize = Irp->MdlAddress->ByteCount;
/* Allocate my buffer */
LPBYTE MyBuf = (LPBYTE)ExAllocatePool(PagedPool, BufferSize);
/* Copy the data into the buffer */
RtlCopyMemory(MyBuf, UserBuffer, BufferSize);
/* Encrypt Data */
EncipherData(MyBuf, BufferSize);
/* Create a new MDL attached to this IRP */
Irp->MdlAddress = NULL;
IoAllocateMdl(MyBuf, BufferSize, FALSE, FALSE, Irp);
/* Build the MDL to describe the memory pages */
MmProbeAndLockPages(Irp->MdlAddress);
/* Setup the completion Routine so can delete Replacement MDL (MUST DO
ALWAYS) */
IoSetCompletionRoutine(Irp, SFilterWriteCompletion, EncWrite, TRUE, TRUE,
TRUE);
/* Now call the appropriate file system driver with the request. */
Status = IoCallDriver(PtrDeviceExtension->TargetDeviceObject, Irp);
return (Status);
TTFN
Paul Delivett
You are currently subscribed to ntfsd as: ashishm@i3-micro.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)