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. Flush System Buffers for a Drive

Flush System Buffers for a Drive

Scheduled Pinned Locked Moved C / C++ / MFC
testingbeta-testinghelpquestion
9 Posts 3 Posters 16 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.
  • B Offline
    B Offline
    Brad Manske
    wrote on last edited by
    #1

    I'm trying to flush all system buffers associated with a drive on a Win 2k system. The only way I found is to use an Int 21h function 710Dh from the SDK documentation. Can anyone think of another simple way to do this? I think this will help me with my testing, but it isn't worth spending a lot of time on. Brad Manske

    T 1 Reply Last reply
    0
    • B Brad Manske

      I'm trying to flush all system buffers associated with a drive on a Win 2k system. The only way I found is to use an Int 21h function 710Dh from the SDK documentation. Can anyone think of another simple way to do this? I think this will help me with my testing, but it isn't worth spending a lot of time on. Brad Manske

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Brad Manske wrote: The only way I found is to use an Int 21h function 710Dh from the SDK documentation. Does Int 21h work on W2k? Tomasz Sowinski -- http://www.shooltz.com

      B 1 Reply Last reply
      0
      • T Tomasz Sowinski

        Brad Manske wrote: The only way I found is to use an Int 21h function 710Dh from the SDK documentation. Does Int 21h work on W2k? Tomasz Sowinski -- http://www.shooltz.com

        B Offline
        B Offline
        Brad Manske
        wrote on last edited by
        #3

        I'm guessing that it will not. The page in the SDK is under a heading for 95/98/ME. Brad Manske

        T 1 Reply Last reply
        0
        • T Tomasz Sowinski

          I'd look into DeviceIoControl. There's a control code, FSCTL_LOCK_VOLUME, which apparently does flush the buffers. You could lock and unlock immediately. I've never done this, however - treat this with 1e6 milligrams of salt. Tomasz Sowinski -- http://www.shooltz.com

          RaviBeeR Online
          RaviBeeR Online
          RaviBee
          wrote on last edited by
          #4

          As much as 1 kg. of salt? Perhaps you meant 1e3 milligrams. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

          T 1 Reply Last reply
          0
          • B Brad Manske

            I'm guessing that it will not. The page in the SDK is under a heading for 95/98/ME. Brad Manske

            T Offline
            T Offline
            Tomasz Sowinski
            wrote on last edited by
            #5

            I'd look into DeviceIoControl. There's a control code, FSCTL_LOCK_VOLUME, which apparently does flush the buffers. You could lock and unlock immediately. I've never done this, however - treat this with 1e6 milligrams of salt. Tomasz Sowinski -- http://www.shooltz.com

            RaviBeeR B 2 Replies Last reply
            0
            • RaviBeeR RaviBee

              As much as 1 kg. of salt? Perhaps you meant 1e3 milligrams. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

              T Offline
              T Offline
              Tomasz Sowinski
              wrote on last edited by
              #6

              Ravi Bhavnani wrote: Perhaps you meant 1e3 milligrams No, when I write 1e6 I mean 1e6 :) This DeviceIoControl is quite low level for my taste. If the guy looses his data, I don't want to be responsible :) Tomasz Sowinski -- http://www.shooltz.com

              B 1 Reply Last reply
              0
              • T Tomasz Sowinski

                I'd look into DeviceIoControl. There's a control code, FSCTL_LOCK_VOLUME, which apparently does flush the buffers. You could lock and unlock immediately. I've never done this, however - treat this with 1e6 milligrams of salt. Tomasz Sowinski -- http://www.shooltz.com

                B Offline
                B Offline
                Brad Manske
                wrote on last edited by
                #7

                I've looked through the documentation and it looks like it might work. If it doesn't, it would only be a little more work to try dismounting the volume. So I now have several more things to try. Thanks for your help. Brad Manske

                T 1 Reply Last reply
                0
                • T Tomasz Sowinski

                  Ravi Bhavnani wrote: Perhaps you meant 1e3 milligrams No, when I write 1e6 I mean 1e6 :) This DeviceIoControl is quite low level for my taste. If the guy looses his data, I don't want to be responsible :) Tomasz Sowinski -- http://www.shooltz.com

                  B Offline
                  B Offline
                  Brad Manske
                  wrote on last edited by
                  #8

                  Tomasz Sowinski wrote: No, when I write 1e6 I mean 1e6 LOL:) I didn't even notice the quantity specified. Now I feel like I really got my money's worth. Brad Manske

                  1 Reply Last reply
                  0
                  • B Brad Manske

                    I've looked through the documentation and it looks like it might work. If it doesn't, it would only be a little more work to try dismounting the volume. So I now have several more things to try. Thanks for your help. Brad Manske

                    T Offline
                    T Offline
                    Tomasz Sowinski
                    wrote on last edited by
                    #9

                    Just remember about the salt :) Tomasz Sowinski -- http://www.shooltz.com

                    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