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

    How to Disable/Delete CDROM device?

    Hello Gurus
    I want to disable/ Delete CDROM device until the user is logged in by my Application. How to do it? I tried using FSCTL_LOCK_VOLUME and i had little luck. The thing is i am able to block reads as FSCTL_LOCK_VOLUME does not allow CD to be Read but I can use any utility to write my files on to the Device. IBM Record Now or Nero clearly writes into the CD eventhough i have my LOCK Set on the Device.

    Is there anyway to Disable the CDROM Device soi that no one can read/ write on to the device.

    Can anyone please point me some links how it can be done.

    Thanks a Lot for ur help
    Regards
    Kandukondein.

    PS:- IS Code guru website acting Very slow? It takes nearly 2 minutes to load Some pages like VC++ forum etc.,. DO other people witness the same behavior?
    C++ is divine.

  2. #2
    Join Date
    May 2005
    Posts
    4,954

    Re: How to Disable/Delete CDROM device?

    Quote Originally Posted by kandukondein
    Hello Gurus
    I want to disable/ Delete CDROM device until the user is logged in by my Application. How to do it?

    Is there anyway to Disable the CDROM Device soi that no one can read/ write on to the device.

    Can anyone please point me some links how it can be done.
    you can disable the CDROM device via the ::SetupDiXXX api.
    it will be disabled like you doing it manually in the device manager "Disable"

    if it is what you looking for then you can take a look at Devcon.exe supplied with microsoft DDK its a console app, there is also source code for that in the DDK.

    DevCon Command Line Utility Alternative to Device Manager

    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

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