Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The DhcpRegisterParamChange function enables clients to register for notification of changes in DHCP configuration parameters.
Syntax
DWORD DhcpRegisterParamChange(
[in] DWORD Flags,
[in] LPVOID Reserved,
[in] LPWSTR AdapterName,
[in] LPDHCPCAPI_CLASSID ClassId,
[in] DHCPCAPI_PARAMS_ARRAY Params,
[in, out] LPVOID Handle
);
Parameters
[in] Flags
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.
[in] Reserved
Reserved. Must be set to NULL.
[in] AdapterName
GUID of the adapter for which event notification is being requested. Must be under 256 characters.
[in] ClassId
Reserved. Must be set to NULL.
[in] Params
Parameters for which the client is interested in registering for notification, in the form of a DHCPCAPI_PARAMS_ARRAY structure.
[in, out] Handle
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 code | Description |
|---|---|
|
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
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 2000 Professional [desktop apps only] |
| Minimum supported server | Windows 2000 Server [desktop apps only] |
| Target Platform | Windows |
| Header | dhcpcsdk.h |
| Library | Dhcpcsvc.lib |
| DLL | Dhcpcsvc.dll |