DhcpCreateOptionV5 function
The DhcpCreateOptionV5 function creates a DHCP option.
Syntax
DWORD DhcpCreateOptionV5( _In_ LPWSTR ServerIpAddress, _In_ DWORD Flags, _In_ DHCP_OPTION_ID OptionId, _In_opt_ LPWSTR ClassName, _In_opt_ LPWSTR VendorName, _In_ LPDHCP_OPTION OptionInfo );
Parameters
- ServerIpAddress [in]
-
Unicode string that specifies the IP address or hostname of the DHCP server.
- Flags [in]
-
Flag value that indicates whether the option is for a specific or default vendor class.
- OptionId [in]
-
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.
- ClassName [in, optional]
-
Unicode string that specifies the name of the DHCP class that will contain this option. This field is optional.
- VendorName [in, optional]
-
Unicode string that contains a vendor name string if the class specified in ClassName is a vendor-specific class.
- OptionInfo [in]
-
DHCP_OPTION structure that contains information describing the new DHCP option, including the name, an optional comment, and any related data items.
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 |
|---|---|
|
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. |
Requirements
|
Minimum supported client | None supported [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 2/28/2013