Link to home
Start Free TrialLog in
Avatar of mohammadzahid
mohammadzahidFlag for Canada

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.
SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mohammadzahid

ASKER

Thanks guys for the recommendations and help. I will try them and post questions if any.

Thank you.

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adg080898
adg080898

Are you opening the file with FILE_FLAG_NO_BUFFERING? That asks for trouble...
Still waiting for author's feedback
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.





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!!