DHCP Server Management API

DHCP Server Management API
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.
vs2005才有这个库和头文件

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);


posted @ 2007-11-22 17:15  ahuo  阅读(883)  评论(0编辑  收藏  举报