CVI8.0: My application uses "ArrayToFile()" function a lot, to write variable length strings
on 16 different files. I found that some times some strings were not written!
Running the application through CVI IDE, that is running it in debug mode, an error arises:
"NON-FATAL ERROR Library error -3, Bad File Handle".
The same problem arises if I use other functions like "OpenFile(),WriteFile() and CloseFile()".
I don't know why the system gives a "bad file handle" error, as the handle integer returned
in this case, has more less the same value I get when it works properly (ex: 0x1D4, 0x1C8..)
At the moment I made a simple work around: I use the "GetFmtIOError()" after a WriteFile() call,
and when it returns an error, I repeat the loop so: close file, open and write again
until no error arises...
Can anyone help me understanding why the system gives me this kind of error?
Where could I be wrong?
Thank you in advance!
Regards.
Alex Tardivo
S.H.D. (Italy) Cuneo