DhcpRegisterParamChange
The DhcpRegisterParamChange function enables clients to register for notification of changes in DHCP configuration parameters.
DWORD
APIENTRY
DhcpRegisterParamChange(
DWORD dwFlags,
LPVOID pReserved,
LPWSTR pszAdapterName,
LPDHCPCAPI_CLASSID pClassId,
DHCPCAPI_PARAMS_ARRAY pParams,
LPVOID pHandle
);
Parameters
- dwFlags
- [in] Identifies the notification mechanism to be used. In version 2 of the Microsoft DHCP Application Programming Interface (API), only event-based notification is supported, and dwFlags must be set to DHCPAPI_REGISTER_HANDLE_EVENT.
- pReserved
- [in] Reserved for future use. Must be set to NULL.
- pszAdapterName
- [in] Name of the adapter for which event notification is being requested.
- pClassId
- [in] Class ID with which requested notification parameters are to be associated.
- pParams
- [in] Parameters for which the client is interested in registering for notification.
- pHandle
- [in, out] Attributes of pHandle are determined by the value of dwFlags. In version 2 of the DHCP API, dwFlags must be set to DHCPAPI_REGISTER_HANDLE_EVENT, and therefore, pHandle must be a pointer to a HANDLE variable that will hold the handle to a Windows event that gets signaled when parameters specified in pParams change. Note that pHandle is used in a subsequent call to the DhcpDeRegisterParamChange function to de-register event notifications associated with this particular call to the DhcpRegisterParamChange function.
Remarks
Version 2 of the DHCP API provides only event-based notification. With event-based notification in DHCP, clients enable notification by having pHandle point to a variable that, upon successful return, holds the EVENT handles that are signaled whenever changes occur to the parameters requested in pParams.
Return Values
Returns ERROR_SUCCESS upon successful completion. Otherwise, returns Win32 error codes.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Dhcpcsdk.h.
Library: Use Dhcpcsvc.lib.
See Also
DHCP Overview, DHCP Functions, DhcpCApiInitialize, DhcpDeRegisterParamChange