mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 00:43:00 -05:00
winfsp-tests: lock-test
This commit is contained in:
parent
829ef65cbb
commit
7458f7da39
@ -275,6 +275,8 @@ static void lock_overlapped_dotest(ULONG Flags, PWSTR VolPrefix, PWSTR Prefix, U
|
|||||||
Overlapped.Offset = BytesPerSector + BytesPerSector / 2;
|
Overlapped.Offset = BytesPerSector + BytesPerSector / 2;
|
||||||
Success = LockFileEx(Handle, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0,
|
Success = LockFileEx(Handle, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0,
|
||||||
BytesPerSector, 0, &Overlapped);
|
BytesPerSector, 0, &Overlapped);
|
||||||
|
ASSERT(Success || ERROR_IO_PENDING == GetLastError() || ERROR_LOCK_VIOLATION == GetLastError());
|
||||||
|
Success = GetOverlappedResult(Handle, &Overlapped, &BytesTransferred, TRUE);
|
||||||
ASSERT(!Success && ERROR_LOCK_VIOLATION == GetLastError());
|
ASSERT(!Success && ERROR_LOCK_VIOLATION == GetLastError());
|
||||||
|
|
||||||
Overlapped.Offset = 0;
|
Overlapped.Offset = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user