Hi,
I would like to read a file in the Netware drive using ZwReadFile with the
specified offset, but it always returned me an error 0xC000000D (Invalid
Parameter). Below is my ZwCreateFile and ZwReadFile parameters:
LARGE_INTEGER Offset;
ULONG BufferSize = 256;
status = ZwCreateFile(&FileHandle, GENERIC_READ | SYNCHRONIZE, &oa,
&IoStatusBlock,
NULL, FILE_ATTRIBUTE_ARCHIVE,
FILE_SHARE_READ, FILE_OPEN,
FILE_NON_DIRECTORY_FILE |
FILE_SYNCHRONOUS_IO_NOALERT,
NULL, 0);
Offset.LowPart = 0;
status = ZwReadFile(FileHandle, NULL, NULL, NULL, &IoStatusBlock,
pBuffer, BufferSize, &Offset, NULL);
======================================================================
If I don’t specify the Offset in the ZwReadFile, it does a sequential
read and works fine. Thanks for any information to this problem.
Regards,
Sin-Lam
I don’t see the HighPart being set in the offset.
----- Original Message -----
From: “Tan Sin Lam”
To: “File Systems Developers”
Sent: Thursday, April 04, 2002 7:00 AM
Subject: [ntfsd] Netware read file with offset!
> Hi,
> I would like to read a file in the Netware drive using ZwReadFile with
the
> specified offset, but it always returned me an error 0xC000000D (Invalid
> Parameter). Below is my ZwCreateFile and ZwReadFile parameters:
>
> LARGE_INTEGER Offset;
> ULONG BufferSize = 256;
>
> status = ZwCreateFile(&FileHandle, GENERIC_READ | SYNCHRONIZE, &oa,
> &IoStatusBlock,
> NULL, FILE_ATTRIBUTE_ARCHIVE,
> FILE_SHARE_READ, FILE_OPEN,
> FILE_NON_DIRECTORY_FILE |
> FILE_SYNCHRONOUS_IO_NOALERT,
> NULL, 0);
>
> Offset.LowPart = 0;
> status = ZwReadFile(FileHandle, NULL, NULL, NULL, &IoStatusBlock,
> pBuffer, BufferSize, &Offset, NULL);
>
> ======================================================================
> If I don’t specify the Offset in the ZwReadFile, it does a sequential
> read and works fine. Thanks for any information to this problem.
>
> Regards,
> Sin-Lam
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@yoshimuni.com
> To unsubscribe send a blank email to %%email.unsub%%