Name
Lock Procedure — Microsoft.VisualBasic.FileSystem
Synopsis
Lock(filenumber
[,record
]) Syntax 1. Lock(filenumber
[,fromrecord,torecord
] Syntax 2.
filenumber
required; IntegerAny valid file number
record
optional; LongThe record or byte number at which to commence the lock
fromrecord
optional; LongThe first record or byte number to lock
torecord
optional; LongThe last record or byte number to lock
Description
The Lock procedure prevents another process from accessing a record, section, or whole file until it is unlocked by the Unlock function.
Use the Lock procedure in situations where multiple programs or more than one instance of your program may need read and write access to the same data file.
Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.