InternetLockRequestFile function

Places a lock on the file that is being used.

Syntax


BOOL InternetLockRequestFile(
  _In_  HINTERNET hInternet,
  _Out_ HANDLE    *lphLockReqHandle
);

Parameters

hInternet [in]

Handle returned by the FtpOpenFile, GopherOpenFile, HttpOpenRequest, or InternetOpenUrl function.

lphLockReqHandle [out]

Pointer to a handle that receives the lock request handle.

Return value

Returns TRUE if successful, or FALSE otherwise. To get a specific error message, call GetLastError.

Remarks

If the HINTERNET handle passed to hInternet was created using INTERNET_FLAG_NO_CACHE_WRITE or INTERNET_FLAG_DONT_CACHE, the function creates a temporary file with the extension .tmp, unless it is an HTTPS resource. If the handle was created using INTERNET_FLAG_NO_CACHE_WRITE or INTERNET_FLAG_DONT_CACHE and it is accessing an HTTPS resource, InternetLockRequestFile fails.

Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.

Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).
 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wininet.h

Library

Wininet.lib

DLL

Wininet.dll

See also

Enabling Internet Functionality
WinINet Functions
InternetUnlockRequestFile

 

 

Show: