Datalogic .NET SDK

WiFiGetMacAddress (Method)

 

Syntax

 

   public static Boolean WiFiGetMacAddress(out Byte[] macAddress);

 

 

Class                           : Device

Namespace                : Datalogic.API

Assembly                   : Datalogic.API.DLL

 

 

Description

Retrieves the MAC address of the WiFi adapter.

 

 

Parameters Table

 

Type

Parameter

Description

[out]

Byte[]

macAddress

The MAC address of the WiFi adapter.

 

 

 

 

[returns]

Boolean

 

A value of TRUE is returned on success.

[on error]

FALSE

 

FALSE is returned to indicate failure.

 

 

Example

      

       private void btnWifiPwr_Click(object sender, EventArgs e)

       {

            bool b = false;

            bool bSuccess = false;

            byte[] macAddress = new byte[13];

            string s = string.Empty;

 

            bSuccess = Device.SetWiFiPowerState(!bWifiEnabled);

            bWifiEnabled = Device.GetWiFiPowerStatus();

 

            if (bWifiEnabled)

            {

 

                b = Device.WiFiGetMacAddress(out macAddress);

                for (int i = 0; i < macAddress.Length; i++)

                {

                    s += macAddress [i].ToString();

                }

                txtWifiMacAddr.Text = s;

             }

       }

 

 

 

See Also

Example #38.

 

Copyright © Datalogic ADC. All Right Reserved