Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

htonl

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function converts a u_long from host to TCP/IP network byte order, which is big-endian.


u_long htonl(
  u_long hostlong
);

hostlong

[in] 32-bit number in host byte order.

This function returns the value in TCP/IP network byte order.

This function takes a 32-bit number in host byte order and returns a 32-bit number in the network byte order used in TCP/IP networks.

Headerwinsock2.h
LibraryWs2.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2015 Microsoft