Look for IAsyncResult and friends.
Thomas F. Divine
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Monday, December 9, 2013 12:55 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Overlapped I/O and C#
Jan,
Googling this give you the msdn page for the Overlapped class, and a
whole bunch of samples from various places (all of which have comments that
they DON’T WORK). I can find nothing in the Microsoft documentation. Now I
could probably roll my own interface that hid the mess, but my client really
wants to use my driver with C# and pretty much standard classes.
Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Monday, December 09, 2013 12:49 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Overlapped I/O and C#
C# can call any native C API via the PInvoke facility, so if you really want
you can do overlapped I/O the same way you would do it from C.
I’d have to go look, but there almost certainly are already C# classes to do
async I/O, which would be easier than using the PInvoke facility. I know
there are some C# samples that do async I/O on codeproject.com.
A quick Google search finds the C# class System.Threading.Overlapped, which
is a managed wrapper for the overlapped structure used from C. There must
also be classes that use System.Threading.Overlapped.
Jan
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Monday, December 9, 2013 9:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Overlapped I/O and C#
If there are any C# folks out there can you tell me how do true overlapped
I/O to a driver with C#? I have a driver for a client where it is best if
they have a pool of N requests and keep firing them ASAP. In regular C I
would be using a either a pool of overlapped structures or even an I/O
completion port model. While I have done a little C# asynchronous I/O is
not somewhere I have wandered and with wonderful comments such as “Don’t
initiate a second write before the first completes” that appears in the
BeginWrite call which is implied to be async, I am wondering if this is
doable?
Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer