[PATCH] hid: Handle overlapped file handles.
Dmitry Timoshkov
dmitry at baikal.ru
Tue Mar 12 20:17:46 CDT 2019
Zebediah Figura <z.figura12 at gmail.com> wrote:
> +static BOOL sync_ioctl(HANDLE file, DWORD code, void *in_buf, DWORD in_len, void *out_buf, DWORD out_len, DWORD *ret_len)
> +{
> + OVERLAPPED ovl = {0};
> + BOOL ret;
> +
> + ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
> + ret = DeviceIoControl(file, code, in_buf, in_len, out_buf, out_len, ret_len, &ovl);
> + if (!ret && GetLastError() == ERROR_IO_PENDING)
> + ret = GetOverlappedResult(file, &ovl, ret_len, TRUE);
> + return ret;
> +}
> +
Are you leaking the ovl.hEvent handle?
--
Dmitry.
More information about the wine-devel
mailing list