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. The Lounge
  3. Differentiate between virtual drive and physical drive

Differentiate between virtual drive and physical drive

Scheduled Pinned Locked Moved The Lounge
csharptoolstutorialquestion
31 Posts 12 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.
  • P Pete OHanlon

    I like to do things willy-nilly. It's the only fun I get nowadays, nillying my willy. You're right of course - I'll secure the package so that it self destructs if the NDA hasn't been signed first.

    Deja View - the feeling that you've seen this post before.

    M Offline
    M Offline
    Mustafa Ismail Mustafa
    wrote on last edited by
    #15

    email me the NDA, I'll print it and sign it and get it back to you via cpp (Carrier Pigeon Post) ASAP

    There are 10 kinds of people in this world. Those who understand binary and those who don't... ______________________ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    P 1 Reply Last reply
    0
    • C c3csystems

      Hi! I have installed daemon-tools and have a virtual drive. I need my C# program to list all my physical disk-drives and not virtual ones. So far, I could do the following [DllImport("kernel32.dll")] public static extern DriveType GetDriveType([MarshalAs(UnmanagedType.LPStr)] string lpRootPathName); ----and in the code---- string[] allDrives = Directory.GetLogicalDrives(); for (int i = 0; i < allDrives.Length; i++) { if ((GetDriveType(allDrives[i]) & DriveType.CDROM) == DriveType.CDROM) { Console.WriteLine(allDrives[i]); } } It lists my physical disk-drives as well as virtual ones. Any suggestions how to go about enumerating only the physical ones? Thanks.

      I code at Will!

      S Offline
      S Offline
      Steve Hansen
      wrote on last edited by
      #16

      allDrives[i].GetType().IsVirtual

      1 Reply Last reply
      0
      • M Mustafa Ismail Mustafa

        email me the NDA, I'll print it and sign it and get it back to you via cpp (Carrier Pigeon Post) ASAP

        There are 10 kinds of people in this world. Those who understand binary and those who don't... ______________________ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #17

        How about I email you the pigeon as well?

        Deja View - the feeling that you've seen this post before.

        C M 2 Replies Last reply
        0
        • P Pete OHanlon

          How about I email you the pigeon as well?

          Deja View - the feeling that you've seen this post before.

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #18

          :laugh: :laugh: Oh man, that was funny !


          Cédric Moonen Software developer
          Charting control [v1.2]

          1 Reply Last reply
          0
          • P Pete OHanlon

            How about I email you the pigeon as well?

            Deja View - the feeling that you've seen this post before.

            M Offline
            M Offline
            Mustafa Ismail Mustafa
            wrote on last edited by
            #19

            Interesting. Do you propose to do that by stuffing the poor bird through, say, your CD/DVD drive, copying its internals into a machine readable format before converting it to a human readable format onto a pdf file and then emailing it to me?

            There are 10 kinds of people in this world. Those who understand binary and those who don't... ______________________ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

            P 1 Reply Last reply
            0
            • C c3csystems

              Hi! I have installed daemon-tools and have a virtual drive. I need my C# program to list all my physical disk-drives and not virtual ones. So far, I could do the following [DllImport("kernel32.dll")] public static extern DriveType GetDriveType([MarshalAs(UnmanagedType.LPStr)] string lpRootPathName); ----and in the code---- string[] allDrives = Directory.GetLogicalDrives(); for (int i = 0; i < allDrives.Length; i++) { if ((GetDriveType(allDrives[i]) & DriveType.CDROM) == DriveType.CDROM) { Console.WriteLine(allDrives[i]); } } It lists my physical disk-drives as well as virtual ones. Any suggestions how to go about enumerating only the physical ones? Thanks.

              I code at Will!

              M Offline
              M Offline
              Marc Clifton
              wrote on last edited by
              #20

              Well, a physical drive behaves according to Newtonian physics, while a virtual drive behaves according to Einsteinian physics. So, if you experience temporal displacement with the drive, you know it's a virtual drive. Marc

              Thyme In The Country
              Interacx
              My Blog

              P R C 3 Replies Last reply
              0
              • M Mustafa Ismail Mustafa

                Interesting. Do you propose to do that by stuffing the poor bird through, say, your CD/DVD drive, copying its internals into a machine readable format before converting it to a human readable format onto a pdf file and then emailing it to me?

                There are 10 kinds of people in this world. Those who understand binary and those who don't... ______________________ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #21

                Mustafa Ismail Mustafa wrote:

                Do you propose to do that by stuffing the poor bird through, say, your CD/DVD drive, copying its internals into a machine readable format before converting it to a human readable format onto a pdf file and then emailing it to me?

                Well. Pigeons eat grain which is inherently cerealizable (groan) so I should be able to send a deep copy.

                Deja View - the feeling that you've seen this post before.

                1 Reply Last reply
                0
                • M Marc Clifton

                  Well, a physical drive behaves according to Newtonian physics, while a virtual drive behaves according to Einsteinian physics. So, if you experience temporal displacement with the drive, you know it's a virtual drive. Marc

                  Thyme In The Country
                  Interacx
                  My Blog

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #22

                  :laugh:Nice. That's obviously your engineering side coming to the fore.

                  Deja View - the feeling that you've seen this post before.

                  1 Reply Last reply
                  0
                  • M Marc Clifton

                    Well, a physical drive behaves according to Newtonian physics, while a virtual drive behaves according to Einsteinian physics. So, if you experience temporal displacement with the drive, you know it's a virtual drive. Marc

                    Thyme In The Country
                    Interacx
                    My Blog

                    R Offline
                    R Offline
                    Richard Jones
                    wrote on last edited by
                    #23

                    I would just remove all drives from the computer. Every drive I can now see must be virtual.

                    "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..." "There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."

                    P 1 Reply Last reply
                    0
                    • R Richard Jones

                      I would just remove all drives from the computer. Every drive I can now see must be virtual.

                      "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..." "There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."

                      P Offline
                      P Offline
                      Pete OHanlon
                      wrote on last edited by
                      #24

                      I prefer to think of them as conceptual drives. Drives in the abstract if you like. Drives that might exist in a quantum universe.

                      Deja View - the feeling that you've seen this post before.

                      R 1 Reply Last reply
                      0
                      • P Pete OHanlon

                        I prefer to think of them as conceptual drives. Drives in the abstract if you like. Drives that might exist in a quantum universe.

                        Deja View - the feeling that you've seen this post before.

                        R Offline
                        R Offline
                        Richard Jones
                        wrote on last edited by
                        #25

                        You mean Schrodinger's drives?

                        "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..." "There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."

                        M E 2 Replies Last reply
                        0
                        • R Richard Jones

                          You mean Schrodinger's drives?

                          "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..." "There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."

                          M Offline
                          M Offline
                          Mustafa Ismail Mustafa
                          wrote on last edited by
                          #26

                          perhaps Heisenberg drives.

                          There are 10 kinds of people in this world. Those who understand binary and those who don't... ______________________ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

                          J 1 Reply Last reply
                          0
                          • R Richard Jones

                            You mean Schrodinger's drives?

                            "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..." "There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."

                            E Offline
                            E Offline
                            El Corazon
                            wrote on last edited by
                            #27

                            Richard Jones wrote:

                            You mean Schrodinger's drives?

                            Don't get those, although they do arive working, they are also DOA.

                            _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                            P 1 Reply Last reply
                            0
                            • E El Corazon

                              Richard Jones wrote:

                              You mean Schrodinger's drives?

                              Don't get those, although they do arive working, they are also DOA.

                              _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                              P Offline
                              P Offline
                              Pete OHanlon
                              wrote on last edited by
                              #28

                              Well - you won't know until you open the box.

                              Deja View - the feeling that you've seen this post before.

                              E 1 Reply Last reply
                              0
                              • P Pete OHanlon

                                Well - you won't know until you open the box.

                                Deja View - the feeling that you've seen this post before.

                                E Offline
                                E Offline
                                El Corazon
                                wrote on last edited by
                                #29

                                Pete O`Hanlon wrote:

                                Well - you won't know until you open the box.

                                yeah, I am trying to work out a quantum interface so I can use it before the box is opened, this way it will always work and always fail, that's better than the 50/50 chance right?

                                _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                                1 Reply Last reply
                                0
                                • M Mustafa Ismail Mustafa

                                  perhaps Heisenberg drives.

                                  There are 10 kinds of people in this world. Those who understand binary and those who don't... ______________________ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

                                  J Offline
                                  J Offline
                                  Johan Lombaard
                                  wrote on last edited by
                                  #30

                                  The problem with Heisenberg drives is that's is very difficult to figure out exactly where they are and what they are up to.

                                  Johan Lombaard Only two things are infinite, the universe and human stupidity, and I'm not sure about the former - Albert Einstein

                                  1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    Well, a physical drive behaves according to Newtonian physics, while a virtual drive behaves according to Einsteinian physics. So, if you experience temporal displacement with the drive, you know it's a virtual drive. Marc

                                    Thyme In The Country
                                    Interacx
                                    My Blog

                                    C Offline
                                    C Offline
                                    c3csystems
                                    wrote on last edited by
                                    #31

                                    Wow! Thank you very much for your replies...Marc's answer concerning Newtonian and Einsteinian physics was hilarious. Will try out the suggested methods and let u know. Thanks once again.

                                    I code at Will!

                                    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