ZwWriteFile.. Failed!!

Hi

I am writing a driver in which I have called
ZwWriteFile with following parameters…

file_info is a node of link list having file_handle as
a handle to opened file

system_buffer contains “”
bytes_to_rw 0x200
actual_offset is within filesize

status = ZwWriteFile(
file_info->file_handle,
NULL,
NULL,
NULL,
&irp->IoStatus,
system_buffer,
bytes_to_rw,
&actual_offset,
NULL
);

error code -1073741822

#define STATUS_NOT_IMPLEMENTED
((NTSTATUS)0xC0000002L)

// MessageId: STATUS_NOT_IMPLEMENTED
// MessageText:
// {Not Implemented}
// The requested operation is not implemented.
//

I am not able to trace out…


Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

How did you open file_handle?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ani Windows
Sent: Friday, February 17, 2006 1:41 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] ZwWriteFile… Failed!!

Hi

I am writing a driver in which I have called
ZwWriteFile with following parameters…

file_info is a node of link list having file_handle as
a handle to opened file

system_buffer contains “”
bytes_to_rw 0x200
actual_offset is within filesize

status = ZwWriteFile(
file_info->file_handle,
NULL,
NULL,
NULL,
&irp->IoStatus,
system_buffer,
bytes_to_rw,
&actual_offset,
NULL
);

error code -1073741822

#define STATUS_NOT_IMPLEMENTED
((NTSTATUS)0xC0000002L)

// MessageId: STATUS_NOT_IMPLEMENTED
// MessageText:
// {Not Implemented}
// The requested operation is not implemented.
//

I am not able to trace out…


Yahoo! India Matrimony: Find your partner now. Go to
http://yahoo.shaadi.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi Anil,

This error code is also returned when there is a incorrect length parameter.
You might
be reading the incorrect offset. Note that the length data type is a large
integer.
Can you print out the values of variables: actual offset, bytes to rw length
?

Good luck
Ramesh
http://www.winfsd.com

On 2/17/06, Ani Windows wrote:
>
> Hi
>
> I am writing a driver in which I have called
> ZwWriteFile with following parameters…
>
> file_info is a node of link list having file_handle as
> a handle to opened file
>
> system_buffer contains “”
> bytes_to_rw 0x200
> actual_offset is within filesize
>
> status = ZwWriteFile(
> file_info->file_handle,
> NULL,
> NULL,
> NULL,
> &irp->IoStatus,
> system_buffer,
> bytes_to_rw,
> &actual_offset,
> NULL
> );
>
>
> error code -1073741822
>
> #define STATUS_NOT_IMPLEMENTED
> ((NTSTATUS)0xC0000002L)
>
> // MessageId: STATUS_NOT_IMPLEMENTED
> // MessageText:
> // {Not Implemented}
> // The requested operation is not implemented.
> //
>
>
> I am not able to trace out…
>
>
>
> __________________________________________________________
> Yahoo! India Matrimony: Find your partner now. Go to
> http://yahoo.shaadi.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


http://www.winfsd.com