DhcpSendOptions (Windows CE 5.0)

Send Feedback

Windows CE 3.0 and later supports the registry key, HKEY_LOCAL_MACHINE\Comm\<*Adapter Name>*\Parms\Tcpip\DhcpSendOptions, which allows you to send options to the DHCP server. These options are appended to the DHCP packet. Windows CE does not attempt to parse the data, but just copies it into the packet.

Under this registry key, you can create additional keys and set particular values in binary form that you want to exchange with the server.

Values are created under this key. These values have the names of the options to send.

The format of the option data must include type and length field, as per RFC 1533.

The following list shows the rules that you must follow when using the DhcpSendOptions registry key:

  • Names of binary values under this key must be no longer than 3 characters each.

  • You must set the value of HKEY_LOCAL_MACHINE\Comm\<Adapter Name>\Parms\Tcpip\EnableDHCP to 1. If you fail to do so and set the DhcpSendOptions entry, your Windows CE-based device could experience connection failure.

    Note   You are responsible for making sure these options are valid DHCP options and that the stored values are correct. The Windows CE DHCP client does not format these values; the client only reads these values from the key and appends the values to the DHCP packet.

The following example shows how to encode the host name for sending to the DHCP server. In this example, the host name 12 is set to MyHost:

HKEY_LOCAL_MACHINE\Comm\<Adapter name>\Parms\TcpIp\DhcpSendOptions

@=""

"12"=hex:0c,06,6d,79,68,6f,73,74

See Also

Additional DHCP Settings | Host Name Resolution for IPv4

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.