Export (0) Print
Expand All
Expand Minimize

CancelMibChangeNotify2 function

The CancelMibChangeNotify2 function deregisters for change notifications for IP interface changes, IP address changes, IP route changes, Teredo port changes, and when the unicast IP address table is stable and can be retrieved.

Syntax


NETIOAPI_API CancelMibChangeNotify2(
  _In_  HANDLE NotificationHandle
);

Parameters

NotificationHandle [in]

The handle returned from a notification registration or retrieval function to indicate which notification to cancel.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Return codeDescription
ERROR_INVALID_PARAMETER

An invalid parameter was passed to the function. This error is returned if the NotificationHandle parameter was a NULL pointer.

Other

Use FormatMessage to obtain the message string for the returned error.

 

Remarks

The CancelMibChangeNotify2 function is defined on Windows Vista and later.

The CancelMibChangeNotify2 function deregisters for a change notification previously requested for IP interface changes, IP address changes, IP route changes, or Teredo port changes on a local computer. These requests are made by calling NotifyIpInterfaceChange, NotifyUnicastIpAddressChange, NotifyRouteChange2, or NotifyTeredoPortChange. The CancelMibChangeNotify2 function also cancels a previous request to be notified when the unicast IP address table is stable on a local computer and can be retrieved. This request is made by calling the NotifyStableUnicastIpAddressTable function.

The NotificationHandle parameter returned to these notification functions is passed to CancelMibChangeNotify2 to deregister for notifications or cancel a pending request to retrieve the stable unicast IP address table.

An application cannot make a call to the CancelMibChangeNotify2 function from the context of the thread which is currently executing the notification callback function for the same NotificationHandle parameter. Otherwise, the thread executing that callback will result in deadlock. So the CancelMibChangeNotify2 function must not be called directly as part of the notification callback routine. In a more general situation, a thread that executes the CancelMibChangeNotify2 function cannot own a resource on which the thread that executes a notification callback operation would wait because it would result in a similar deadlock. The CancelMibChangeNotify2 function should be called from a different thread, on which the thread that receives the notification callback doesn’t have dependencies on.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Netioapi.h (include Iphlpapi.h)

Library

Iphlpapi.lib

DLL

Iphlpapi.dll

See also

NotifyIpInterfaceChange
NotifyRouteChange2
NotifyStableUnicastIpAddressTable
NotifyTeredoPortChange
NotifyUnicastIpAddressChange

 

 

Community Additions

ADD
Show:
© 2014 Microsoft