Skip to content

Commit

Permalink
Merge pull request #182 from bchavez/tap_devicecontrol_fix3
Browse files Browse the repository at this point in the history
Fixes Invalid DeviceIoControl Parameters to Windows TAP Driver
  • Loading branch information
s-vincent authored Oct 16, 2018
2 parents 1f414b7 + d5a081a commit 36ae3d5
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 36ae3d5

Please sign in to comment.