none
how we can USB indication show in app. mean when we connected USB message show in app that "USB connected"??? RRS feed

  • Question

  • void save()
            {
                try
                {
                    //save logs history, you can edit as you wish
                    System.IO.StreamWriter sw = new System.IO.StreamWriter(@"C:\\Windows\System32\drivers\etc\\logsdrcl.dat");
                    foreach (object item in List.Items)
                        sw.WriteLine(item.ToString());
                    sw.Close();
                }
    
                catch (System.Exception)
                {
    
                }}

    Saturday, August 23, 2014 9:39 AM

Answers

  • in c/c++ you use RegisterDeviceNotification. There is no wrapper in c# so you will need to pinvoke to this API. You will also need a window handle (HWND)

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Saturday, August 23, 2014 7:09 PM