IM driver: How check if ZwWriteFile has completed?
From: Hannes (hannes_at_nospam.nospam)
Date: 05/14/04
- Next message: Hannes: "RE: Binding WAN interface with Passthru IM driver (Pocket PC 2003)"
- Previous message: prokash: "Re: C++ vs C"
- Next in thread: Alexei Jelvis: "Re: IM driver: How check if ZwWriteFile has completed?"
- Reply: Alexei Jelvis: "Re: IM driver: How check if ZwWriteFile has completed?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 14 May 2004 15:16:03 -0700
I am writing large amounts of data to disk from an intermediate driver, using ZwWriteFile. In some cases, there is too much data for the disk to keep up, so I need to detect this and throw some data away (which is fine, by the way).
My question is: How do I see if ZwWriteFile is keeping up?
My thread must keep working on other stuff while writing to disk, so just sleeping until it's done is not acceptable.
ZwWriteFile sometimes returns STATUS_PENDING, does this mean that the data will still be written to disk, but it is temporarily placed in a queue somewhere? This return code is not documented in DDK for ZwWriteFile:
"ZwWriteFile either returns STATUS_SUCCESS or an appropriate error status."
STATUS_PENDING is not an error, right?
After getting STATUS_PENDING, how do I know when ZwWriteFile has "caught up"?
I am trying to set SYNCHRONIZE on the ZwCreateFile call, then passing an event into the ZwWriteFile call. Is this allowed?
ZwWriteFile DDK doc says, for the 'Event' parameter: "Device and intermediate drivers should set this parameter to NULL."
If I drop an event in there anyway, it appears to *always* be set by ZwWriteFile, regardless of any backlog of data to be written. For instance, I make sure the event is set, then send my data, and still I get STATUS_PENDING...so the event shouldn't really have been set...
Any ideas, anyone? How do I see if ZwWriteFile is keeping up?
Thanks,
Hannes.
- Next message: Hannes: "RE: Binding WAN interface with Passthru IM driver (Pocket PC 2003)"
- Previous message: prokash: "Re: C++ vs C"
- Next in thread: Alexei Jelvis: "Re: IM driver: How check if ZwWriteFile has completed?"
- Reply: Alexei Jelvis: "Re: IM driver: How check if ZwWriteFile has completed?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|