Expand Minimize

DhcpEnumClassesV6 function

The DhcpEnumClassesV6 function enumerates the user or vendor classes configured for the DHCPv6 server.

Syntax


DWORD WINAPI DhcpEnumClassesV6(
  _In_     LPWSTR ServerIpAddress,
  _In_     DWORD ReservedMustBeZero,
  _Inout_   DHCP_RESUME_HANDLE *ResumeHandle,
  _In_     DWORD PreferredMaximum,
  _Out_    LPDHCP_CLASS_INFO_ARRAY_V6 *ClassInfoArray,
  _Out_    DWORD *nRead,
  _Out_    DWORD *nTotal
);

Parameters

ServerIpAddress [in]

Pointer to a Unicode string that specifies the IP address or hostname of the DHCPv6 server.

ReservedMustBeZero [in]

Reserved. This field must be set to zero.

ResumeHandle [in, out]

Pointer to a DHCP_RESUME_HANDLE value that identifies the enumeration operation. Initially, this value should be zero, with a successful call returning the handle value used for subsequent enumeration requests. For example, if PreferredMaximum is set to 100 classes, and 200 classes are stored on the server, the resume handle can be used after the first 100 classes are retrieved to obtain the next 100 on a subsequent call, and so forth.

PreferredMaximum [in]

Specifies the preferred maximum number of classes to return. If the number of remaining unenumerated classes is less than this value, then that amount will be returned. To retrieve all classes available on the DHCPv6 server, set this parameter to 0xFFFFFFFF.

ClassInfoArray [out]

Pointer to a DHCP_CLASS_INFO_ARRAY_V6 structure that contains the returned classes. If there are no classes available on the DHCP server, this parameter will return null.

nRead [out]

Pointer to a DWORD value that specifies the number of classes returned in ClassInfoArray.

nTotal [out]

Pointer to a DWORD value that specifies the total number of classes stored on the DHCP server.

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_ACCESS_DENIED

This call was performed by a client who is not a member of the "DHCP Administrators" security group.

ERROR_DHCP_JET_ERROR

An error occurred while accessing the DHCP server's database.

 

Remarks

The caller of this function must free the memory pointed to by ClassInfoArray.

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

DHCP_RESUME_HANDLE
DHCP_CLASS_INFO_ARRAY_V6

 

 

Community Additions

ADD
Show:
© 2014 Microsoft