LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 2009 errors when writing to hidden file

Solved!
Go to solution
I recompiled a program in CVI2009 that was previously written in 9.0.  After doing so the program will no longer write to a text file with the hidden attribute set, CVI returns the error "access denied".  If I remove the hidden attribute the program works fine.  Am I forgetting to set something or is this a CVI 2009 issue?
0 Kudos
Message 1 of 5
(3,681 Views)
Solution
Accepted by topic author pinball

I remember having the same issue in the versions before 2009.

Hidden attribute hides the file from searching functions if that's how your code finds the text file to be written.

 

You can use SetFileAttrs function to temporarily unhide the file and then you can hide it again, if necessary. 

 

Hope this helps, 

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 5
(3,643 Views)
Well I'm not using the search function but that does fix the problem.  Thanks for the help!
0 Kudos
Message 3 of 5
(3,623 Views)

I ran across the same problem and posted it on the LabWindows/Cvi user group website with the same fix (or work around). But I also noted that this did not appear in cvi 9.0.1 (runtime engine 9.0.0.348).

 

I'm using cvi 2009 runtime engine 9.1.0.428 (XP).

 

I found this out when I was updating a program created in cvi 9.0.1. The program could have been released without me knowing there was a problem.

(I use 'fopen (pathN, "wb")) 

 

So, is this a bug or not?

 

Thanks

Walt

0 Kudos
Message 4 of 5
(3,407 Views)

This behavior has been replicated and is now documented as corrective action request 216631.  Thanks for bringing this to our attention!

 

Message Edited by Al B on 03-26-2010 11:29 AM
Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 5 of 5
(3,342 Views)