From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Get Network Card Information Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This example uses system calls to gather IP information of the computer the program is running on.

 

Description

This example uses system calls to gather IP information of the computer the program is running on. It does return information for all currently installed network adapters including their MAC address, status, and data traffic Special measures are taken for error handling as well as how to decode the network information.The code uses call library function nodes to access the Win API kernel32 for network information. The information is first checked to make sure it fills a specific buffer size. The information is then decoded by shifting High Bytes with low bytes as well as another call to the Win API. This code takes advantage of LabVIEW’s ability to run DLLs from other programming environments.

 

Requirements

Software:

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

1. Run VI.
2. Observe the network card information.

 

Additional Information or Resources

 2012.png

 

 

**This document has been updated to meet the current required format for the NI Code Exchange

 

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.