MAC Address Information in LabWindows™/CVI™

Updated May 14, 2018

Reported In

Software

  • LabWindows/CVI

Issue Details

I would like to protect my CVI application based on the MAC Address of the computer. 
How do I get the MAC Address information in LabWindows/CVI?

 

Solution

You can retrieve the MAC Address and other NET information by using the Win32 API library. 
There are two methods:
1. Using WMI (Windows Management Instrumentation) API . 
An example can be found here: 

2. Using the NetBIOS function from the NetAPI32.dll. 
An example can be found here:
Getting the MAC Address for an Ethernet Adapter

 

Additional Information

The Interface to the Win32 API is a collection of import libraries, header files, help files, code samples, and utility programs for Win32 operating system development. 

The Win32 API can be added to a C programming project by including the <windows.h> header file and linking to the appropriate libraries.

More information about how to call Win32 API in LabWindows/CVI can be found here:

Calling Interface to Win32 API Functions in LabWindows/CVI


 

WAS THIS ARTICLE HELPFUL?

Not Helpful