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. Create a virtual file

Create a virtual file

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
7 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.
  • F Offline
    F Offline
    forjer
    wrote on last edited by
    #1

    I have a 3rd party program that writes data to a selected file. Instead of having the program write to a file, I'd like to be able to create a virtual file and capture the data the program writes. I've tried doing it with named pipes, but I can't get it to work*. Are there any other ways to create a virtual file? Thanks * Even though a simple CreateFile,WriteFile,CloseFile program works, the copy command returns "All pipe instances are busy." error and GUI programs just hang for a few seconds after I press save.

    D R 2 Replies Last reply
    0
    • F forjer

      I have a 3rd party program that writes data to a selected file. Instead of having the program write to a file, I'd like to be able to create a virtual file and capture the data the program writes. I've tried doing it with named pipes, but I can't get it to work*. Are there any other ways to create a virtual file? Thanks * Even though a simple CreateFile,WriteFile,CloseFile program works, the copy command returns "All pipe instances are busy." error and GUI programs just hang for a few seconds after I press save.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Forjer wrote: I'd like to be able to create a virtual file and capture the data the program writes. Do you mean intercept "write" calls to a certain file? If so, check out this utility.


      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      F 1 Reply Last reply
      0
      • D David Crow

        Forjer wrote: I'd like to be able to create a virtual file and capture the data the program writes. Do you mean intercept "write" calls to a certain file? If so, check out this utility.


        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        F Offline
        F Offline
        forjer
        wrote on last edited by
        #3

        I'm familiar with Filemon, but it doesn't help me get the data and skip the disk writing.

        D 1 Reply Last reply
        0
        • F forjer

          I'm familiar with Filemon, but it doesn't help me get the data and skip the disk writing.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          I was simply providing the link to give you an idea as to what is involved in intercepting file I/O. Suffice it to say, it's not a trivial undertaking.


          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          F 1 Reply Last reply
          0
          • F forjer

            I have a 3rd party program that writes data to a selected file. Instead of having the program write to a file, I'd like to be able to create a virtual file and capture the data the program writes. I've tried doing it with named pipes, but I can't get it to work*. Are there any other ways to create a virtual file? Thanks * Even though a simple CreateFile,WriteFile,CloseFile program works, the copy command returns "All pipe instances are busy." error and GUI programs just hang for a few seconds after I press save.

            R Offline
            R Offline
            RaajaOfSelf
            wrote on last edited by
            #5

            Hi , WHat about memory mapped files ??? Iam not sure what you are looking for ....but looks like memory mapped file might help you ... Cause is my effort; Effect is God's effort

            F 1 Reply Last reply
            0
            • D David Crow

              I was simply providing the link to give you an idea as to what is involved in intercepting file I/O. Suffice it to say, it's not a trivial undertaking.


              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              F Offline
              F Offline
              forjer
              wrote on last edited by
              #6

              I thought I could avoid api hooking because I can control the output file name. I'm currently looking into madCollection as it appears I have to use api hooking.

              1 Reply Last reply
              0
              • R RaajaOfSelf

                Hi , WHat about memory mapped files ??? Iam not sure what you are looking for ....but looks like memory mapped file might help you ... Cause is my effort; Effect is God's effort

                F Offline
                F Offline
                forjer
                wrote on last edited by
                #7

                That's not going to help in my case.

                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