public static void StopDrive(int timeout_in) { int tmpResult1 = CApplicationAPI.EndApplication(out _mySError, timeout_in); if (tmpResult1 == 1) { O("EndApplication was executed sucessfully, result=1"); } else { O("EndApplication was NOT executed sucessfully, result=" + tmpResult1.ToString()); } int tmpResult2 = CApplicationAPI.CloseApi(); if (tmpResult2 == 1) { O("CloseApi was executed sucessfully, result=1"); } else { O("CloseApi was NOT executed sucessfully, result=" + tmpResult2.ToString()); } }