// winioctl.h
typedef struct _REQUEST_OPLOCK_INPUT_BUFFER {
WORD StructureVersion;
WORD StructureLength;
DWORD RequestedOplockLevel;
DWORD Flags;
} REQUEST_OPLOCK_INPUT_BUFFER, *PREQUEST_OPLOCK_INPUT_BUFFER;
View the official Win32 API referenceNo description available.
Contains the information to request an opportunistic lock (oplock) or to acknowledge an oplock break with the FSCTL_REQUEST_OPLOCK control code.
StructureVersionThe version of the REQUEST_OPLOCK_INPUT_BUFFER structure that is being used. Set this member to REQUEST_OPLOCK_CURRENT_VERSION.
StructureLengthThe length of this structure, in bytes. Must be set to
sizeof(REQUEST_OPLOCK_INPUT_BUFFER).
RequestedOplockLevelA valid combination of the following oplock level values.
| Value | Meaning |
|---|---|
| OPLOCK_LEVEL_CACHE_READ | Allows clients to cache reads. May be granted to multiple clients. |
| OPLOCK_LEVEL_CACHE_HANDLE | Allows clients to cache open handles. May be granted to multiple clients. |
| OPLOCK_LEVEL_CACHE_WRITE | Allows clients to cache writes and byte range locks. May be granted only to a single client. |
Valid combinations of these values are as follows:
OPLOCK_LEVEL_CACHE_READOPLOCK_LEVEL_CACHE_READ | OPLOCK_LEVEL_CACHE_HANDLEOPLOCK_LEVEL_CACHE_READ | OPLOCK_LEVEL_CACHE_WRITEOPLOCK_LEVEL_CACHE_READ | OPLOCK_LEVEL_CACHE_WRITE | OPLOCK_LEVEL_CACHE_HANDLEFor more information about these value combinations, see FSCTL_REQUEST_OPLOCK.
FlagsA valid combination of the following request flag values.
| Value | Meaning |
|---|---|
| REQUEST_OPLOCK_INPUT_FLAG_REQUEST | Request for a new oplock. Setting this flag together with REQUEST_OPLOCK_INPUT_FLAG_ACK is not valid and will cause the request to fail with ERROR_INVALID_PARAMETER. |
| REQUEST_OPLOCK_INPUT_FLAG_ACK | Acknowledgment of an oplock break. Setting this flag together with REQUEST_OPLOCK_ INPUT_FLAG_REQUEST is not valid and will cause the request to fail with ERROR_INVALID_PARAMETER. |