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 / C++ / MFC
  4. How to detect Floppy Arrival

How to detect Floppy Arrival

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
14 Posts 5 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.
  • V Offline
    V Offline
    VC_RYK
    wrote on last edited by
    #1

    Hi guys i want to detect Floppy arrival but 'WM_DEVICECHANGE' does not work for floppy so is there anyway to detect Floppy arrival. with regards RYK

    T N 2 Replies Last reply
    0
    • V VC_RYK

      Hi guys i want to detect Floppy arrival but 'WM_DEVICECHANGE' does not work for floppy so is there anyway to detect Floppy arrival. with regards RYK

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      VC_RYK wrote:

      i want to detect Floppy arrival but 'WM_DEVICECHANGE' does not work for floppy so is there anyway to detect Floppy arrival.

      Actually Floppy Drive doesn't work the way CD Drive work. I mean, you could simply put Floppy in the drive, but to make Computer aware you have to click on floppy icon, which is not in case of cd drive. thats just my logical conclusion!

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
      Never mind - my own stupidity is the source of every "problem" - Mixture

      cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

      H J 2 Replies Last reply
      0
      • T ThatsAlok

        VC_RYK wrote:

        i want to detect Floppy arrival but 'WM_DEVICECHANGE' does not work for floppy so is there anyway to detect Floppy arrival.

        Actually Floppy Drive doesn't work the way CD Drive work. I mean, you could simply put Floppy in the drive, but to make Computer aware you have to click on floppy icon, which is not in case of cd drive. thats just my logical conclusion!

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
        Never mind - my own stupidity is the source of every "problem" - Mixture

        cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        I think its not good way but he can uses of SetCurrentDirectory check return value if its nonzero it has floppy.

        T 1 Reply Last reply
        0
        • H Hamid Taebi

          I think its not good way but he can uses of SetCurrentDirectory check return value if its nonzero it has floppy.

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          Hamid. wrote:

          I think its not good way but he can uses of SetCurrentDirectory check return value if its nonzero it has floppy.

          But you have to poll regularly for that.. i don't think thats good design and could present user headache, as if floppy is corrupt, it could hang the system!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
          Never mind - my own stupidity is the source of every "problem" - Mixture

          cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

          H 1 Reply Last reply
          0
          • T ThatsAlok

            Hamid. wrote:

            I think its not good way but he can uses of SetCurrentDirectory check return value if its nonzero it has floppy.

            But you have to poll regularly for that.. i don't think thats good design and could present user headache, as if floppy is corrupt, it could hang the system!

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
            Never mind - my own stupidity is the source of every "problem" - Mixture

            cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            Well I said its not good idea but I dont think it hang the system.

            T 1 Reply Last reply
            0
            • T ThatsAlok

              VC_RYK wrote:

              i want to detect Floppy arrival but 'WM_DEVICECHANGE' does not work for floppy so is there anyway to detect Floppy arrival.

              Actually Floppy Drive doesn't work the way CD Drive work. I mean, you could simply put Floppy in the drive, but to make Computer aware you have to click on floppy icon, which is not in case of cd drive. thats just my logical conclusion!

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
              Never mind - my own stupidity is the source of every "problem" - Mixture

              cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

              J Offline
              J Offline
              James R Twine
              wrote on last edited by
              #6

              PC floppy drives have (or used to have) a active low Disc Change line, which went high (1) when the drive was empty and was low (0) when a disc was inserted.    Not sure if/how you can get direct access to that line on Win32, though...    Maybe there is an LVM routine that can be used?    Peace!

              -=- James
              Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
              Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
              See DeleteFXPFiles

              1 Reply Last reply
              0
              • H Hamid Taebi

                Well I said its not good idea but I dont think it hang the system.

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #7

                Hamid. wrote:

                Well I said its not good idea but I dont think it hang the system.

                well you have to test that yourself ;P try putting corrupt floppy into your computer and acess it through My COmputer!

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                Never mind - my own stupidity is the source of every "problem" - Mixture

                cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                H 1 Reply Last reply
                0
                • T ThatsAlok

                  Hamid. wrote:

                  Well I said its not good idea but I dont think it hang the system.

                  well you have to test that yourself ;P try putting corrupt floppy into your computer and acess it through My COmputer!

                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                  Never mind - my own stupidity is the source of every "problem" - Mixture

                  cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  I dont use of floppy disk.;P

                  T 1 Reply Last reply
                  0
                  • V VC_RYK

                    Hi guys i want to detect Floppy arrival but 'WM_DEVICECHANGE' does not work for floppy so is there anyway to detect Floppy arrival. with regards RYK

                    N Offline
                    N Offline
                    Naveen
                    wrote on last edited by
                    #9

                    with the help of WMI, you can find out the arrival and removal of floppy drives and offourse all other drives.

                    nave [OpenedFileFinder]

                    T 1 Reply Last reply
                    0
                    • H Hamid Taebi

                      I dont use of floppy disk.;P

                      T Offline
                      T Offline
                      ThatsAlok
                      wrote on last edited by
                      #10

                      Hamid. wrote:

                      I dont use of floppy disk.

                      USe ZIP Drive then ;P

                      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                      Never mind - my own stupidity is the source of every "problem" - Mixture

                      cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                      H 1 Reply Last reply
                      0
                      • N Naveen

                        with the help of WMI, you can find out the arrival and removal of floppy drives and offourse all other drives.

                        nave [OpenedFileFinder]

                        T Offline
                        T Offline
                        ThatsAlok
                        wrote on last edited by
                        #11

                        Naveen.R wrote:

                        with the help of WMI, you can find out the arrival and removal of floppy drives and offourse all other drives.

                        Hi Naveen, could you please help me in finding out the exact WMI Class , which could help me in this purpose.. it could work as wonderfull tip for my FAQ site. if you allow i will publish that with you name. Thanks Alok

                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                        Never mind - my own stupidity is the source of every "problem" - Mixture

                        cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                        H N 2 Replies Last reply
                        0
                        • T ThatsAlok

                          Hamid. wrote:

                          I dont use of floppy disk.

                          USe ZIP Drive then ;P

                          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                          Never mind - my own stupidity is the source of every "problem" - Mixture

                          cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                          H Offline
                          H Offline
                          Hamid Taebi
                          wrote on last edited by
                          #12

                          Ok:laugh:

                          1 Reply Last reply
                          0
                          • T ThatsAlok

                            Naveen.R wrote:

                            with the help of WMI, you can find out the arrival and removal of floppy drives and offourse all other drives.

                            Hi Naveen, could you please help me in finding out the exact WMI Class , which could help me in this purpose.. it could work as wonderfull tip for my FAQ site. if you allow i will publish that with you name. Thanks Alok

                            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                            Never mind - my own stupidity is the source of every "problem" - Mixture

                            cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                            H Offline
                            H Offline
                            Hamid Taebi
                            wrote on last edited by
                            #13

                            I saw two classes Win32_FloppyController/Win32_FloppyDrive.

                            1 Reply Last reply
                            0
                            • T ThatsAlok

                              Naveen.R wrote:

                              with the help of WMI, you can find out the arrival and removal of floppy drives and offourse all other drives.

                              Hi Naveen, could you please help me in finding out the exact WMI Class , which could help me in this purpose.. it could work as wonderfull tip for my FAQ site. if you allow i will publish that with you name. Thanks Alok

                              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                              Never mind - my own stupidity is the source of every "problem" - Mixture

                              cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                              N Offline
                              N Offline
                              Naveen
                              wrote on last edited by
                              #14

                              ThatsAlok wrote:

                              could you please help me in finding out the exact WMI Class

                              Any thing for you sir :) Actaully I tried this for one of my project requirment. I used the ExecNotificationQueryAsync() function with the following query. HRESULT hres = pSvc->ExecNotificationQueryAsync( _bstr_t("WQL"), _bstr_t("SELECT *" "FROM __InstanceOperationEvent WITHIN 1 " "WHERE TargetInstance ISA 'Win32_LogicalDisk'"), WBEM_FLAG_SEND_STATUS, NULL, pStubSink ); And in the notification handler we can check the instance is __InstanceCreationEvent and __InstanceDeletionEvent for any drive arrival or removal. But if you want disk arrival or removal you may need to handle the __InstanceModificationEvent( this one i didnt check ).

                              nave [OpenedFileFinder]

                              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