Mapping physical memory into Application space



Hi,

I want to return to the user application a mapping to a physical buffer.

Suppose the virtual address in the address space of device.exe is paddr
does

ioctl(instance, pin, size, pout, size, unused)
{
pnewaddr = MapPtrProcess(paddr, GetCallerProcess())
pout = pnewaddr //should this be *pout = pnewaddr
}

return the new mapping in pout ?


.