LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

OpenFile error with VAL_TRUNCATE

I have a function which opens a file located on a local network.  I intend to rewrite all the contents of this file each time opened.  This application is the only writer to the file.

 

fileHandle = OpenFile(fileName, VAL_WRITE_ONLY, VAL_TRUNCATE, VAL_ASCII);
WriteLine(fileHandle, "some text", -1);
CloseFile(fileHandle);

 

On one of my stations, I regularly see the OpenFile fail with an error code 5, "File exists".

 

This is some sort of permissions issue?

0 Kudos
Message 1 of 2
(932 Views)

UPDATE

 

This same station has started getting other network-related issues, so I replaced the PC.  Problem has gone away.  

0 Kudos
Message 2 of 2
(837 Views)