DhcpGetOptionValue function

The DhcpGetOptionValue function retrieves a DHCP option value (the option code and associated data) for a particular scope.

Syntax


DWORD DHCP_API_FUNCTION DhcpGetOptionValue(
  _In_  DHCP_CONST WCHAR                  *ServerIpAddress,
  _In_  DHCP_OPTION_ID                    OptionID,
  _In_  DHCP_CONST DHCP_OPTION_SCOPE_INFO *ScopeInfo,
  _Out_ LPDHCP_OPTION_VALUE               *OptionValue
);

Parameters

ServerIpAddress [in]

Unicode string that specifies the IP address or hostname of the DHCP server.

OptionID [in]

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

ScopeInfo [in]

DHCP_OPTION_SCOPE_INFO structure that contains information on the scope where the option value is set.

OptionValue [out]

DHCP_OPTION_VALUE structure that contains the returned option code and data.

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.

Remarks

This function requires host byte ordering for all DHCP_IP_ADDRESS values in parameter structures.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DHCP_OPTION_VALUE

 

 

Show: