Expand Minimize
This topic has not yet been rated - Rate this topic

GetAddrInfoExCancel function

The GetAddrInfoExCancel function cancels an asynchronous operation by the GetAddrInfoEx function.

Syntax


int WSAAPI GetAddrInfoExCancel(
  _In_  LPHANDLE lpHandle
);

Parameters

lpHandle [in]

The handle of the asynchronous operation to cancel. This is the handle returned in the lpNameHandle parameter by the GetAddrInfoEx function.

Return value

On success, GetAddrInfoExCancel returns NO_ERROR (0). Failure returns a nonzero Windows Sockets error code, as found in the Windows Sockets Error Codes.

Remarks

The GetAddrInfoExCancel function cancels an asynchronous GetAddrInfoEx operation. The result is that the user's completion mechanism, either a callback or an event, is immediately invoked. No results are returned, and the error code returned for the GetAddrInfoEx asynchronous operation is set to WSA_E_CANCELLED. If the GetAddrInfoEx request has already completed or timed out, or the handle is invalid, and WSA_INVALID_HANDLE will be returned by GetAddrInfoExCancel function.

Since many of the underlying operations (legacy name service providers, for example) are synchronous, these operations will not actually be cancelled. These operations will continue running and consuming resources. Once the last outstanding name service provider request has completed, the resources will be released.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Ws2tcpip.h

Library

Ws2_32.lib

DLL

Ws2_32.dll

See also

GetAddrInfoEx

 

 

Send comments about this topic to Microsoft

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.