mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +00:00
iphlpapi: Link NotifyAddrChange and CancelIPChangeNotify to nsi implementation.
This commit is contained in:
parent
a58f3e0401
commit
4098a05ea8
|
@ -127,14 +127,15 @@ DWORD WINAPI AddIPAddress(IPAddr Address, IPMask IpMask, DWORD IfIndex, PULONG N
|
||||||
* RETURNS
|
* RETURNS
|
||||||
* Success: TRUE
|
* Success: TRUE
|
||||||
* Failure: FALSE
|
* Failure: FALSE
|
||||||
*
|
|
||||||
* FIXME
|
|
||||||
* Stub, returns FALSE.
|
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI CancelIPChangeNotify(LPOVERLAPPED overlapped)
|
BOOL WINAPI CancelIPChangeNotify(LPOVERLAPPED overlapped)
|
||||||
{
|
{
|
||||||
FIXME("(overlapped %p): stub\n", overlapped);
|
DWORD err;
|
||||||
return FALSE;
|
|
||||||
|
TRACE("overlapped %p.\n", overlapped);
|
||||||
|
|
||||||
|
if ((err = NsiCancelChangeNotification( overlapped ))) SetLastError( err );
|
||||||
|
return !err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3786,16 +3787,12 @@ DWORD WINAPI IpRenewAddress(PIP_ADAPTER_INDEX_MAP AdapterInfo)
|
||||||
* RETURNS
|
* RETURNS
|
||||||
* Success: NO_ERROR
|
* Success: NO_ERROR
|
||||||
* Failure: error code from winerror.h
|
* Failure: error code from winerror.h
|
||||||
*
|
|
||||||
* FIXME
|
|
||||||
* Stub, returns ERROR_NOT_SUPPORTED.
|
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI NotifyAddrChange(PHANDLE Handle, LPOVERLAPPED overlapped)
|
DWORD WINAPI NotifyAddrChange(PHANDLE Handle, LPOVERLAPPED overlapped)
|
||||||
{
|
{
|
||||||
FIXME("(Handle %p, overlapped %p): stub\n", Handle, overlapped);
|
TRACE("Handle %p, overlapped %p.\n", Handle, overlapped);
|
||||||
if (Handle) *Handle = INVALID_HANDLE_VALUE;
|
|
||||||
if (overlapped) ((IO_STATUS_BLOCK *) overlapped)->Status = STATUS_PENDING;
|
return NsiRequestChangeNotification(0, &NPI_MS_IPV4_MODULEID, NSI_IP_UNICAST_TABLE, overlapped, Handle);
|
||||||
return ERROR_IO_PENDING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1670,9 +1670,11 @@ static void testNotifyAddrChange(void)
|
||||||
ret = NotifyAddrChange(&handle, &overlapped);
|
ret = NotifyAddrChange(&handle, &overlapped);
|
||||||
ok(ret == ERROR_IO_PENDING, "NotifyAddrChange returned %ld, expected ERROR_IO_PENDING\n", ret);
|
ok(ret == ERROR_IO_PENDING, "NotifyAddrChange returned %ld, expected ERROR_IO_PENDING\n", ret);
|
||||||
ret = GetLastError();
|
ret = GetLastError();
|
||||||
todo_wine ok(ret == ERROR_IO_PENDING, "GetLastError returned %ld, expected ERROR_IO_PENDING\n", ret);
|
ok(ret == ERROR_IO_PENDING, "GetLastError returned %ld, expected ERROR_IO_PENDING\n", ret);
|
||||||
success = CancelIPChangeNotify(&overlapped);
|
success = CancelIPChangeNotify(&overlapped);
|
||||||
todo_wine ok(success == TRUE, "CancelIPChangeNotify returned FALSE, expected TRUE\n");
|
ok(success == TRUE, "CancelIPChangeNotify returned FALSE, expected TRUE\n");
|
||||||
|
success = GetOverlappedResult( handle, &overlapped, &bytes, TRUE );
|
||||||
|
ok( !success && GetLastError() == ERROR_OPERATION_ABORTED, "got bret %d, err %lu.\n", success, GetLastError() );
|
||||||
|
|
||||||
ZeroMemory(&overlapped, sizeof(overlapped));
|
ZeroMemory(&overlapped, sizeof(overlapped));
|
||||||
success = CancelIPChangeNotify(&overlapped);
|
success = CancelIPChangeNotify(&overlapped);
|
||||||
|
@ -1683,13 +1685,15 @@ static void testNotifyAddrChange(void)
|
||||||
overlapped.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
overlapped.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||||
ret = NotifyAddrChange(&handle, &overlapped);
|
ret = NotifyAddrChange(&handle, &overlapped);
|
||||||
ok(ret == ERROR_IO_PENDING, "NotifyAddrChange returned %ld, expected ERROR_IO_PENDING\n", ret);
|
ok(ret == ERROR_IO_PENDING, "NotifyAddrChange returned %ld, expected ERROR_IO_PENDING\n", ret);
|
||||||
todo_wine ok(handle != INVALID_HANDLE_VALUE, "NotifyAddrChange returned invalid file handle\n");
|
ok(handle != INVALID_HANDLE_VALUE, "NotifyAddrChange returned invalid file handle\n");
|
||||||
success = GetOverlappedResult(handle, &overlapped, &bytes, FALSE);
|
success = GetOverlappedResult(handle, &overlapped, &bytes, FALSE);
|
||||||
ok(success == FALSE, "GetOverlappedResult returned TRUE, expected FALSE\n");
|
ok(success == FALSE, "GetOverlappedResult returned TRUE, expected FALSE\n");
|
||||||
ret = GetLastError();
|
ret = GetLastError();
|
||||||
ok(ret == ERROR_IO_INCOMPLETE, "GetLastError returned %ld, expected ERROR_IO_INCOMPLETE\n", ret);
|
ok(ret == ERROR_IO_INCOMPLETE, "GetLastError returned %ld, expected ERROR_IO_INCOMPLETE\n", ret);
|
||||||
success = CancelIPChangeNotify(&overlapped);
|
success = CancelIPChangeNotify(&overlapped);
|
||||||
todo_wine ok(success == TRUE, "CancelIPChangeNotify returned FALSE, expected TRUE\n");
|
ok(success == TRUE, "CancelIPChangeNotify returned FALSE, expected TRUE\n");
|
||||||
|
success = GetOverlappedResult( handle, &overlapped, &bytes, TRUE );
|
||||||
|
ok( !success && GetLastError() == ERROR_OPERATION_ABORTED, "got bret %d, err %lu.\n", success, GetLastError() );
|
||||||
|
|
||||||
if (winetest_interactive)
|
if (winetest_interactive)
|
||||||
{
|
{
|
||||||
|
@ -1710,7 +1714,7 @@ static void testNotifyAddrChange(void)
|
||||||
trace("Testing synchronous ipv4 address change notification. Please "
|
trace("Testing synchronous ipv4 address change notification. Please "
|
||||||
"change the ipv4 address of one of your network interfaces\n");
|
"change the ipv4 address of one of your network interfaces\n");
|
||||||
ret = NotifyAddrChange(NULL, NULL);
|
ret = NotifyAddrChange(NULL, NULL);
|
||||||
todo_wine ok(ret == NO_ERROR, "NotifyAddrChange returned %ld, expected NO_ERROR\n", ret);
|
ok(ret == NO_ERROR, "NotifyAddrChange returned %ld, expected NO_ERROR\n", ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue