CreateUrlCacheEntry

This function creates a local file name for saving the cache entry based on the specified URL and the file extension.

BOOL CreateUrlCacheEntry( 
  LPCTSTR lpszUrlName,
  DWORD dwExpectedFileSize, 
  LPCTSTR lpszFileExtension,
  LPSTR lpszFileName, 
  DWORD dwReserved
);

Parameters

  • lpszUrlName
    [in] Address of a string variable that contains the source name of the cache entry. The name string must be unique and should not contain any escape characters.
  • dwExpectedFileSize
    [in] Unsigned long integer value that contains the expected size of the file needed to store the data corresponding to the source entity. If the expected size is unknown, set this value to zero.
  • lpszFileExtension
    [in] Address of a buffer that contains information maintained in the cache database for future use.
  • lpszFileName
    [out] Address of a buffer that receives the file name. The buffer should be large enough (MAX_PATH) to store the path of the created file.
  • dwReserved
    [in] Reserved. Must be set to zero.

Return Values

Returns TRUE if successful, or FALSE otherwise.

Remarks

After this function is called, the application can write directly into the file in local storage. When the file is completely received, you should call CommitUrlCacheEntry to commit the entry in the cache.

Requirements

OS Versions: Windows CE 2.12 and later.
Header: Wininet.h.
Link Library: Wininet.lib.

See Also

CommitUrlCacheEntry | DeleteUrlCacheEntry | WinInet Functions

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.