Hi!! you can use the DhcpNotifyConfigChange in dhcpcsvc.dll,

I haven’t got it to work. I always get the return value of 2 which is an error code the right code is 0 if the command executed successfully.

Please msg me if you get it to work!!

here's the proto:

BOOL DhcpNotifyConfigChange(
LPWSTR lpwszServerName, // NULL for local machine
LPWSTR lpwszAdapterName, // see below
BOOL fNewIpAddress, // TRUE if IP address modified
DWORD dwIpIndex, // IP address index (0 based)
DWORD dwIpAddress, // IP address to set (network order)
DWORD dwSubNetMask, // Associated subnet mask (network order)
int nDhcpAction ); // 0on't modify/1:enable/2isable DHCP

o On NT 4.0, lpwszAdapterName is the "ServiceName" registry value under
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\<"n"
network card index> for your adapter.

o On W2K, lpwszAdapterName is the "NetCfgInstanceId" registry value
under
HKLM\System\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-080
02be10318}\<"000n" network card index> for your adapter.

Changes made through DhcpNotifyConfigChange are temporary (they will
vanish with the next reboot): you will have to set appropriate values in
the registry to make them permanent.