DeviceIoControl failing with error code 24(ERROR_BAD_LENGTH).

Hi Experts,

I have an application which sends private IOCTL to WFP filter driver.This application is working fine on windows 7 but same application and driver trying to run on window s 10.Observing the failure as mentioned above.

Please help me in giving some pointers in debugging this issue?

On May 27, 2018, at 10:47 AM, xxxxx@gmail.com wrote:
>
> I have an application which sends private IOCTL to WFP filter driver.This application is working fine on windows 7 but same application and driver trying to run on window s 10.Observing the failure as mentioned above.
>
> Please help me in giving some pointers in debugging this issue?

Well, it’s your driver that is returning the error, right? Surely you know where your ioctl handlers are returning length errors.

Do you include pointers in your data? One of the most common causes of this error is when the ioctl buffer includes a pointer, because a 64-bit driver will assume the pointer is 8 bytes long, but a 32-bit application will only allocate 4 bytes.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.