IWinInetCacheHints2::SetCacheExtension2 method

Changes the file name extension on the Microsoft Win32 Internet (WinInet) cache file to the specified extension.

Syntax

HRESULT SetCacheExtension2(
  [in]      LPCWSTR pwzExt,
  [out]     WCHAR   *pwzCacheFile,
  [in, out] DWORD   *pcchCacheFile,
  [out]     DWORD   *pdwWinInetError,
  [out]     DWORD   *pdwReserved
);

Parameters

  • pwzExt [in]
    Specifies the new file name extension. The extension must begin with a period.

  • pwzCacheFile [out]
    Pointer to a WCHAR buffer that receives the new cache file name.

  • pcchCacheFile [in, out]
    Address of a variable of type DWORD that specifies the size in bytes of the buffer for pwzCacheFile.

  • pdwWinInetError [out]
    Address of a variable of type DWORD that receives additional error information from WinInet, or NULL. If no error occurs, the value is set to zero.

  • pdwReserved [out]
    Reserved. Set to NULL.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The SetCacheExtension2 method was introduced in Windows Internet Explorer 7. It uses InternetQueryOptionW to return a WCHAR version of the cache file name.

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003

Product

Internet Explorer 7

Header

Urlmon.h

IDL

Urlmon.idl

DLL

Urlmon.dll

See also

IWinInetCacheHints2

SetCacheExtension