InternetLockRequestFile function (wininet.h)
Places a lock on the file that is being used.
Syntax
BOOL InternetLockRequestFile(
[in] HINTERNET hInternet,
[out] HANDLE *lphLockRequestInfo
);
Parameters
[in] hInternet
Handle returned by the FtpOpenFile, GopherOpenFile, HttpOpenRequest, or InternetOpenUrl function.
[out] lphLockRequestInfo
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wininet.h |
Library | Wininet.lib |
DLL | Wininet.dll |