DhcpAddServer function

The DhcpAddServer function attempts to add a new server to the existing list of DHCP servers maintained in the domain directory service. If the specified DHCP server already exists in the directory service, an error is returned.

Syntax


DWORD DhcpAddServer(
  _In_ DWORD              Flags,
  _In_ LPVOID             IdInfo,
  _In_ LPDHCP_SERVER_INFO NewServer,
  _In_ LPVOID             CallbackFn,
  _In_ LPVOID             CallbackData
);

Parameters

Flags [in]

Reserved for future use. This field should be set to 0x00000000.

IdInfo [in]

Pointer to an address containing the server's ID block. This field should be set to null.

NewServer [in]

Pointer to a DHCP_SERVER_INFO structure containing information about the new DHCP server. The DsLocation and DsLocType members present in this structure are not valid in this implementation, and they should be set to null. The Version member of this structure should be set to 0.

CallbackFn [in]

Pointer to the callback function that will be called when the server add operation completes. This field should be null.

CallbackData [in]

Pointer to a data block containing the formatted structure for callback information. This field should be 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

Minimum supported client

None supported

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DHCP_SERVER_INFO
DhcpDeleteServer

 

 

Show: