Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. need help on detecting the insertion of a USB device

need help on detecting the insertion of a USB device

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sowhat_82
    wrote on last edited by
    #1

    Hi all, I need to be able to do something when a particular USB device is connected. the closest i've come to understanding this topic is using the WM_DEVICECHANGE, but i'm not really sure how to use it. i've also found this webpage: http://msdn2.microsoft.com/en-us/library/aa363215.aspx it talks about how to handle an insertion of a CDROM. however, i'm also not really sure how to use this function. does the Main_OnDeviceChange function gets called automatically when a cd is inserted? how do i use this function in my MFC dialog based application? and i need to tweak it to detect the insertion of a USB device instead of a CD. can someone please help me! any help is greatly appreciated... thanks Loath

    P 1 Reply Last reply
    0
    • S sowhat_82

      Hi all, I need to be able to do something when a particular USB device is connected. the closest i've come to understanding this topic is using the WM_DEVICECHANGE, but i'm not really sure how to use it. i've also found this webpage: http://msdn2.microsoft.com/en-us/library/aa363215.aspx it talks about how to handle an insertion of a CDROM. however, i'm also not really sure how to use this function. does the Main_OnDeviceChange function gets called automatically when a cd is inserted? how do i use this function in my MFC dialog based application? and i need to tweak it to detect the insertion of a USB device instead of a CD. can someone please help me! any help is greatly appreciated... thanks Loath

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      refer this[^] article by Sam NG.

      Prasad Notifier using ATL | Operator new[],delete[][^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups