Click to return to the Networking, Protocols     
CommitUrlCacheEntry Funct...     CreateUrlCacheGroup Funct...     Persistent URL Cache Func...    
Web Workshop  |  Networking, Protocols & Data Formats

CreateUrlCacheEntry Function


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

Syntax

BOOL CreateUrlCacheEntry(
    IN LPCTSTR lpszUrlName,
    IN DWORD dwExpectedFileSize,
    IN LPCTSTR lpszFileExtension,
    OUT LPTSTR lpszFileName,
    IN DWORD dwReserved
);

The actual syntax of this function varies between its ANSI and Unicode implementations. For more information, see Win32 Internet Functions Syntax.

Parameters

lpszUrlName
Address of a string value that contains the name of the URL. The string should not contain any escape characters.
dwExpectedFileSize
Unsigned long integer value that contains the expected size of the file needed to store the data corresponding to the source entity in TCHAR. If the expected size is unknown, set this value to zero.
lpszFileExtension
Address of a string value that contains an extension name of the file in the local storage.
lpszFileName
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
Reserved. Must be set to zero.

Return Value

Returns TRUE if successful, or FALSE otherwise. To get extended error information, call GetLastError.

Remarks

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

Function Information

Windows NT Use version 4.0. Implemented as ANSI and Unicode functions.
Windows Use Windows 95 and later. Implemented as ANSI and Unicode functions.
Header Wininet.h
Import library Wininet.lib
Minimum availability Internet Explorer 3.0 (ANSI only), 5 (ANSI and Unicode)

Windows CE

Windows CE Use version 2.12 and later. Implemented as ANSI and Unicode functions.
Minimum availability Internet Explorer 4.0

See Also

Microsoft Win32 Internet Functions Overview, Caching, Microsoft Win32 Internet Functions Reference, Persistent URL Cache Functions, CommitUrlCacheEntry



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.