Export (0) Print
Expand All

DhcpRegisterParamChange function

The DhcpRegisterParamChange function enables clients to register for notification of changes in DHCP configuration parameters.

Syntax


DWORD  APIENTRY DhcpRegisterParamChange(
  _In_     DWORD Flags,
  _In_     LPVOID Reserved,
  _In_     LPWSTR AdapterName,
  _In_     LPDHCPCAPI_CLASSID pClassId,
  _In_     DHCPCAPI_PARAMS_ARRAY Params,
  _Inout_  LPVOID Handle
);

Parameters

Flags [in]

Reserved. Must be set to DHCPCAPI_REGISTER_HANDLE_EVENT. If it is not set to this flag value, the API call will not be successful.

Reserved [in]

Reserved. Must be set to NULL.

AdapterName [in]

Name of the adapter for which event notification is being requested. Must be under 256 characters.

pClassId [in]

Reserved. Must be set to NULL.

Params [in]

Parameters for which the client is interested in registering for notification, in the form of a DHCPCAPI_PARAMS_ARRAY structure.

Handle [in, out]

Attributes of Handle are determined by the value of Flags. In version 2 of the DHCP API, Flags must be set to DHCPCAPI_REGISTER_HANDLE_EVENT, and therefore, Handle must be a pointer to a HANDLE variable that will hold the handle to a Windows event that gets signaled when parameters specified in Params change. Note that this HANDLE variable is used in a subsequent call to the DhcpDeRegisterParamChange function to deregister event notifications associated with this particular call to the DhcpRegisterParamChange function.

Return value

Returns ERROR_SUCCESS upon successful completion. Otherwise, returns Windows error codes.

Return codeDescription
ERROR_INVALID_PARAMETER

Returned if the AdapterName parameter is over 256 characters long.

 

Remarks

Version 2 of the DHCP Client API provides only event-based notification. With event-based notification in DHCP, clients enable notification by having Handle point to a variable that, upon successful return, holds the EVENT handles that are signaled whenever changes occur to the parameters requested in Params.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Dhcpcsdk.h

Library

Dhcpcsvc.lib

DLL

Dhcpcsvc.dll

See also

DHCP Functions
DhcpCApiInitialize
DhcpDeRegisterParamChange
DHCPCAPI_PARAMS_ARRAY

 

 

Community Additions

ADD
Show:
© 2014 Microsoft