CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: USB Monitor

  1. #1
    Join Date
    Jul 2008
    Posts
    107

    USB Monitor

    Hi all

    i have found a artical which is monitor a USB Drive and one option is there for disable.But problem is that when i chose the option of disable then it is Showing disable but when i attched again USB Drive then also showing disable.

    This is a link
    Code:
    http://www.codeproject.com/KB/system/HwDetect.aspx
    i want to set the option of Enable also.When i chose the option of enable then USB Drive Show me enable.And i have no idea about that so plz tell help me..

    Thx's in Advance
    Last edited by vcprog; August 4th, 2008 at 01:02 AM.

  2. #2
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: USB Monitor

    Do you really want to disable, or just dismount? Big difference.

    -Erik

  3. #3
    Join Date
    Jul 2008
    Posts
    107

    Re: USB Monitor

    Quote Originally Posted by egawtry
    Do you really want to disable, or just dismount? Big difference.

    -Erik
    Thx's for reply..

    I am new,i think you are right DISMOUNT..

    Plz help me

  4. #4
    Join Date
    Jul 2008
    Posts
    107

    Re: USB Monitor

    Plz help me ...

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: USB Monitor

    Well, what is your problem? You are trying to apply this HwDetect software to the purposes it was NOT designed for. Aren't you?
    From thin article:
    Introduction

    Hot-pluggable device is now a big threat to IT security. In this article, we will try to develop a user-mode application to detect device change on the system, i.e. plug-in a USB drive, iPod, USB wireless network card, etc. The program can also disable any newly plugged devices. We will get a basic idea on how this works and talk about its limitations at the end of this article.
    So, the author don't mention this software could enable, mount or dismount any plugged devices: it only can detect and disable.
    Last edited by VictorN; August 5th, 2008 at 03:22 AM.
    Victor Nijegorodov

  6. #6
    Join Date
    Dec 2007
    Posts
    17

    Re: USB Monitor

    Quote Originally Posted by vcprog
    Hi all

    i have found a artical which is monitor a USB Drive and one option is there for disable.But problem is that when i chose the option of disable then it is Showing disable but when i attched again USB Drive then also showing disable.

    This is a link
    Code:
    http://www.codeproject.com/KB/system/HwDetect.aspx
    i want to set the option of Enable also.When i chose the option of enable then USB Drive Show me enable.And i have no idea about that so plz tell help me..

    Thx's in Advance
    something i would like to remind you that:
    .that exe only works for xp or possibly lower winos
    .these days, many worms are spread via usb. none of them passes my mini search engine- i made it for personal use, really rocky minitool by minibear!

  7. #7
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: USB Monitor

    Quote Originally Posted by vcprog
    Thx's for reply..

    I am new,i think you are right DISMOUNT..

    Plz help me
    Take a look at the SetupDi functions. Ex. SetupDiRemoveDevice().

    -Erik

  8. #8
    Join Date
    Jul 2008
    Posts
    107

    Re: USB Monitor

    Quote Originally Posted by VictorN
    Well, what is your problem? You are trying to apply this HwDetect software to the purposes it was NOT designed for. Aren't you?
    From thin article:So, the author don't mention this software could enable, mount or dismount any plugged devices: it only candetect and disable.
    Thx's for reply

    So can you tell me how can i set the property of enable and desble USB Port. Plz help i am new in progrramer..

  9. #9
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: USB Monitor

    Quote Originally Posted by vcprog
    Thx's for reply
    You are welcome.

    Quote Originally Posted by vcprog
    So can you tell me how can i set the property of enable and desble USB Port. Plz help i am new in progrramer..
    Use the SetupDi functions to enumerate the PC's USB connections. In your case you are looking for the Mass Storage devices. Once you have the handle to the device, use the specific SetupDi function (as I mentioned before) to enable, disable, etc. Read the section on SetupDi in the Help.

    -Erik

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured