Click here to Skip to main content
14,693,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

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.


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.


What I have tried:

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 ).
Posted
Updated 6-Jul-16 21:42pm
Comments
[no name] 7-Jul-16 0:08am
   
Did you take any notice of the answer you were given here: https://social.msdn.microsoft.com/Forums/en-US/87eb2069-6ec0-44f8-a389-8fc887db1512/deviceiocontrol-returns-error-24?forum=wdk
You cannot get a better authority on Windows device drivers than Doron Holan.

1 solution

   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900