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#
  4. Determine removable disk type

Determine removable disk type

Scheduled Pinned Locked Moved C#
questionalgorithmshelp
3 Posts 2 Posters 1 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.
  • W Offline
    W Offline
    Wackatronic
    wrote on last edited by
    #1

    How can I determine if an audio CD or DVD is inserted? I already used the sample of detecting a disk being inserted/removed fron CP, but I need to determine i it's a movie or audio disk. I have been searching on Google and Yahoo all morning with no real sucess. Any help would be appreciated. Regards Eric C. Tomlinson

    No comment, Mr. Senator

    H 1 Reply Last reply
    0
    • W Wackatronic

      How can I determine if an audio CD or DVD is inserted? I already used the sample of detecting a disk being inserted/removed fron CP, but I need to determine i it's a movie or audio disk. I have been searching on Google and Yahoo all morning with no real sucess. Any help would be appreciated. Regards Eric C. Tomlinson

      No comment, Mr. Senator

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Detect what files are on the disk. If it's an Audio CD, Windows displays the CD data as .wav files (IIRC, it's been a long time since I actually looked - just try it). A movie CD (by which I assume you mean either a VCD or DVD) also contains certain file types. This is actually what Windows Explorer for XP does when you insert CDs. Sometimes it's quick because certain types of files can be detected quickly. Other types, you actually see it searching the disk's content. That's how it determines what items to display in the new Auto Run dialog for Windows XP. Note that Windows Explorer interprets data on an Audio CD differently than other platforms might. The CD is not really comprised of WAV files, but WAV data. It's up to the Window manager or other application to interpret that data and display it as files if so desired. It actually has more to do with file systems than anything.

      Microsoft MVP, Visual C# My Articles

      W 1 Reply Last reply
      0
      • H Heath Stewart

        Detect what files are on the disk. If it's an Audio CD, Windows displays the CD data as .wav files (IIRC, it's been a long time since I actually looked - just try it). A movie CD (by which I assume you mean either a VCD or DVD) also contains certain file types. This is actually what Windows Explorer for XP does when you insert CDs. Sometimes it's quick because certain types of files can be detected quickly. Other types, you actually see it searching the disk's content. That's how it determines what items to display in the new Auto Run dialog for Windows XP. Note that Windows Explorer interprets data on an Audio CD differently than other platforms might. The CD is not really comprised of WAV files, but WAV data. It's up to the Window manager or other application to interpret that data and display it as files if so desired. It actually has more to do with file systems than anything.

        Microsoft MVP, Visual C# My Articles

        W Offline
        W Offline
        Wackatronic
        wrote on last edited by
        #3

        So basically read the drive to determine/set the type of disk. I suspected this but was hoping you could query the system about it after insertion of the disk. I'm going to override the autoplay for certain types of files. Thanks again Heath for the short sweet answer and the good point in the correct direction. Regards Eric C. Tomlinson

        No comment, Mr. Senator

        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