Помните, как я ругался на функцию GetRawInputDeviceList?


?????????, ??? ??? ???? ?????? ?
????????????. ?? ????????? ? ??????????, ???
??????????
.

????:

puiNumDevices

[in, out] Pointer to a variable. If pRawInputDeviceList is NULL, it specifies
the number of devices attached to the system. Otherwise, it contains the
size, in bytes
, of the preallocated buffer pointed to by
pRawInputDeviceList. However, if *puiNumDevices is smaller than needed to
contain RAWINPUTDEVICELIST structures, the required buffer size is
returned here.

?????:

puiNumDevices

[in, out] Pointer to a variable. If pRawInputDeviceList is NULL, the function
populates this variable with the number of devices attached to the system;
otherwise, this variable specifies the number of RAWINPUTDEVICELIST
structures
that can be contained in the buffer to which
pRawInputDeviceList points. If this value is less than the number of devices
attached to the system, the function returns the actual number of
devices
in this variable and fails with
ERROR_INSUFFICIENT_BUFFER.

????? ???????, ??? ???, ?????????? ??? ??????? ? ?????????? ? ???????????? ?
????????? ??????? ????????????, ??? ????? ????????. ???? ? ??? ??? ?????? ??????
???????, ????? ?????????? ??????????? ?????? ??????, ??? ???????? ??? ? ????
????? ???????? RAWINPUTDEVICELIST. ? ?? ????? ??????? ??????, ???? ? ??????
?????? ? ?????? (??? ???? ????????? ????????????), ??????? ???????? ? ?????
????? ??????? ???????? RAWINPUTDEVICELIST, ??????? ???? ?????????? ??? ??????
??????. ???????????, ? ??????, ???? ?????????? ????????? ? ??????? ?? ??????????
????? ????? ????????, ??? ????? ????????????.

P.S. ? Word ??????????? ?? «??????? ?? ???????»
????????? ??????????: «?????? ? ??????????. ???????? ????? ? ???-??. ? ????
????????????? ????? ????? ????????????? ???? ?????? ?????? «?????? ???? ????».
??, ????????????? ??! ??…

Cross-posted from blog.not-a-kernel-guy.com.

Skip to main content