I'm making a driver and want to make some usermode virtual memory pages non-writable (something that would make VirtualProtect fail or similar).
There's a function in the kernel (MmSecureVirtualMemoryAgainstWrites) but it's not exported. I'm not even sure that it does what I think it does because I haven't tried calling it yet.
Does anyone have suggestions on how to acomplish this?
Obviously, I only need this protection to work against other usermode code.