Managing Network Adapters (Windows CE 5.0)
IP Helper provides capabilities for managing network adapters. The functions described following are used to retrieve information about the network adapters in the local computer.
Interfaces are related to adapters in that there is a one-to-one correspondence between the interfaces and adapters on a given computer. An interface is an IP-level abstraction, whereas an adapter is a datalink-level abstraction.
The GetAdaptersInfo function returns an array of IP_ADAPTER_INFO structures, one for each adapter in the local computer. The GetPerAdapterInfo function returns additional information about a specific adapter. The GetPerAdapterInfo function requires the caller to specify the index of the adapter. To obtain the adapter index from the adapter name, use the GetAdapterIndex function.
The following table describes each GetAdaptersInfo variable and IP_ADAPTER_INFO member.
Value | Description |
---|---|
pAdapterInfo | (Read-only) Pointer to a buffer that, on successful return, receives a linked list of IP_ADAPTER_INFO structures. |
pOutBufLen | (Read-only) Pointer to a ULONG variable that contains the size of the buffer pointed to by the pAdapterInfo parameter. If this size is insufficient to hold the adapter information, GetAdaptersInfo fills this variable with the required size, and returns an error code of ERROR_BUFFER_OVERFLOW. |
IP_ADAPTER_INFO
(All fields are read-only, they cannot be changed by the API user.) |
Next
ComboIndex
AdapterName[MAX_ADAPTER_NAME_LENGTH + 4]
Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4]
AddressLength
Address[MAX_ADAPTER_ADDRESS_LENGTH]
Index
Type
DhcpEnabled
CurrentIpAddress
IpAddressList
GatewayList
DhcpServer
HaveWins
PrimaryWinsServer
SecondaryWinsServer
LeaseObtained
LeaseExpires
|
The following table describes each GetPerAdapterInfo variable and IP_PER_ADAPTER_INFO member.
Value | Description |
---|---|
IfIndex | Specifies the index of an interface. GetPerAdapterInfo will retrieve information for the adapter corresponding to this interface. |
pPerAdapterInfo | Pointer to an IP_PER_ADAPTER_INFO structure that, on successful return, contains information about the adapter. |
pOutBufLen | Pointer to a ULONG variable that specifies the size of the IP_PER_ADAPTER_INFO structure. If this size is insufficient to hold the information, GetPerAdapterInfo fills in this variable with the required size, and returns an error code of ERROR_BUFFER_OVERFLOW. |
IP_PER_ADAPTER_INFO (All fields are read-only, they cannot be changed by the API user.) |
AutoconfigEnabled
AutoconfigActive
CurrentDnsServer
DnsServerList
|
The following table describes each GetAdapterIndex variable.
Value | Description |
---|---|
AdapterName | Pointer to a Unicode string that contains the name of the adapter. |
IfIndex | Pointer to a ULONG variable that, on successful return, points to the index of the adapter. |
See Also
Send Feedback on this topic to the authors