NotifyNetworkConnectivityHintChange function (netioapi.h)
Registers an application-defined callback function, to be called when the aggregate network connectivity level and cost hints change.
Syntax
IPHLPAPI_DLL_LINKAGE _NETIOAPI_SUCCESS_ NETIOAPI_API NotifyNetworkConnectivityHintChange(
[in] PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK Callback,
[in] PVOID CallerContext,
[in] BOOLEAN InitialNotification,
[out] PHANDLE NotificationHandle
);
Parameters
[in] Callback
A function pointer of type PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK, which points to your application-defined callback function. The callback function will be invoked when a network connectivity level or cost change occurs.
[in] CallerContext
The user-specific caller context. This context will be supplied to the callback function.
[in] InitialNotification
True
if an initialization notification should be provided, otherwise false
.
[out] NotificationHandle
A pointer to a HANDLE. The function sets the value to a handle to the notification registration.
Return value
If the function succeeds, the return value is NO_ERROR. Otherwise, an error code is returned.
Remarks
To deregister for change notifications, call the CancelMibChangeNotify2 function, passing the NotificationHandle parameter returned by NotifyNetworkConnectivityHintChange.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 2004 (10.0; Build 19041) |
Minimum supported server | Windows Server, version 2004 (10.0; Build 19041) |
Target Platform | Windows |
Header | netioapi.h (include Iphlpapi.h) |
Library | Iphlpapi.lib |
DLL | Iphlpapi.dll |