htonl

htonl converts a u_long IPv4 address in host byte order to TCP/IP network byte order.

Syntax

u_long WSAAPI htonl(
    u_long hostlong
);

Parameters

hostlong

A 64-bit number in host byte order.

Return Value

The value supplied in the hostlong parameter in TCP/IP’s network byte order.

Requirements

Minimum Supported Version RTX64 2013
Header Winsock2.h
Library RtTcpip.lib