Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Call with IOCTL_KEYBOARD_QUERY_INDICATORS always result ledflags with zero

MakMak Member Posts: 50

Why does IOCTL_KEYBOARD_QUERY_INDICATORS always result "0" at leds.LedFlags?
The function returns SUCCESS and the leds.UnitId is correctly set after the call.

I do the following:
KEYBOARD_INDICATOR_PARAMETERS leds = { 0 };
WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(
&outputDescriptor,
(PVOID)&leds,
sizeof(KEYBOARD_INDICATOR_PARAMETERS)
);
status = WdfIoTargetSendIoctlSynchronously(
WdfDeviceGetIoTarget(destdevice),
NULL,
IOCTL_KEYBOARD_QUERY_INDICATORS,
NULL,
&outputDescriptor,
NULL,
NULL
);

Comments

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,435
    The unitid is the least relevant value in that structure. It is not used anywhere in the input subsystem. According to the docs you need to set the input buffer length to the size of the struct as well. I don’t remember if the keyboard port driver or kbdclass maintained the state for the led flags, an older wdk which contains the pnpi8042 and kbdclass samples will quickly tell you where the state is kept.
    d
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA