DhcpDeleteClass function (dhcpsapi.h)

The DhcpDeleteClass function deletes a DHCP class from the DHCP server.

Syntax

DWORD DhcpDeleteClass(
  [in] LPWSTR ServerIpAddress,
  [in] DWORD  ReservedMustBeZero,
  [in] LPWSTR ClassName
);

Parameters

[in] ServerIpAddress

Pointer to a Unicode string that contains the IPv6 address of the DHCP server. This string is used as a handle for resolving RPC API calls.

[in] ReservedMustBeZero

Reserved. This parameter must be set to 0.

[in] ClassName

Unicode string that specifies the name of the DHCP class to delete.

Return value

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

Return code Description
ERROR_ACCESS_DENIED
This call was performed by a client who is not a member of the "DHCP Administrators" security group.
ERROR_DHCP_JET_ERROR
An error occurred while accessing the DHCP server's database.
ERROR_DHCP_CLASS_NOT_FOUND
The class name could not be found in the database.
ERROR_DHCP_DELETE_BUILTIN_CLASS
The class is a built-in class and cannot be deleted.

Requirements

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

See also

DhcpCreateClass