点击或拖拽改变大小

XsWin32FileStream.Lock 方法

X#
Prevents other processes from reading from or writing to the FileStream.

命名空间:  XSharp.IO
程序集:  XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法
 VIRTUAL METHOD Lock(
	position AS INT64,
	length AS INT64
) AS VOID
查看代码

参数

position
类型:Int64
The beginning of the range to lock. The value of this parameter must be equal to or greater than zero (0).
length
类型:Int64
The range to be locked.
异常
异常条件
ArgumentOutOfRangeExceptionposition or length is negative.
ObjectDisposedExceptionThe file is closed.
IOExceptionThe process cannot access the file because another process has locked a portion of the file.
备注
This method calls the Windows LockFile() function directly.
参见