Server | Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0. |
---|---|
Header | Declared in Dhcpsapi.h. |
Library | Link to Dhcpsapi.lib. |
DLL | Requires Dhcpsapi.dll. |
CHAR *srvIP=L"192.168.0.207";
DHCP_SEARCH_INFO sinfo;
sinfo.SearchType=DhcpClientName;
sinfo.SearchInfo.ClientName=L"link-hh.";
DHCP_CLIENT_INFO cinfo;
LPDHCP_CLIENT_INFO pcinfo=NULL;
DhcpGetClientInfo(srvIP,sinfo,&pcinfo);
pcinfo->ClientIpAddress=htonl( inet_addr("192.168.0.20"));
DhcpCreateClientInfo(srvIP,pcinfo);