mohammadzahid
asked on
ReadFile()" function is failing with error ERROR_NO_SYSTEM_RESOURCES
Hello Experts,
A call to the WIN32 "ReadFile()" function is failing with error ERROR_NO_SYSTEM_RESOURCES (1450). I am assuming that I am running into some limitation on file handles, or internal file buffers or whatever, since when the error occurs 76 files have previously been opened (and remain open at the time of the error).
Is there a limit on how many files can be opened? If yes, how can I get around the file limit problem in WIN32?
Thanks.
A call to the WIN32 "ReadFile()" function is failing with error ERROR_NO_SYSTEM_RESOURCES (1450). I am assuming that I am running into some limitation on file handles, or internal file buffers or whatever, since when the error occurs 76 files have previously been opened (and remain open at the time of the error).
Is there a limit on how many files can be opened? If yes, how can I get around the file limit problem in WIN32?
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you opening the file with FILE_FLAG_NO_BUFFERING? That asks for trouble...
Still waiting for author's feedback
ASKER
I have not had time to test the suggestions posted by the experts as I am extremely busy with a very important project.
I am anticipated to try the expert's suggestions in a week or 2.
Please do not clean or delete this thread for 2 weeks.
I am anticipated to try the expert's suggestions in a week or 2.
Please do not clean or delete this thread for 2 weeks.
ASKER
My application was reading too much data and was not deallocating buffer.
Problem resolved by reducing the number of file, reading small chuck of data into memory and free when not needed.
Points distributed evenly among experts as all of the responses provided a good lead to analyze and detect the source of the problem.
Thanks!!
Problem resolved by reducing the number of file, reading small chuck of data into memory and free when not needed.
Points distributed evenly among experts as all of the responses provided a good lead to analyze and detect the source of the problem.
Thanks!!
ASKER
Thank you.