And constantly calling SetEvent seems better?
If you are intent on doing this, follow Max’s suggestion and allocate in UM and send the memory to KM via an IOCTL that your driver will pend 'forever’
But seriously, the better design is for you app to use overlapped IO and pend several buffers. Your driver holds these in a queue and when it needs to 'send’ simply complete one. By the time you do the work necessary to make a shared memory model work, you will have effectively re-implemented DeviceIOControl, so why not use the code Microsoft has already written and debugged
Sent from Surface Pro
From: xxxxx@gmail.com
Sent: Monday, March 30, 2015 10:49 PM
To: Windows System Software Devs Interest List
Do you want to say there is now easy way for win driver to have shared memory established with user mode app running under user account?
SEH handlers I have just to make sure there will be no blow ups that will freeze worker thread on the other side of shared memory because of lock use.
I understand the IOCTL is preferred way, but I need 2way channel and forcing user app constantly call deviceio in order to return something via IOCTL does not look good to me.
In my test case I was able to open section under Admin account in read only mode. I am surprised that I got that access denied message when requested RW. I am still thinking that I just missed some simple flag when created named section inside of the driver.
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