I am trying to run a custom made kernel mode driver on a windows 7(64 bit) machine. The driver service was started but the IO control request returns error.
DeviceIoControl(hDevice, OPEN_PHYSICAL_MEMORY, NULL, 0, ph, sizeof(HANDLE), cb, NULL)
and #define OPEN_PHYSICAL_MEMORY __CTL_CODE(0x8124, 0x801, 0, FILE_READ_DATA ).
The getlasterror() returns error code 24.
ERROR_BAD_LENGTH
24 (0x18)
The program issued a command but the command length is incorrect.
The function runs perfectly in 32 bit OS. Please help me to solve this error.
Thank you.