Entretoize
Entretoize

Reputation: 2251

How to set offset for LockFileEx like LockFile

I need to lock a file for read and write operation and preferably I would like to lock only a region. As I need to use LockFileEx instead of LockFile I don't understand how to specify a lock region because there's only a nNumberOfBytesToLock parameter and no dwFileOffsetLow like with LockFile.

Does it allow only to lock from the beginning ?

Thanks

Upvotes: 0

Views: 97

Answers (1)

cedrou
cedrou

Reputation: 2790

The file offset is part of the lpOverlapped parameter.

Upvotes: 1

Related Questions