Click here to Skip to main content
15,180,555 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

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.


    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 ).
Updated 6-Jul-16 21:42pm
[no name] 7-Jul-16 0:08am
Did you take any notice of the answer you were given here:
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