DhcpGetOptionInfo function

The DhcpGetOptionInfo function returns information on a specific DHCP option for the default user and vendor class.

Syntax


DWORD DHCP_API_FUNCTION DhcpGetOptionInfo(
  _In_  DHCP_CONST WCHAR *ServerIpAddress,
  _In_  DHCP_OPTION_ID   OptionID,
  _Out_ LPDHCP_OPTION    *OptionInfo
);

Parameters

ServerIpAddress [in]

Unicode string that specifies the IPv4 address of the DHCP server.

OptionID [in]

DHCP_OPTION_ID value that specifies the code for the option to retrieve information on.

OptionInfo [out]

Pointer to a DHCP_OPTION structure that contains the returned information on the option specified by OptionID.

Note  

The memory for this parameter must be free using DhcpRpcFreeMemory.

 

Return value

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

Return codeDescription
ERROR_DHCP_JET_ERROR

An error occurred while accessing the DHCP server database.

ERROR_DHCP_OPTION_NOT_PRESENT

The specified option definition could not be found in the DHCP server database.

 

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DhcpSetOptionInfo
DhcpGetOptionInfoV5
DHCP_OPTION

 

 

Show: