CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 1998
    Posts
    1

    retrieving handle to CD drive



    I am writing an application for a system that has two CDs, one of which is a CD-RW. I need to tell which one I am looking at. I believe DeviceIOControl can give the information I need but I need the handle to the CD. I tried using CreateFile to get the handle but I keep getting a -1 returned. How do I use CreateFile correctly to retrive the handle of the CD?


    Thanks, Don.



  2. #2
    Join Date
    Jun 2001
    Posts
    1

    Re: retrieving handle to CD drive

    You can use PhysicalDrive[X] (where X could be any of 0-9 numbers)
    However this will not give you access to SCSI miniport ,if you famous will
    wnaspi32.dll adaptec tech.


  3. #3
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: retrieving handle to CD drive

    I went this route some time back trying to manipulate my Zip drive and after much consternation, discovered a documetn at MSDN.MIcrosoft.com stating the CreateFile API is not supported under VB ......period.

    John G

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