IWinInetFileStream::SetHandleForUnlock method

Sets a file handle to unlock when the object is released.

Syntax

HRESULT SetHandleForUnlock(
  [in] DWORD_PTR hWinInetLockHandle,
  [in] DWORD_PTR dwReserved
);

Parameters

  • hWinInetLockHandle [in]
    A file HANDLE previously locked with InternetLockRequestFile.

  • dwReserved [in]
    Reserved. Must be set to 0.

Return value

Returns one of the following values.

Return code Description
S_OK

Success.

E_FAIL

Invalid file handle.

E_NOTIMPL

The method has not been implemented.

 

Remarks

SetHandleForUnlock was introduced in Windows Internet Explorer 7.

When the object instance is destroyed, the file handle specified in hWinInetLockHandle is unlocked with InternetLockRequestFile, which allows the file to be deleted safely if it is not committed to the cache.

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003

Product

Internet Explorer 7

Header

Urlmon.h

IDL

Urlmon.idl

DLL

Urlmon.dll

See also

IWinInetFileStream