LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Lock file

Hi All

 

How can i lock a file from been used else were while my program is open?

Help share your knowlegde
0 Kudos
Message 1 of 3
(2,728 Views)

I'm not aware of a way to lock file access using native CVI functions.

You can obtain this by using Windows API functions like CreateFile with the appropriate attributes or LockFile on an unlocked, opened file; you will need of course to continue using Win32 APIs to read/write to the file, as the system handle is not compatible with CVI file functions.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(2,713 Views)

Thanks i will have a look into the WinAPI.

Help share your knowlegde
0 Kudos
Message 3 of 3
(2,692 Views)