在Windows 7上设置注册表内容信息后,如何使设置尽快生效?我可以使用DhcpNotifyConfigChange函数吗?如何设置参数?
是的你可以。但是,DhcpNotifyConfigChange
是位于dhcpcsvc.dll中的未公开接口。其参数:
BOOL DhcpNotifyConfigChange(
LPWSTR lpwszServerName, // local machine should be NULL
LPWSTR lpwszAdapterName, // Adapt name
BOOL bNewIpAddress, // TRUE indicates changing ip
DWORD dwIpIndex, // which IP addr, if only 1, it's 0
DWORD dwIpAddress, // IP addr
DWORD dwSubNetMask, // mask
int nDhcpAction ); // DHCP, 0 for not change, 1 for enable, 2 for disable DHCP