The R_DhcpRemoveOptionV6 method removes the option definition of a specific option for a specific user class or the vendor class at the default option level. If the user class or the vendor class is not specified, the default user class or vendor class will be used. The option id specifies the identifier of the option definition.

 DWORD R_DhcpRemoveOptionV6(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] DWORD Flags,
   [in] DHCP_OPTION_ID OptionID,
   [in, string, unique] WCHAR* ClassName,
   [in, string, unique] WCHAR* VendorName
 );

ServerIpAddress: The IP address/host name of the DHCP server. This parameter is unused.

Flags: This is of type DWORD, specifying that the option definition is removed for a specific or default vendor class.

Value

Meaning

DHCP_FLAGS_OPTION_DEFAULT

0x00000000

Option definition is removed for a default vendor class.

DHCP_FLAGS_OPTION_IS_VENDOR

0x00000003

If a bitwise AND operation with this bitmask yields a nonzero value, it indicates that the option definition is removed for a specific vendor class.

OptionID: This is of type DHCP_OPTION_ID (section 2.2.1.2.3), containing the option identifier of the option definition which is being deleted.

ClassName: A pointer to a null-terminated Unicode string that contains the name of the user class for which the option definition is removed. This parameter is optional.

VendorName: A pointer to a null-terminated Unicode string that contains the name of the vendor class for which the option definition is removed. This parameter is optional, and if the vendor class name is not specified, the option definition is removed for the default vendor class.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully, else it contains a Win32 error code, as specified in [MS-ERREF]. This error code value can correspond to a DHCP-specific failure, which takes a value between 20000 and 20099, or any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call was successful.

0x00004E2A

ERROR_DHCP_OPTION_NOT_PRESENT

The option to be modified does not exist.

The opnum field value for this method is 51.

When processing this call, the DHCP server MUST do the following:

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].