FSDMGR_RemoveFileLock (Windows CE 5.0)

Send Feedback

Helper function provided by FSDMGR to simplify the implementation of MyFSD_UnlockFileEx in an FSD.

BOOL MyFSD_UnlockFileEx(
  PACQUIREFILELOCKSTATE pAcquireFileLockState  PRELEASEFILELOCKSTATE pReleaseFileLockState  DWORD dwHandle,
  DWORDdwReserved,
  DWORDnNumberOfBytesToUnlockLow,
  DWORDnNumberOfBytesToUnlockHigh,
  LPOVERLAPPEDlpOverlapped
);

Parameters

  • pAcquireFileLockState
    [in] Pointer to a PACQUIREFILELOCKSTATE function within the calling FSD.
  • pReleaseFileLockState
    [in] Pointer to a PRELEASEFILELOCKSTATE function within the calling FSD.
  • pHandle
    [in] Pointer to the value that an FSD passes to the FSDMGR_CreateFileHandle function when creating the file handle.
  • dwReserved
    Ignored, set to zero
  • nNumberOfBytesToUnlockLow
    [in] Low-order portion of the length of the byte range to unlock.
  • nNumberOfBytesToUnlockHigh
    [in] High-order portion of the length of the byte range to unlock.
  • lpOverlapped
    [in] Pointer to an OVERLAPPED structure that is used with the unlock request. This structure contains the file offset of the beginning of the unlock range.

Return Values

Nonzero indicates that the lock was successfully removed. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

The FSD can simply pass all parameters received by MyFSD_UnlockFileEx 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 MyFSD_LockFileEx and MyFSD_UnlockFileEx.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: lockmgrhelp.h.
Link Library: Fsdmgr.lib.

See Also

FSDMGR_CreateFileHandle | MyFSD_CreateFileW | MyFSD_FindFirstFileW

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.