Cancels the specified asynchronous peer name resolution request.
Assembly: System.Net (in System.Net.dll)
Calling this method guarantees the system will not attempt to obtain additional records for the specified PeerName. If this method is called when an asynchronous peer name resolution operation is not outstanding, it acts as a "no operation" (NO OP).
The userState object must be provided since it is used to track a specific asynchronous call when multiple calls are in progress. This caller-supplied object is unique for each peer name resolution request.
This method will return immediately, but the operation may or may not immediately cancel. The event arguments returned by the ResolveCompleted event contains a field which can be polled by clients to determine whether cancellation occurred.
Calling this method ensures the ResolveCompleted event will be signaled as soon as possible with the event argument Cancelled set to true.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.