 |
if_indextoname ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Converts the local index for a network interface to the ANSI interface name. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
PCHAR WINAPI if_indextoname(
__in NET_IFINDEX InterfaceIndex,
__out PCHAR InterfaceName
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER if_indextoname IN Iphlpapi;
INTEGER InterfaceIndex,;
STRING @InterfaceName
|
 |
 |
 |
| Parameters: |
 |
InterfaceIndex
The local index for a network interface.
InterfaceName
A pointer to a buffer to hold the NULL-terminated ANSI string containing the interface name when the function returns successfully.
|
 |
 |
| Return value: |
 |
| On success, if_indextoname returns a pointer to NULL-terminated ANSI string containing the interface name. |
 |
 |
| Usage: |
 |
LOCAL cBuffer, nCount, nIndex
nCount = 0
= GetNumberOfInterfaces(@nCount)
FOR nIndex=1 TO nCount
cBuffer = REPLICATE(CHR(0), 64)
= if_indextoname(nIndex, @cBuffer)
? nIndex, STRTRAN(cBuffer, CHR(0), "")
NEXT
|
 |
 |
| My comment: |
 |
Minimum OS: Vista.
See also: if_nametoindex, GetNumberOfInterfaces, GetIfEntry |
 |
 |
| Word Index links for the if_indextoname : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2008-01-08 10:41:01 | | Modified: | 2010-05-19 22:14:10 | Visited in last 7 days: 14 |