Datalogic .NET SDK
WiFiGetMacAddress (Method)
Syntax
public static Boolean WiFiGetMacAddress(out Byte[] macAddress);
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
Copyright © Datalogic ADC. All Right Reserved