Thread: max number of simultanious opened files

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    76

    max number of simultanious opened files

    Im having a little problem. I just noticed my program has a problem when opening more then +/- 508 files. WHen opening the +/-509th file it just returns NULL. Since i need to be able to open 1002 files at once im wondering if this limit can be overcome. Im using winxp in combination with a very recent mingw compiler. To open files i just use fopen().

    This also make me wonder how high this limit is on other windows version (win98+me).

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    This is not a limitation of the OS (in this case).

    If you use Mingw (which uses the MS-CRT), then you can call the MS-CRT specific function _setmaxstdio() when your program starts.

    gg

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    76
    Thank you, problem solved

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with this compiler error
    By Evangeline in forum C Programming
    Replies: 7
    Last Post: 04-05-2008, 09:27 AM
  2. Max number of bytes for a read file
    By NewGuy100 in forum C Programming
    Replies: 2
    Last Post: 08-18-2005, 06:37 AM
  3. Making .X files in 3D Studio Max 7
    By Muphin in forum Game Programming
    Replies: 6
    Last Post: 07-16-2005, 01:26 AM
  4. Array of boolean
    By DMaxJ in forum C++ Programming
    Replies: 11
    Last Post: 10-25-2001, 11:45 PM
  5. number of open files....
    By Prakash in forum C Programming
    Replies: 2
    Last Post: 09-18-2001, 11:32 AM