Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than dhcpsapi, prefix the name with the module name and a period.
[StructLayout(LayoutKind.Sequential)]
struct DHCP_SUBNET_ELEMENT_DATA_V5 {
public DHCP_SUBNET_ELEMENT_TYPE ElementType;
public IntPtr ElementValue;
}
[StructLayout(LayoutKind.Sequential)]
struct DHCP_IP_RESERVATION_V4 {
public uint ReservedIpAddress;
public IntPtr ReservedForClient;
public DHCP_CLIENT_TYPE bAllowedClientTypes;
}
[StructLayout(LayoutKind.Sequential)]
struct DHCP_BINARY_DATA {
public uint DataLength;
public IntPtr Data;
}
NativeMethods.DHCP_SUBNET_ELEMENT_DATA_V5 element = new NativeMethods.DHCP_SUBNET_ELEMENT_DATA_V5();
element.ElementType = NativeMethods.DHCP_SUBNET_ELEMENT_TYPE.DhcpReservedIps;
element.ElementValue = AllocStructure(reservation);
try {
uint result = NativeMethods.DhcpRemoveSubnetElementV5(server.Address, subnet, ref element, NativeMethods.DHCP_FORCE_FLAG.DhcpFullForce);
if (result != NativeMethods.ERROR_SUCCESS)
throw new DhcpException(result, "DhcpRemoveSubnetElementV5");
}
finally {
Free();
}
}
}
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).