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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. send scsi command to usb device using DeviceIoControl method

send scsi command to usb device using DeviceIoControl method

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studioquestion
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.
  • A Offline
    A Offline
    Anil Veeraghattapu 4
    wrote on last edited by
    #1

    HI i want to make the usb device read only i already opened the handle for the usb device now i need to send scsi command to usb device to make it read only aftert that i will appy dacl to that now i need to know which scsi command i need to pass to the usb device and how can i pass that command to usb device using DeviceIoControl i am using VC++ and visual studio 2005 thanks Anil Veeraghattapu.

    L 1 Reply Last reply
    0
    • A Anil Veeraghattapu 4

      HI i want to make the usb device read only i already opened the handle for the usb device now i need to send scsi command to usb device to make it read only aftert that i will appy dacl to that now i need to know which scsi command i need to pass to the usb device and how can i pass that command to usb device using DeviceIoControl i am using VC++ and visual studio 2005 thanks Anil Veeraghattapu.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      As far as I know there is no standard IOCTL for making a USB removable disk/volume read-only. You can lock a volume on the drive with the FSCTL_LOCK_VOLUME Control Code[^]. The following Microsoft help and support article will show you how to use the function. Have a look at the LockVolume() function. How To Ejecting Removable Media in Windows NT/Windows 2000/Windows XP[^] Best Wishes, -David Delaune

      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