UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:dhcpsapi.DhcpCreateOptionV5 |
DhcpCreateOptionV5 function (dhcpsapi.h) |
Creates a DHCP option. |
|
dhcp\dhcpcreateoptionv5.htm |
DHCP |
de6e8f87-af4b-4e7f-8468-54359c5a8907 |
12/05/2018 |
DHCP_FLAGS_OPTION_IS_VENDOR, DhcpCreateOptionV5, DhcpCreateOptionV5 function [DHCP], dhcp.dhcpcreateoptionv5, dhcpsapi/DhcpCreateOptionV5 |
dhcpsapi.h |
Windows |
None supported |
Windows Server 2008 R2 [desktop apps only] |
Dhcpsapi.lib |
Dhcpsapi.dll |
Windows |
19H1 |
|
|
|
|
|
|
The DhcpCreateOptionV5 function creates a DHCP option.
Unicode string that specifies the IP address or hostname of the DHCP server.
Flag value that indicates whether the option is for a specific or default vendor class.
DHCP_OPTION_ID value that contains the unique option ID number (also called an "option code") of the new option. Many of these option ID numbers are defined; a complete list of standard DHCP and BOOTP option codes can be found in DHCP Options and BOOTP Vendor Extensions.
Unicode string that specifies the name of the DHCP class that will contain this option. This field is optional.
Unicode string that contains a vendor name string if the class specified in ClassName is a vendor-specific class.
DHCP_OPTION structure that contains information describing the new DHCP option, including the name, an optional comment, and any related data items.
This function returns ERROR_SUCCESS upon a successful call. Otherwise, it returns one of the DHCP Server Management API Error Codes.
Return code | Description |
---|---|
|
This call was performed by a client who is not a member of the "DHCP Administrators" security group. |
|
An error occurred while accessing the DHCP server's database. |
|
The specified option definition already exists in the DHCP server database. |
|
The specified class name is unknown or incorrectly formed. |