From b7d74e9ca32b2ffd17bd0f98fde97361b6d5ec0f Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Mon, 1 Aug 2011 13:20:46 +0000 Subject: [PATCH] Fix remaining warnings in ie backend. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/webview_ie.h | 5 +++-- src/msw/webview_ie.cpp | 32 +++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/include/wx/msw/webview_ie.h b/include/wx/msw/webview_ie.h index f7d560cc43..67f3305049 100644 --- a/include/wx/msw/webview_ie.h +++ b/include/wx/msw/webview_ie.h @@ -210,8 +210,9 @@ public: DWORD dwCombineFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved); - HRESULT STDMETHODCALLTYPE CompareUrl(LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, - DWORD dwCompareFlags) + HRESULT STDMETHODCALLTYPE CompareUrl(LPCWSTR WXUNUSED(pwzUrl1), + LPCWSTR WXUNUSED(pwzUrl2), + DWORD WXUNUSED(dwCompareFlags)) { return INET_E_DEFAULT_ACTION; } HRESULT STDMETHODCALLTYPE ParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp index f8e01432e6..9f0c1168b4 100644 --- a/src/msw/webview_ie.cpp +++ b/src/msw/webview_ie.cpp @@ -1077,12 +1077,14 @@ HRESULT VirtualProtocol::Read(void *pv, ULONG cb, ULONG *pcbRead) } HRESULT VirtualProtocol::CombineUrl(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, - DWORD dwCombineFlags, LPWSTR pwzResult, + DWORD WXUNUSED(dwCombineFlags), + LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, - DWORD dwReserved) + DWORD WXUNUSED(dwReserved)) { + wxString newuri = m_handler->CombineURIs(pwzBaseUrl, pwzRelativeUrl); - //Check the buffer we are given can hold the new urll + //Check the buffer we are given can hold the new url if(wxStrlen(newuri) > cchResult) return S_FALSE; @@ -1091,21 +1093,29 @@ HRESULT VirtualProtocol::CombineUrl(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, return S_OK; } -HRESULT VirtualProtocol::ParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, - DWORD dwParseFlags, LPWSTR pwzResult, +HRESULT VirtualProtocol::ParseUrl(LPCWSTR pwzUrl, + PARSEACTION WXUNUSED(ParseAction), + DWORD WXUNUSED(dwParseFlags), + LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, - DWORD dwReserved) + DWORD WXUNUSED(dwReserved)) { - //return INET_E_DEFAULT_ACTION; + //Check the buffer we are given can hold the new url + if(wxStrlen(pwzUrl) > cchResult) + return S_FALSE; + wxStrcpy(pwzResult, pwzUrl); *pcchResult = wxStrlen(pwzResult); return S_OK; } -HRESULT VirtualProtocol::QueryInfo(LPCWSTR pwzUrl, QUERYOPTION OueryOption, - DWORD dwQueryFlags, LPVOID pBuffer, - DWORD cbBuffer, DWORD *pcbBuf, - DWORD dwReserved) +HRESULT VirtualProtocol::QueryInfo(LPCWSTR WXUNUSED(pwzUrl), + QUERYOPTION WXUNUSED(OueryOption), + DWORD WXUNUSED(dwQueryFlags), + LPVOID WXUNUSED(pBuffer), + DWORD WXUNUSED(cbBuffer), + DWORD* WXUNUSED(pcbBuf), + DWORD WXUNUSED(dwReserved)) { return INET_E_DEFAULT_ACTION; } -- 2.47.2