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. Want to control a plugged in USB storage drive

Want to control a plugged in USB storage drive

Scheduled Pinned Locked Moved C / C++ / MFC
3 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.
  • B Offline
    B Offline
    Biju Raman
    wrote on last edited by
    #1

    I need to create an application that controls a USB storage device just plugged in. When I use WM_DEVICECHANGE notification, I am able to get the details of plugged in device like any other applications registered for a notification. Instead of being one such application that handles notification, I want to take charge of the USB device from the moment it is plugged in. (I guess it need some driver programming) Kindly provide a solution for the same. Biju Raman K

    C 1 Reply Last reply
    0
    • B Biju Raman

      I need to create an application that controls a USB storage device just plugged in. When I use WM_DEVICECHANGE notification, I am able to get the details of plugged in device like any other applications registered for a notification. Instead of being one such application that handles notification, I want to take charge of the USB device from the moment it is plugged in. (I guess it need some driver programming) Kindly provide a solution for the same. Biju Raman K

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Biju Raman wrote:

      Instead of being one such application that handles notification, I want to take charge of the USB device from the moment it is plugged in.

      What do you mean by taking charge of it ? It is a storage device so you can access it like a standard 'hard-drive' if you want to read or write files. What's the problem exactly ? What are you trying to do ?


      Cédric Moonen Software developer
      Charting control [Updated - v1.1]

      B 1 Reply Last reply
      0
      • C Cedric Moonen

        Biju Raman wrote:

        Instead of being one such application that handles notification, I want to take charge of the USB device from the moment it is plugged in.

        What do you mean by taking charge of it ? It is a storage device so you can access it like a standard 'hard-drive' if you want to read or write files. What's the problem exactly ? What are you trying to do ?


        Cédric Moonen Software developer
        Charting control [Updated - v1.1]

        B Offline
        B Offline
        Biju Raman
        wrote on last edited by
        #3

        Dear Cedric Moonen, Thanks for your prompt reply!, and of course sorry for my delay! Actually, I am writing a program that need to taking charge of the USB drives being plugged in and authorizing it. When a drive is being plugged in, I could use the wm_devicechange message handler. LRESULT CMyDialog::OnMyDeviceChange(WPARAM wParam, LPARAM lParam) { EnumUSBDevices(); CString strDrive; for(int i=0; i

        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