private void deviceConnect() { uint uret = deviceCalls.amDeviceConnect(device.getDevPtr()); if (uret != 0) { throw new Exception("ERROR of execution amDeviceConnect, result is " + uret); } }
public String getDeviceValue(IntPtr devPtr, String valueName) { deviceCalls.amDeviceConnect(devPtr); IntPtr domain = String2CFString(valueName); IntPtr result = deviceCalls.amDeviceCopyValue(devPtr, IntPtr.Zero, domain); deviceCalls.amDeviceDisconnect(devPtr); if (result != IntPtr.Zero) { return(CFString2String(result)); } return(String.Empty); }