UnlockUrlCacheEntryFileW function (wininet.h)

Unlocks the cache entry that was locked while the file was retrieved for use from the cache.


BOOL UnlockUrlCacheEntryFileW(
  [in] LPCWSTR lpszUrlName,
  [in] DWORD   dwReserved


[in] lpszUrlName

Pointer to a null-terminated string that specifies the source name of the cache entry that is being unlocked. The name string should not contain any escape characters.

[in] dwReserved

This parameter is reserved and must be 0.

Return value

Returns TRUE if successful, or FALSE otherwise. To get extended error information, call GetLastError. ERROR_FILE_NOT_FOUND indicates that the cache entry specified by the source name is not found in the cache storage.


The application should not access the file after calling this function.

When this function returns, the cache manager is free to delete the cache entry.

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).


The wininet.h header defines UnlockUrlCacheEntryFile as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.


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

See also


WinINet Functions