Static member Lock : int * int64 * int64 -> unit Public Sub Lock (FileNumber As Integer, FromRecord As Long, ToRecord As Long) Parameters Public static void Lock (int FileNumber, long FromRecord, long ToRecord) static member Lock : int * int64 * int64 -> unit Static void Lock(int FileNumber, long FromRecord, long ToRecord) public static void Lock (int FileNumber, long FromRecord, long ToRecord)
![vb net 2010 lock controls vb net 2010 lock controls](https://i.ytimg.com/vi/ex7c3QgWjHs/maxresdefault.jpg)
The My feature gives you better productivity and performance in file I/O operations than Lock and Unlock.
![vb net 2010 lock controls vb net 2010 lock controls](https://img.yumpu.com/8190459/1/500x640/mastering-microsoft-visual-basic-2010pdf-tudttu.jpg)
FileOpen(Int32, String, OpenMode, OpenAccess, OpenShare, Int32)Ĭontrols access by other processes to all or part of a file opened by using the Open function.If the file has been opened for sequential input or output, Lock and Unlock affect the whole file, regardless of the range specified by FromRecord and ToRecord. If Record alone is specified the single record will be locked/unlocked. If Record, or FromRecord and ToRecord are not supplied, the lock will be for the whole file. The arguments to Lock and Unlock must be identical. Lock and Unlock functions are always used in pairs. The Lock and Unlock functions are used in environments where several processes might need access to the same file. Sub PutInLockedFile(ByVal onePerson As Person)įileOpen(1, "c:\people.txt", OpenMode.Binary) This example assumes that People.txt is a file that contains records of the structure Person. This example illustrates the use of the Lock and Unlock functions.
![vb net 2010 lock controls vb net 2010 lock controls](https://usermanual.wiki/adobe/robohelp2015ugen.1891727298-User-Guide-Page-1.png)
In this article Overloads Lock(Int32)Ĭontrols access by other processes to all or part of a file opened by using the Open function. Controls access by other processes to all or part of a file opened by using the Open function.