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#
  4. Get used space of DVD disc

Get used space of DVD disc

Scheduled Pinned Locked Moved C#
question
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.
  • N Offline
    N Offline
    ndkit
    wrote on last edited by
    #1

    Currently, I use IMAPI library to get the used space of DVD disc on Win7. The calculation is start when insert DVD (handle by WM_DEVICECHANGE window event). However, with multi session disk (disk that is write many time without finalize), sometime it takes long time to get used space (double when comparing with Window Explorer). I also investigated and found some other ways to get used space (use IOCTL_DISK_GET_DRIVE_GEOMETRY, IOCTL_SCSI_PASS_THROUGH_DIRECT). The calculating time is improved but result is different from Window result. I also wonder there is any way that I can reuse the result of window (window also calculated the used space right after insert DVD) without re-calculating? Or any one else to calculate the used space? Thank you for your interested and helping me.

    A 1 Reply Last reply
    0
    • N ndkit

      Currently, I use IMAPI library to get the used space of DVD disc on Win7. The calculation is start when insert DVD (handle by WM_DEVICECHANGE window event). However, with multi session disk (disk that is write many time without finalize), sometime it takes long time to get used space (double when comparing with Window Explorer). I also investigated and found some other ways to get used space (use IOCTL_DISK_GET_DRIVE_GEOMETRY, IOCTL_SCSI_PASS_THROUGH_DIRECT). The calculating time is improved but result is different from Window result. I also wonder there is any way that I can reuse the result of window (window also calculated the used space right after insert DVD) without re-calculating? Or any one else to calculate the used space? Thank you for your interested and helping me.

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      WMI may come to your aid - check out the Win32_CDROMDrive class[^].

      Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial

      N 1 Reply Last reply
      0
      • A Abhinav S

        WMI may come to your aid - check out the Win32_CDROMDrive class[^].

        Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial

        N Offline
        N Offline
        ndkit
        wrote on last edited by
        #3

        Can you explain more detail? I search and found the way to get all properties from Win32_CDROMDrive. However, the capacity information of DVD Drive seems not to be retrieved.

        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