Desktop Functions: Smart Device Functions:
|
DhcpEnumSubnets (dhcpsapi)
C# Signature:
[DllImport("dhcpsapi.dll", SetLastError = true, CharSet = CharSet.Unicode)] VB Signature:
Declare Unicode Function DhcpEnumSubnets Lib "Dhcpsapi" (ByVal ServerIpAddress As String, ByRef ResumeHandle As Integer, ByVal PreferredMaximum As Integer, ByRef EnumInfo As IntPtr, ByRef ElementsRead As Integer, ByRef ElementsTotal As Integer) As Integer User-Defined Types:Alternative Managed API:Do you know one? Please contribute it! Notes:ServerIpAddress - (in) Unicode string that specifies the IP address of the DHCP server ResumeHandle - (in, out) Pointer to a DHCP_RESUME_HANDLE value that identifies the enumeration operation. Initially, this value should be zero, with a successful call returning the handle value used for subsequent enumeration requests. For example, if PreferredMaximum is set to 100, and 200 subnet addresses are stored on the server, the resume handle can be used after the first 100 subnets are retrieved to obtain the next 100 on a subsequent call, and so forth. PreferredMaximum - (in) Specifies the preferred maximum number of subnet addresses to return. If the number of remaining unenumerated options is less than this value, then that amount will be returned EnumInfo - (out) Pointer to a DHCP_IP_ARRAY structure that contains the subnet IDs available on the DHCP server. If no subnets are defined, this value will be null. ElementsRead - (out) Pointer to a DWORD value that specifies the number of subnet addresses returned in EnumInfo. ElementsTotal - (out) Pointer to a DWORD value that specifies the number of subnets defined on the DHCP server that have not yet been enumerated Tips & Tricks:Make sure that ResumeHandle is 0 (zero) the first time you call this function. Sample Code:Please add some! Please edit this page!Do you have...
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). |
|