i’am in driver map virtual disk file system into user-process.
In function majorcode IRP_MJ_READ the value IOSTACK_LOCATION::Parameters.Read.ByteOffset is always 0.
yet i’am set irp->IoStatus.Information with return STATUS_SUCCESS
i’am build a test project under :
HANDLE f=CreateFile(“n:\test.nf”,GENERIC_READ,0,NULL,OPEN_EXISTING,0,NULL);
if (f!=INVALID_HANDLE_VALUE)
{
char buf[128];
DWORD dt;
ReadFile(f,buf,4,&dt,NULL); IOSTACK_LOCATION::Parameters.Read.ByteOffset should be 0
ReadFile(f,buf,4,&dt,NULL); IOSTACK_LOCATION::Parameters.Read.ByteOffset should be equal 4
CloseHandle(f);
}
return 0;
Readfile read always at byteoffset = 0
Why ?