Hi,
I'm trying to get a asynchronous handle to a file in kernel mode.
When the calling function, EvtDevicePrepareHardware (running in
PASSIVE_LEVEL), that opens the handle returns, it causes a bugcheck in
ntfs. I can open a synchronous handle just fine (by adding
FILE_SYNCHRONOUS_IO_NONALERT). Here's the call.
status =
ZwCreateFile(&FileHandle,
GENERIC_READ | GENERIC_WRITE,
&ObjectAttributes,
&IoStatus,
NULL,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ |
FILE_SHARE_DELETE | FILE_SHARE_WRITE,
FILE_OPEN,
FILE_NON_DIRECTORY_FILE |
FILE_RANDOM_ACCESS
| FILE_NO_INTERMEDIATE_BUFFERING,
NULL,
0);
Regards,
CG
|