On 2/26/07, Andrew Talbot Andrew.Talbot@talbotville.com wrote:
What is wrong with this patch, please?
This isn't how it's defined in the SDK headers.
James Hawkins wrote:
On 2/26/07, Andrew Talbot Andrew.Talbot@talbotville.com wrote:
What is wrong with this patch, please?
This isn't how it's defined in the SDK headers.
Am I right in thinking that for non-embedded-CE versions of Windows the lpHeaderInfo variable of CommitURLCacheEntry() is now a LPCTSTR? In which case, I presume that the comment about the ascii version requiring a LPBYTE is now wrong: the "A" version should now have a LPCSTR and the "W" version, a LPCWSTR.
-- Andy.
The problem seems to be that the INTERNET_CACHE_ENTRY_INFO structure has a member lpHeaderInfo that is a LPBYTE, but the corresponding parameter of CommitURLCacheEntry() - sorry, I truncated its name in the original posting - ought to be a LPTSTR. It is not yet clear to me what is required.
-- Andy.
Andrew Talbot wrote:
... but the corresponding parameter of CommitURLCacheEntry() [...] ought to be a LPTSTR....
Or rather, a LPCTSTR.
So, is there any scope to constify, here?
-- A.
On 2/26/07, Andrew Talbot Andrew.Talbot@talbotville.com wrote:
James Hawkins wrote:
On 2/26/07, Andrew Talbot Andrew.Talbot@talbotville.com wrote:
What is wrong with this patch, please?
This isn't how it's defined in the SDK headers.
Am I right in thinking that for non-embedded-CE versions of Windows the lpHeaderInfo variable of CommitURLCacheEntry() is now a LPCTSTR? In which case, I presume that the comment about the ascii version requiring a LPBYTE is now wrong: the "A" version should now have a LPCSTR and the "W" version, a LPCWSTR.
#ifndef USE_FIXED_COMMIT_URL_CACHE_ENTRY // Temporary state of affairs until we reconcile our apis.
// Why are we doing this? HeaderInfo _should_ be string data. // However, one group is passing binary data instead. For the // unicode api, we've decided to disallow this, but this // brings up an inconsistency between the u and a apis, which // is undesirable.
// For Beta 1, we'll go with this behaviour, but in future releases // we want to make these apis consistent.
BOOLAPI CommitUrlCacheEntryA( __in LPCSTR lpszUrlName, __in_opt LPCSTR lpszLocalFileName, __in FILETIME ExpireTime, __in FILETIME LastModifiedTime, __in DWORD CacheEntryType, __in_ecount_opt(dwHeaderSize) LPBYTE lpHeaderInfo, __in_opt DWORD dwHeaderSize, __reserved LPCSTR lpszFileExtension, __in_opt LPCSTR lpszOriginalUrl );
BOOLAPI CommitUrlCacheEntryW( __in LPCWSTR lpszUrlName, __in_opt LPCWSTR lpszLocalFileName, __in FILETIME ExpireTime, __in FILETIME LastModifiedTime, __in DWORD CacheEntryType, __in_ecount_opt(dwHeaders) LPWSTR lpszHeaderInfo, __in DWORD dwHeaders, __reserved LPCWSTR lpszFileExtension, __in_opt LPCWSTR lpszOriginalUrl );
#ifdef UNICODE #define CommitUrlCacheEntry CommitUrlCacheEntryW #else #define CommitUrlCacheEntry CommitUrlCacheEntryA #endif
#else CommitUrlCacheEntryA( __in LPCSTR lpszUrlName, __in_opt LPCSTR lpszLocalFileName, __in FILETIME ExpireTime, __in FILETIME LastModifiedTime, __in DWORD CacheEntryType, __in_ecount_opt(dwHeaderSize) LPCSTR lpHeaderInfo, __in DWORD dwHeaderSize, __reserved LPCSTR lpszFileExtension, __in_opt LPCSTR lpszOriginalUrl ); CommitUrlCacheEntryW( __in LPCWSTR lpszUrlName, __in_opt LPCWSTR lpszLocalFileName, __in FILETIME ExpireTime, __in FILETIME LastModifiedTime, __in DWORD CacheEntryType, __in_ecount_opt(dwHeaderSize) LPCWSTR lpHeaderInfo, __in DWORD dwHeaderSize, __reserved LPCWSTR lpszFileExtension, __in_opt LPCWSTR lpszOriginalUrl ); #ifdef UNICODE #define CommitUrlCacheEntry CommitUrlCacheEntryW #else #define CommitUrlCacheEntry CommitUrlCacheEntryA #endif // !UNICODE #endif
James Hawkins wrote:
#ifndef USE_FIXED_COMMIT_URL_CACHE_ENTRY // Temporary state of affairs until we reconcile our apis.
Thanks, James. Maybe one day, then. :)
-- Andy.