Skip to main content
FreeAddrInfoEx function

The FreeAddrInfoEx function frees address information that the GetAddrInfoEx function dynamically allocates in addrinfoex structures.

Syntax


void WSAAPI FreeAddrInfoEx(
  _In_  PADDRINFOEX pAddrInfo
);

Parameters

pAddrInfo [in]

A pointer to the addrinfoex structure or linked list of addrinfoex structures to be freed. All dynamic storage pointed to within the addrinfoex structure or structures is also freed.

Return value

This function does not return a value.

Remarks

The FreeAddrInfoEx function frees addrinfoex structures dynamically allocated by the GetAddrInfoEx function. The FreeAddrInfoEx function frees the initial addrinfoex structure pointed to in the pAddrInfo parameter, including any buffers to which structure members point, then continues freeing any addrinfoex structures linked by the ai_next member of the addrinfoex structure. The FreeAddrInfoEx function continues freeing linked structures until a NULL ai_next member is encountered.

When UNICODE or _UNICODE is defined, FreeAddrInfoEx is defined to FreeAddrInfoExW, the Unicode version of the function, and ADDRINFOEX is defined to the addrinfoexW structure. When UNICODE or _UNICODE is not defined, FreeAddrInfoEx is defined to FreeAddrInfoExA, the ANSI version of the function, and ADDRINFOEX is defined to the addrinfoexA structure.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Ws2tcpip.h

Library

Ws2_32.lib

DLL

Ws2_32.dll

Unicode and ANSI names

FreeAddrInfoExW (Unicode) and FreeAddrInfoEx (ANSI)

See also

addrinfoex
GetAddrInfoEx