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. Usage of Win32APIs CreateFile(),WriteFile() and ReadFile()

Usage of Win32APIs CreateFile(),WriteFile() and ReadFile()

Scheduled Pinned Locked Moved C / C++ / MFC
question
13 Posts 9 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.
  • R ratprita

    Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?

    M Offline
    M Offline
    Michael Schubert
    wrote on last edited by
    #2

    I suggest the documentation for these functions on MSDN. Go to http://msdn.microsoft.com/en-us/library/default.aspx[^] and type the name of the function in the search box.

    1 Reply Last reply
    0
    • R ratprita

      Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?

      G Offline
      G Offline
      goonyangxiaofang
      wrote on last edited by
      #3

      You can find your answer in MSDN.

      R 1 Reply Last reply
      0
      • R ratprita

        Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?

        CPalliniC Offline
        CPalliniC Offline
        CPallini
        wrote on last edited by
        #4

        Yes. :rolleyes:

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        In testa che avete, signor di Ceprano?

        1 Reply Last reply
        0
        • G goonyangxiaofang

          You can find your answer in MSDN.

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

          I need code urgently. Pls help.

          CPalliniC L 2 Replies Last reply
          0
          • R ratprita

            I need code urgently. Pls help.

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #6

            ratprita wrote:

            I need code urgently.

            :-D BTW: its a quite simple task and you're a developer, aren't you? The documentation is your best friend. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            In testa che avete, signor di Ceprano?

            1 Reply Last reply
            0
            • R ratprita

              Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?

              K Offline
              K Offline
              KarstenK
              wrote on last edited by
              #7

              you are fullfilling most conditions of bad questioning in forums. :doh: tip: listbox <-> string <-> file Do your homework by reading the docs (aka RTFM) SCNR

              Press F1 for help or google it. Greetings from Germany

              1 Reply Last reply
              0
              • R ratprita

                Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?

                R Offline
                R Offline
                Rajesh R Subramanian
                wrote on last edited by
                #8

                A list box or an edit box? A list box is not some sort of a "text container" that you can dump text into. So, you'll have to do a bit of work (parse entries and add it to the list box). I'm sure all those functions are documented and there are plenty of examples out there. Not to mention if you're using MFC, things will be easier.

                It is a crappy thing, but it's life -^ Carlo Pallini

                1 Reply Last reply
                0
                • R ratprita

                  Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?

                  W Offline
                  W Offline
                  wangningyu
                  wrote on last edited by
                  #9

                  you can use struct.

                  M 1 Reply Last reply
                  0
                  • W wangningyu

                    you can use struct.

                    M Offline
                    M Offline
                    Michael Schubert
                    wrote on last edited by
                    #10

                    wangningyu wrote:

                    you can use struct.

                    :doh: That is about as useful as telling him to use butter and cheese.

                    I CPalliniC 2 Replies Last reply
                    0
                    • M Michael Schubert

                      wangningyu wrote:

                      you can use struct.

                      :doh: That is about as useful as telling him to use butter and cheese.

                      I Offline
                      I Offline
                      Iain Clarke Warrior Programmer
                      wrote on last edited by
                      #11

                      At least your suggestion leads to a sandwich. Mmmm, food... Iain.

                      I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]

                      1 Reply Last reply
                      0
                      • R ratprita

                        I need code urgently. Pls help.

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

                        ratprita wrote:

                        I need code urgently.

                        Then why not go and look for it? It's all here[^].

                        1 Reply Last reply
                        0
                        • M Michael Schubert

                          wangningyu wrote:

                          you can use struct.

                          :doh: That is about as useful as telling him to use butter and cheese.

                          CPalliniC Offline
                          CPalliniC Offline
                          CPallini
                          wrote on last edited by
                          #13

                          Michael Schubert wrote:

                          That is about as useful as telling him to use butter and cheese.

                          I guess butter & cheese are more useful. :-D

                          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                          [My articles]

                          In testa che avete, signor di Ceprano?

                          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