Dhcpv6RequestParams function (dhcpv6csdk.h)

The Dhcpv6RequestParams function requests options from the DHCPv6 client cache or directly from the DHCPv6 server.

Syntax

DWORD Dhcpv6RequestParams(
  BOOL                    forceNewInform,
  LPVOID                  reserved,
  LPWSTR                  adapterName,
  LPDHCPV6CAPI_CLASSID    classId,
  DHCPV6CAPI_PARAMS_ARRAY recdParams,
  LPBYTE                  buffer,
  LPDWORD                 pSize
);

Parameters

forceNewInform

If this value is set to TRUE, any available cached information will be ignored and new information will be requested. Otherwise, the request is only sent if there is no cached information.

reserved

Reserved for future use. Must be set to NULL.

adapterName

GUID of the adapter for which this request is meant. This parameter must not be NULL.

classId

Pointer to a DHCPV6CAPI_CLASSID structure that contains the binary ClassId information to use to send on the wire. This parameter is optional.

recdParams

A DHCPV6CAPI_PARAMS_ARRAY structure that contains the parameters to be received from the DHCPV6 server.

buffer

A buffer to contain information returned by some pointers in recdParams.

pSize

Size of the buffer. When the function returns ERROR_MORE_DATA, this parameter will contain the size, in bytes, required to complete the operation. If the function is successful, this parameter contains the number of bytes used.

Return value

Returns ERROR_SUCCESS upon successful completion.

Return code Description
ERROR_INVALID_PARAMETER
Returned if one of the following conditions are true:
  • reserved has a value that is not NULL.
  • AdapterName is NULL. Or no adapter is found with the GUID specified.
  • pSize is NULL.
  • buffer is NULL.
ERROR_MORE_DATA
The call to this API was made with insufficient memory allocated for the Buffer parameter, while pSize contains the actual memory size required.
ERROR_INVALID_NAME
The AdapterName is not in the correct format. It should be in this format: {00000000-0000-0000-0000-000000000000}.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header dhcpv6csdk.h
Library Dhcpcsvc6.lib
DLL Dhcpcsvc6.dll