Programmatically Create DHCP Reservation in C#
问题 I have been assigned the task of creating an application that takes in a MAC address and creates a DHCP reservation for that MAC address. Is there any API built into .NET to easily accomplish this? 回答1: When I was writing apps for infrastructure there was a COM library called Dhcpobjs.dll in the Windows 2000 Resource Kit. This could be dynamically loaded by a VBScript using IDispatch like so: Set DhcpMgr = CreateObject("Dhcp.Manager") Set DhcpServer = DhcpMgr.Servers.Connect("192.130.1.5") I