htond 函式 (winsock2.h)

內嵌函式會將精度浮點數從主機轉換成 TCP/IP 網路位元組順序 (,這是大端) 。

語法

unsigned __int64 htond(
  double Value
);

參數

Value

包含主機位元組順序數位的 雙精度 浮點數。

傳回值

htond 函式會以 TCP/IP 的網路位元組順序傳回值。

備註

htond 內嵌函式會採用雙精度浮點數,其中包含主機位元組順序中的數位,並在 TCP/IP 網路中使用的網路位元組順序中傳回 64 位無符號號碼, (AF_INET 或AF_INET6位址系列) 。

內嵌函式可用來將主機位元節順序中的IPv4位址轉換為網路位元組順序中的IPv4位址。 此函式不會進行任何檢查,以判斷 參數是否為有效的 IPv4 位址。

內嵌函式不需要先前已載入 Winsock DLL 並成功呼叫 WSAStartup 函式。

Windows Phone 8:Windows Phone 8 和更新版本 Windows Phone 上的 Windows Phone Store 應用程式支援此函式。

Windows 8.1Windows Server 2012 R2:Windows 8.1、Windows Server 2012 R2 和更新版本上的 Windows 市集應用程式支援此函式。

規格需求

需求
最低支援的用戶端 Windows 8.1,Windows 8 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2012 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 winsock2.h

另請參閱

InetNtop

InetPton

WSAHtonl

WSAHtons

WSANtohl

WSANtohs

htond

htonf

htonll

htons

inet_addr

inet_ntoa

ntohd

ntohf

ntohl

ntohll

ntohs