4.3 Querying the Binding Information of the DHCP Service

In this example, the DHCP server is configured with three endpoints. This example illustrates how to query the list of endpoints from the DHCP server.

The client calls R_DhcpGetServerBindingInfo (section 3.2.4.41) and provides the following parameters:

The call to this RPC method will return ERROR_SUCCESS, and the following parameter is updated:

  • The pointer of type LPDHCP_BIND_ELEMENT_ARRAY to a structure will be updated with three as the number of elements in the array and a pointer to a buffer containing the addresses of the three endpoints of the DHCP server.

When the client no longer needs the server binding information, it frees the memory pointed to by LPDHCP_BIND_ELEMENT_ARRAY by calling the function midl_user_free (see section 3).