|
Good morning folks,
Can anyone give me an advise, why _Rclose can fail?
I'll try to describe the situation. There is a pretty complicated program, that
must calculate a long sequence of strutures. Normally it takes several
iterations to get a "good" sequence. I used a PF in QTEMP to temporarily keep
the sequence - seemed convinient...
When program completes a sequence calculation, it knows, if it is "good" or
"not good". If it is "not good", it must be dropped. I failed to find a good
way to flush a content of a PF, so decided to use _Rclose + _Ropen.
Here's what I have:
char FileName[24] ;
int main()
{
.....
fpr = _Ropen(FileName, "wr") ;
.....
Result = CallIterate(fpr) ;
.....
Result = CallIterate(fpr) ;
.....
_Rclose(fpr) ;
}
int CallIterate(_RFILE *fpr)
{
....
_Rclose(fpr) ;
fpr = _Ropen(FileName, "wr") ;
....
return(0) ;
}
Program successfully makes first call to function CallIterate. When the second
call is done, _Rclose fails with errno 3004 and generates exception CPF3130 -
Member already in use.
And errno value is very content rich. It says - Guess what? - file has not been
opened!
Can someone explain me what's happening and where to look for a solution?
Jevgeni Astanovski
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.