I have another problem when i am trying to map the kernel memory to user mode the deviceioctl is returing the outputbuffer to "0" value.I have no clue what is going wrong.the driver is returning the MmMapLockedPagesSpecifyCache address correctly when i used the debug print
In the driver source
#define FIFO_BUFFER_MAX 104857
ExAllocatePoolWithTag(NonPagedPool,FIFO_BUFFER_MAX,'QPRI')
IoAllocateMdl(pBuffer,FIFO_BUFFER_MAX,FALSE,FALSE,NULL)
MmMapLockedPagesSpecifyCache(pMdl
UserMode
MmCached
NULL
FALSE
NormalPagePriority)
Application.c
The IOCTL call i used is METHOD BUFFERED and the stub is like this
bRet = DeviceIoControl(hDevice
HFP_TEST_IOCTL
NULL
0
pBuffer
sizeof(ULONG)
&dwRet
NULL)
the value of pBuffer is 0
please help me out is there anything wrong in the call i made to the driver
sa