Share via


FSDMGR_TestFileLockEx

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function authorizes read or write requests. FSDMGR_TestFileLockEx includes parameters that allow the caller to override the current file position.

Syntax

BOOL
FSDMGR_TestFileLockEx(
    PACQUIREFILELOCKSTATE pAcquireFileLockState,
    PRELEASEFILELOCKSTATE pReleaseFileLockState,
    DWORD dwHandle,
    BOOL fRead,
    DWORD cbReadWrite,
    DWORD dwOffsetLow,
    DWORD dwOffsetHigh
    );

Parameters

  • dwHandle
    Handle to the specified file.
  • fRead
    Specifies whether the file can be read.
  • cbReadWrite
    Specifies whether the file can be read and written to.
  • dwOffsetLow
    Low DWORD file offset for the handle when the file lock is installed.
  • dwOffsetHigh
    High DWORD file offset for the handle when the file lock is installed.

Return Value

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

The FSD can simply pass all parameters received by MyFSD_LockFileEx to this helper function, along with two helper function pointers, PACQUIREFILELOCKSTATE and PRELEASEFILELOCKSTATE, implemented by the FSD.

This function is a Lock Manager function provided by FSDMGR to assist FSDs with implementing the MyFSD_LockFileEx and the MyFSD_UnLockFileEx functions.

Requirements

Header lockmgr.h

See Also

Reference

FSDMGR Functions
FSDMGR_TestFileLock
FSDMGR_AcquireFileLock
FSDMGR_RemoveFileLock
FSDMGR_RemoveFileLockEx