CreateFile Multithreading

can I have two threads in the user mode app that connects to the same driver
one calling CreateFile with an overlapped structure, and the other without
an overlapped structure…

ie. normal operations I want it to block at DeviceIoControl.
for the interrupt I want an overlapped structure, that either signals or
does GetOverlappedResult.

Will this scheme work? Are there any Synchronization issues, apart from
writing to the device registers? Are there restrictions on the
SynchronizationScope specified when the device is created.

The driver doesn’t see if the handle is OVERLAPPED or not, it just sees
to IRP_MJ_CREATEs. You have the same synch issues if you had one
OVERLAPPED handle which was issue async i/o concurrently on 2 different
threads as you would with 2 different handles.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ashok Bruno
Sent: Tuesday, July 18, 2006 10:04 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] CreateFile Multithreading

can I have two threads in the user mode app that connects to the same
driver one calling CreateFile with an overlapped structure, and the
other without an overlapped structure…

ie. normal operations I want it to block at DeviceIoControl.
for the interrupt I want an overlapped structure, that either signals or
does GetOverlappedResult.

Will this scheme work? Are there any Synchronization issues, apart from
writing to the device registers? Are there restrictions on the
SynchronizationScope specified when the device is created.


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer