aboutsummaryrefslogtreecommitdiff
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inetutil.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inetutil.cpp b/src/libs/dutil/WixToolset.DUtil/inetutil.cpp
index 8dace55f..c4cddd11 100644
--- a/src/libs/dutil/WixToolset.DUtil/inetutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/inetutil.cpp
@@ -30,16 +30,14 @@ extern "C" HRESULT DAPI InternetGetSizeByHandle(
30 Assert(pllSize); 30 Assert(pllSize);
31 31
32 HRESULT hr = S_OK; 32 HRESULT hr = S_OK;
33 DWORD dwSize = 0; 33 LPWSTR sczValue = NULL;
34 DWORD cb = 0;
35 34
36 cb = sizeof(dwSize); 35 hr = InternetQueryInfoString(hiFile, HTTP_QUERY_CONTENT_LENGTH, &sczValue);
37 if (!::HttpQueryInfoW(hiFile, HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER, reinterpret_cast<LPVOID>(&dwSize), &cb, NULL)) 36 InetExitOnLastError(hr, "Failed to get content length string for internet file handle");
38 { 37
39 InetExitOnLastError(hr, "Failed to get size for internet file handle"); 38 hr = StrStringToInt64(sczValue, 0, pllSize);
40 } 39 InetExitOnLastError(hr, "Failed to parse size for internet file handle: %ls", sczValue);
41 40
42 *pllSize = dwSize;
43LExit: 41LExit:
44 return hr; 42 return hr;
45} 43}