Datalogic .NET SDK
GetHardwareInfo (Method)
Syntax
public static Boolean GetHardwareInfo(out Int32 hardware);
Description
This function retrieves information about what hardware is present in the device.
Parameters Table
|
Type |
Parameter |
Description |
[out] |
Int32 |
hardware |
The value returned is a combination of bits which indicate the hardware capabilities of the device. Bits are OR'ed together from the Device.HardwareOptions enum. |
|
|
|
|
[returns] |
Boolean
|
|
TRUE if the function succeeds, FALSE otherwise. |
[on error] |
FALSE |
|
- |
Example
private void btnGetHwInfo_Click(object sender, EventArgs e) {
/* Device.GetHardwareInfo() */ int ENUM_HwOpt = 0; bool b = false;
b = Device.GetHardwareInfo(out ENUM_HwOpt);
if(((uint)ENUM_HwOpt & (uint)Device.HardwareOptions.Bluetooth) != 0) listView1.Items.Add(new ListViewItem(new string[] { Device.HardwareOptions.Bluetooth.ToString(), String.Empty }));
if (((uint)ENUM_HwOpt & (uint)Device.HardwareOptions.Camera) != 0) listView1.Items.Add(new ListViewItem(new string[] { Device.HardwareOptions.Camera.ToString(), String.Empty }));
if (((uint)ENUM_HwOpt & (uint)Device.HardwareOptions.GPS) != 0) listView1.Items.Add(new ListViewItem(new string[] { Device.HardwareOptions.GPS.ToString(), String.Empty }));
if (((uint)ENUM_HwOpt & (uint)Device.HardwareOptions.GSensor) != 0) listView1.Items.Add(new ListViewItem(new string[] { Device.HardwareOptions.GSensor.ToString(), String.Empty }));
if (((uint)ENUM_HwOpt & (uint)Device.HardwareOptions.Vibrator) != 0) listView1.Items.Add(new ListViewItem(new string[] { Device.HardwareOptions.Vibrator.ToString(), String.Empty }));
if (((uint)ENUM_HwOpt & (uint)Device.HardwareOptions.WWAN) != 0) listView1.Items.Add(new ListViewItem(new string[] { Device.HardwareOptions.WWAN.ToString(), String.Empty }));
}
|
See Also
Device.HardwareOptions (Enum), Example #025.
Copyright © Datalogic ADC. All Right Reserved