How to make a shared resource (a memory buffer), which can be accessed only by a ring3 app or ring 0 code at a time? I need something like ring3 - ring 0 mutex and ring 3 - ring 0 pipe.
You could use/hook PageAllocate to alloc a buffer in the shared address space.
Yes, I can do that. But besides I want to forbid access to that memory block for a ring 3 app (to block ring 3 app), while vxd uses it and vice versa: to forbid a vxd to use the block, while ring 3 app uses it.
Well, I forgot to say that you could setup a hook of PageModifyPermission so that *only* your specified app may access your allocated region...