Microsoft KB Archive/186312

From BetaArchive Wiki

Intrfc.exe Programmatically Retrieves IP Interface Info.

Q186312



The information in this article applies to:


  • Microsoft Windows NT Server version 4.0
  • Microsoft Windows NT Workstation version 4.0
  • Microsoft Windows 98
  • Microsoft Windows 95
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional





SUMMARY

Intrfc.exe is a sample that demonstrates how to programmatically enumerate IP interface information, such as a system's IP address, subnet mask, and broadcast address, using the WSAIoctl() API with the SIO_GET_INTERFACE_LIST option. In addition, Intrfc.exe demonstrates how to interpret IP status flags for each IP interface. The flags are defined in the Windows Sockets 2 Protocol-Specific Annex specification which can be found in the January 98 MSDN Platform SDK or later.



MORE INFORMATION

If you are using Windows NT 4.0 with Service Pack 3 or earlier, there is a problem with the SIO_GET_INTERFACE_LIST option. Please see the following knowledge base article for further information:

For additional information, please see the following article in the Microsoft Knowledge Base:

Q181520 BUG: WSAIoctl SIO_GET_INTERFACE_LIST Option Problem

The following file is available for download from the Microsoft Download Center:


Intrfc.exe

For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

Q119591 How to Obtain Microsoft Support Files from Online Services

Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.



Intrfc.exe contains the following files:

  • Readme.txt.
  • Intrfc.cpp: The main source code module for this sample.
  • Makefile: The compiler control file to generate an executable for Intrfc.exe.

To compile this application, simply execute NMake.exe from the command line and it will generate Intrfc.exe.

To run this application, simply execute Interface.exe.

Additional query words:

Keywords : kbfile kbnetwork kbsample kbAPI kbIP kbOSWinNT400 kbOSWin2000 kbSDKPlatform kbOSWin95 kbOSWin98 kbWinsock kbGrpDSNet
Issue type :
Technology : kbWinNTsearch kbWinNTWsearch kbWinNTW400 kbWinNTW400search kbWinNT400xsearch kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000Serv kbWinNTSsearch kbWinNTS400xsearch kbWinNTS400 kbwin2000ServSearch kbwin2000Search kbwin2000ProSearch kbwin2000Pro kbWin95search kbWin98search kbWinAdvServSearch kbZNotKeyword3 kbWin98


Last Reviewed: December 16, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.