Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > ZwCreateFile for Asynchronous handle

Reply
Thread Tools Display Modes

ZwCreateFile for Asynchronous handle

 
 
cgguy
Guest
Posts: n/a

 
      02-11-2011
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: WdfUsbTargetDeviceCreate creates NULL Control Pipe Handle Tim Roberts Windows Vista Drivers 0 07-21-2010 05:48 AM
Thunking a 32-bit HANDLE to a 64-bit HANDLE John Bond Windows Vista Drivers 3 01-11-2010 05:50 PM
Convert user mode handle to event structure? Richard Lewis Haggard Windows Vista Drivers 3 12-06-2009 05:17 AM
How detect if handle returned by PsGetCurrentProcessID is valid ?existing always process ? Mathieu Windows Vista Drivers 2 11-25-2009 06:36 PM
notification handle polarx Windows Server 1 11-11-2009 06:25 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59