EN
此内容没有您的语言版本,但有英语版本。

ntohf function

The ntohf inline function converts an unsigned __int32 from TCP/IP network order to host byte order (which is little-endian on Intel processors) and returns a float.

Syntax


float __inline ntohf(
  unsigned __int32 value
);

Parameters

value

An unsigned __int32 number in TCP/IP network byte order.

Return value

The ntohf function returns the value supplied in the value parameter with the byte order reversed. If value is already in host byte order, then this function will reverse it. It is up to the application to determine if the byte order must be reversed.

Remarks

The ntohf inline function takes an unsigned __int32 in TCP/IP network byte order (the AF_INET or AF_INET6 address family) and returns a float that contains a number in host byte order.

The ntohf function can be used to convert an IPv4 address in network byte order to the IPv4 address in host byte order. This function does not do any checking to determine if the value parameter is a valid IPv4 address.

The ntohf function does not require that the Winsock DLL has previously been loaded with a successful call to the WSAStartup function.

Windows Phone 8: This function is supported for Windows Phone Store apps on Windows Phone 8 and later.

Windows 8.1 and Windows Server 2012 R2: This function is supported for Windows Store apps on Windows 8.1, Windows Server 2012 R2, and later.

Requirements

Minimum supported client

Windows 8.1, Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Minimum supported phone

Windows Phone 8

Header

Winsock2.h

See also

htond
htonf
htonl
htonll
htons
inet_addr
inet_ntoa
InetNtop
InetPton
ntohd
ntohl
ntohll
ntohs
WSAHtonl
WSAHtons
WSANtohl
WSANtohs

 

 

社区附加资源

添加
显示:
© 2014 Microsoft