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. Trouble opening large file

Trouble opening large file

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

    I'm having trouble opening a 3 GB file. I've never had to open a file so large before and I'm nost sure what to do. I've tried fopen and open functions but the program fails to open the file. Any suggestions?

    D G 2 Replies Last reply
    0
    • C Camron

      I'm having trouble opening a 3 GB file. I've never had to open a file so large before and I'm nost sure what to do. I've tried fopen and open functions but the program fails to open the file. Any suggestions?

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

      How are you attempting to open it? The fopen() and open() functions should be limited to older C programs. For newer Windows programs, use CreateFile() instead.


      "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

      C 1 Reply Last reply
      0
      • D David Crow

        How are you attempting to open it? The fopen() and open() functions should be limited to older C programs. For newer Windows programs, use CreateFile() instead.


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        C Offline
        C Offline
        Camron
        wrote on last edited by
        #3

        To use CreateFile() I must have the Coredll.lib. Where do I find this lib?

        C 1 Reply Last reply
        0
        • C Camron

          I'm having trouble opening a 3 GB file. I've never had to open a file so large before and I'm nost sure what to do. I've tried fopen and open functions but the program fails to open the file. Any suggestions?

          G Offline
          G Offline
          Graham Bradshaw
          wrote on last edited by
          #4

          You're still in 32-bit land with 3GB, but this may help: http://www.naughter.com/cfile64.html[^]

          C 1 Reply Last reply
          0
          • C Camron

            To use CreateFile() I must have the Coredll.lib. Where do I find this lib?

            C Offline
            C Offline
            Camron
            wrote on last edited by
            #5

            Oops..nevermind I was in the WindowsCE part of MSDN..

            1 Reply Last reply
            0
            • G Graham Bradshaw

              You're still in 32-bit land with 3GB, but this may help: http://www.naughter.com/cfile64.html[^]

              C Offline
              C Offline
              Camron
              wrote on last edited by
              #6

              Thanks so much for your help...CreateFile worked..

              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