Skip to content

Commit

Permalink
Fixes [ERROR] The parameter is incorrect: TAP_WIN_IOCTL_SET_MEDIA_STA…
Browse files Browse the repository at this point in the history
…TUS requires not null parameters for lpOutBuffer nOutBufferSize.
  • Loading branch information
bchavez committed Oct 16, 2018
1 parent 1f414b7 commit d5a081a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/asiotap/src/windows/windows_tap_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ namespace asiotap
ULONG status = connected ? TRUE : FALSE;
DWORD len;

if (!::DeviceIoControl(descriptor().native_handle(), TAP_WIN_IOCTL_SET_MEDIA_STATUS, &status, sizeof(status), NULL, 0, &len, NULL))
if (!::DeviceIoControl(descriptor().native_handle(), TAP_WIN_IOCTL_SET_MEDIA_STATUS,
&status, sizeof(status),
&status, sizeof(status), &len, NULL))
{
throw boost::system::system_error(::GetLastError(), boost::system::system_category());
}
Expand Down

0 comments on commit d5a081a

Please sign in to comment.