Programs that using a usb drive..... RRS feed

  • Question

  • Hi all,

     How can we trace the name or location of, programs or files which accessing usb drive????(using vb.net)

    ie, to know the details about which all programs are accessing a Usb Drive???(using vb.net)

    In my system, when i tries to "safely Remove Hardware",, it shows an error msg like "This cant be removed,its being used by another program(s)!!".

    How can i close or kill all the programs that accessing my usb disk, using vb.net???

    I think, using this concept i can create a small anti-virus for my own use.....

    so plz help me.....  

    • Moved by Karel ZikmundMicrosoft employee Wednesday, October 7, 2009 5:12 PM Not a .NET 4.0 specific question (From:.NET Framework 4 Application Compatibility - Beta 1)
    Wednesday, October 7, 2009 11:09 AM


  • I don't think there will be special .NET API for this. First try to figure out how to do it using Windows API, then call those APIs via PInvoke from VB.NET.
    Wednesday, October 7, 2009 5:11 PM