Dhcpv6RequestParams function

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

Syntax

DWORD Dhcpv6RequestParams(
  IN BOOL                        forceNewInform,
  IN LPVOID                      reserved,
  IN LPWSTR                      adapterName,
  IN LPDHCPV6CAPI_CLASSID        classId,
  IN OUT DHCPV6CAPI_PARAMS_ARRAY recdParams,
  IN LPBYTE                      buffer,
  IN OUT 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

Name 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.

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.
  • 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.

Requirements

   
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