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. Hardware & Devices
  4. What's the criteria for detecting a replaced CD? (Windows)

What's the criteria for detecting a replaced CD? (Windows)

Scheduled Pinned Locked Moved Hardware & Devices
helpquestion
5 Posts 3 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.
  • K Offline
    K Offline
    kakan
    wrote on last edited by
    #1

    Hello. My program burns CD's/DVD's. Those CD/DVD's are sent out to a lot of receivers, countrywide. Now, I've got error reports from some people who claims that the two CD's they got is identical to eachother. That is not the case. The CD's in question got the same volume label, the same anount of files, with identical file names. But the content of the files differ. When the receiver has read the first CD, ejects it and puts in CD No 2, the information doesn't change (due to the fact that the driver cdrom.sys doesn't notice the changed CD, I guess). And the content of the files (from the first CD) seems cached, so the user sees the files from CD No 1, despite the fact that CD No2 is inserted. F5 doesn't help, since the file system doesn't become refreshed. If the user reads a completely different CD between "my" CD's, the file system is refreshed and the information is correct. My question: What's the criteria (in cdrom.sys) for detecting a replaced CD in the CD-ROM drive? Different volume label, or what? This problem drives "my CD readers" go nuts, and then it hits me... TIA.

    Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

    modified on Wednesday, September 23, 2009 6:19 AM

    L H 2 Replies Last reply
    0
    • K kakan

      Hello. My program burns CD's/DVD's. Those CD/DVD's are sent out to a lot of receivers, countrywide. Now, I've got error reports from some people who claims that the two CD's they got is identical to eachother. That is not the case. The CD's in question got the same volume label, the same anount of files, with identical file names. But the content of the files differ. When the receiver has read the first CD, ejects it and puts in CD No 2, the information doesn't change (due to the fact that the driver cdrom.sys doesn't notice the changed CD, I guess). And the content of the files (from the first CD) seems cached, so the user sees the files from CD No 1, despite the fact that CD No2 is inserted. F5 doesn't help, since the file system doesn't become refreshed. If the user reads a completely different CD between "my" CD's, the file system is refreshed and the information is correct. My question: What's the criteria (in cdrom.sys) for detecting a replaced CD in the CD-ROM drive? Different volume label, or what? This problem drives "my CD readers" go nuts, and then it hits me... TIA.

      Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

      modified on Wednesday, September 23, 2009 6:19 AM

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

      kakan wrote:

      The CD's in question got the same volume label, the same anount of files, with identical file names.

      Well I guess Windows may not be able to guess that the contents of the files is different.

      K 1 Reply Last reply
      0
      • L Lost User

        kakan wrote:

        The CD's in question got the same volume label, the same anount of files, with identical file names.

        Well I guess Windows may not be able to guess that the contents of the files is different.

        K Offline
        K Offline
        kakan
        wrote on last edited by
        #3

        I know how it works for diskettes, since I modified Windows diskette driver (a long time ago). The diskette driver compares the diskettes serial number to the serial number gotten from the previous access to the diskette. But for a CD/DVD? Maybe I should get a copy of the source code for cdrom.sys and examine it. I'm not sure I got the time for it. I think I'll hang around CP a while before trying that.

        Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

        1 Reply Last reply
        0
        • K kakan

          Hello. My program burns CD's/DVD's. Those CD/DVD's are sent out to a lot of receivers, countrywide. Now, I've got error reports from some people who claims that the two CD's they got is identical to eachother. That is not the case. The CD's in question got the same volume label, the same anount of files, with identical file names. But the content of the files differ. When the receiver has read the first CD, ejects it and puts in CD No 2, the information doesn't change (due to the fact that the driver cdrom.sys doesn't notice the changed CD, I guess). And the content of the files (from the first CD) seems cached, so the user sees the files from CD No 1, despite the fact that CD No2 is inserted. F5 doesn't help, since the file system doesn't become refreshed. If the user reads a completely different CD between "my" CD's, the file system is refreshed and the information is correct. My question: What's the criteria (in cdrom.sys) for detecting a replaced CD in the CD-ROM drive? Different volume label, or what? This problem drives "my CD readers" go nuts, and then it hits me... TIA.

          Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

          modified on Wednesday, September 23, 2009 6:19 AM

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          This may be too late for your purposes, but I have only just seen your question. Take a look at How to receive notification of CD-ROM insertion or removal[^] on MSDN. Google could have saved you a lot of time! :)

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          K 1 Reply Last reply
          0
          • H Henry Minute

            This may be too late for your purposes, but I have only just seen your question. Take a look at How to receive notification of CD-ROM insertion or removal[^] on MSDN. Google could have saved you a lot of time! :)

            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

            K Offline
            K Offline
            kakan
            wrote on last edited by
            #5

            Hello. I did at lot of Googling about the subject. The article you are referring, talks about receiveing and handling WM_DEVICECHANCE messages. In this case, there are no such messsage, and that's the problem. My guess is that it's a driver issue. My question was (and still is): What's the mechanism for the driver to detect that the CD/DVD has been replaced (and consequently send a WM_DEVICECHANCE message)? In other words: What do I have to do with the CD's/DVD's in order to make Windows (and it's cdrom driver) discover that CD/DVD has been replaced?

            Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

            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