dhcpV4FailoverSetRelationship 函式 (dhcpsapi.h)

DhcpV4FailoverSetRelationship函式會設定或修改 DHCPv4 伺服器容錯移轉關聯性的參數。

語法

DWORD DHCP_API_FUNCTION DhcpV4FailoverSetRelationship(
  [in, optional] LPWSTR                       ServerIpAddress,
  [in]           DWORD                        Flags,
  [in]           LPDHCP_FAILOVER_RELATIONSHIP pRelationship
);

參數

[in, optional] ServerIpAddress

Null 終止的 Unicode 字串指標,表示 DHCP 伺服器的 IP 位址或主機名稱。

[in] Flags

位元遮罩,指定要在 pRelationship中更新的欄位。 每個值會指定要修改 之DHCP_FAILOVER_RELATIONSHIP 結構的成員。

旗標 意義
MCLT
0x00000001
pRelationship參數結構中的mclt成員會填入。
SAFEPERIOD
0x00000002
pRelationship參數結構中的safePeriod成員會填入。
CHANGESTATE
0x00000004
pRelationship參數結構中的狀態成員會填入。
百分比
0x00000008
pRelationship參數結構的百分比成員會填入。
模式
0x00000010
pRelationship參數結構中的mode成員會填入。
PREVSTATE
0x00000020
pRelationship參數結構中的prevState成員會填入。

[in] pRelationship

DHCP_FAILOVER_RELATIONSHIP結構的指標,其中包含 DHCPv4 容錯移轉關聯性中欄位的更新資訊。

傳回值

如果函式成功,則會傳回 ERROR_SUCCESS

如果函式失敗,它會從 DHCP 伺服器管理 API 錯誤碼傳回下列其中一個錯誤碼或錯誤碼。

意義
ERROR_INVALID_PARAMETER
一或多個參數無效。
ERROR_DHCP_FO_RELATIONSHIP_DOES_NOT_EXIST
容錯移轉關聯性不存在。

需求

   
最低支援的用戶端 都不支援
最低支援的伺服器 Windows Server 2012 [僅限傳統型應用程式]
目標平台 Windows
標頭 dhcpsapi.h
程式庫 Dhcpsapi.lib
Dll Dhcpsapi.dll

另請參閱

DhcpV4FailoverCreateRelationship

DhcpV4FailoverDeleteRelationship

DhcpV4FailoverEnumRelationship

DhcpV4FailoverGetRelationship