DhcpDeleteServer function (dhcpsapi.h)

The DhcpDeleteServer function attempts to delete a DHCP server and any related objects (such as subnet information and IP reservations) from the directory service.

Syntax

DWORD DhcpDeleteServer(
  [in] DWORD              Flags,
  [in] LPVOID             IdInfo,
  [in] LPDHCP_SERVER_INFO NewServer,
  [in] LPVOID             CallbackFn,
  [in] LPVOID             CallbackData
);

Parameters

[in] Flags

Set to zero.

[in] IdInfo

Set to null.

[in] NewServer

Pointer to a DHCP_SERVER_INFO structure that contains the details of the DHCP server to delete from the directory service.

[in] CallbackFn

Pointer to the function to call after this operation is executed. Set to null.

[in] CallbackData

Pointer to the list of data that will be passed to the callback function specified in CallbackFn. Set to null.

Return value

This function returns ERROR_SUCCESS upon a successful call. Otherwise, it returns one of the DHCP Server Management API Error Codes.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header dhcpsapi.h
Library Dhcpsapi.lib
DLL Dhcpsapi.dll

See also

DHCP_SERVER_INFO

DhcpEnumServers