Thread: Max number of bytes for a read file

  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 07: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, 03: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, 06: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, 01:54 PM