MmMapLockedPagesSpecifyCache on amd64/ia64??

On there is an article that explains SharedMemory between kernel and userspace:

The solution of sharing kernel memory I use now for almost 3 years. It’s working great. But now I have been asked to port my driver for use on 64bit windows. What does the function MmMapLockedPagesSpecifyCache return? A 64bit user address pointer? And what if on the 64bit windows a 32 bit application is connected to the driver?

You always get back a UVA for the data buffer that’s mapped into the current process address space… That means that you’ll always get back an address that’s usable by the user application.

In other words (to be totally clear) you get back 32 significant bits for a 32-bit application and 64 significant bits for a 64-bit application.

If your driver cares for some reason, it can distinguish between whether the calling process is 32 or 64 bit aware by calling IoIs32bitProcess (not the b is lower case… which bites me every time).


That is very clear and exactly where I hoped for :slight_smile: