Esempio n. 1
0
 public static void Cleanup()
 {
     if (m_read_thread.IsAlive)
     {
         Kill_Read_Thread();
     }
     USBWrite.Kill_Write_Thread();
     USBWrite.Dispose_Of_Write_Objects();
     Utilities.CloseHandle(Utilities.m_flags.HID_write_handle);
     Utilities.CloseHandle(Utilities.m_flags.HID_read_handle);
     m_usb_packet_mutex.Close();
 }
Esempio n. 2
0
 public static void Cleanup()
 {
     if (USBRead.Read_Thread_Is_Active())
     {
         USBRead.Kill_Read_Thread();
         Thread.Sleep(500);
     }
     USBWrite.Kill_Write_Thread();
     USBWrite.Dispose_Of_Write_Objects();
     Utilities.CloseHandle(Utilities.m_flags.HID_write_handle);
     Utilities.CloseHandle(Utilities.m_flags.HID_read_handle);
     Utilities.m_flags.g_status_packet_data_update_event.Close();
     Utilities.m_flags.g_data_arrived_event.Close();
     Utilities.m_flags.g_bl_data_arrived_event.Close();
     Utilities.m_flags.g_status_packet_mutex.Close();
     Utilities.m_flags.g_PKSA_has_completed_script.Close();
     USBRead.m_usb_packet_mutex.Close();
     USBRead.m_cbuf2_data_array_mutex.Close();
 }