Re: [ntdev] Shared memory between kernel and user mode

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

Sequential? What does sequence have to do with it?

Sent from Surface Pro

From: Maxim S. Shatskih
Sent: ‎Tuesday‎, ‎March‎ ‎31‎, ‎2015 ‎1‎:‎04‎ ‎PM
To: Windows System Software Devs Interest List

But seriously, the better design is for you app to use overlapped IO and pend several buffers.

If memory access is only sequential - then yes.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com


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

The OP is attempting to use shared memory as a communications channel not to hold some data structure. In his case each IRP is a message

Sent from Surface Pro

From: Maxim S. Shatskih
Sent: ‎Wednesday‎, ‎April‎ ‎01‎, ‎2015 ‎12‎:‎07‎ ‎AM
To: Windows System Software Devs Interest List

It is hard to do random access over a set of pending buffers

“Marion Bond” wrote in message news:xxxxx@ntdev…

Sequential? What does sequence have to do with it?

Sent from Surface Pro

From: Maxim S. Shatskih
Sent: ‎Tuesday‎, ‎March‎ ‎31‎, ‎2015 ‎1‎:‎04‎ ‎PM
To: Windows System Software Devs Interest List

>But seriously, the better design is for you app to use overlapped IO and pend several buffers.

If memory access is only sequential - then yes.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com


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