Max number of bytes for a read file

This is a discussion on Max number of bytes for a read file within the C Programming forums, part of the General Programming Boards category; What is the max number of bytes the ReadFile can read at a time? I am trying to dump data ...

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    56

    Max number of bytes for a read file

    What is the max number of bytes the ReadFile can read at a time? I am trying to dump data onto the screen and it will go past 64K.

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    Why do you need to read so much at a time? Why can't you just read a chunk at a time, print it out then read some more until you are done? That way you can handle files from 1byte large to 2gigabytes.

    By the way, ReadFile is Win32API, not C. Why don't you use a portable function such as fread which works on any C implementation? Otherwise isn't the question more suited in the Windows Programming forum?
    Last edited by orbitz; 08-17-2005 at 08:49 PM.

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    56
    I am using ReadFile for serial communication purposes

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 04:53 AM
  2. strcat - cannot convert char to const char
    By ulillillia in forum C Programming
    Replies: 14
    Last Post: 12-07-2006, 10:00 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  4. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  5. socket question
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 07-19-2002, 02:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21