1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-30 18:24:36 +01:00

Weather: Fixed a bug that prevented the widget from working when WebView2 Runtime >= 102.0.1245.33

This commit is contained in:
Valentin Radu 2022-06-07 19:35:41 +03:00
parent 552a2e2040
commit 961cc11dda
2 changed files with 94 additions and 12 deletions

View File

@ -100,10 +100,85 @@ ULONG STDMETHODCALLTYPE epw_Weather_static_AddRefRelease(void* _this)
return 1; return 1;
} }
HRESULT STDMETHODCALLTYPE epw_Weather_static_QueryInterface(void* _this, REFIID riid, void** ppv) HRESULT STDMETHODCALLTYPE ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_QueryInterface(void* _this, REFIID riid, void** ppv)
{ {
*ppv = _this; if (IsEqualIID(riid, &IID_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler) || IsEqualIID(riid, &IID_IUnknown))
return S_OK; {
*ppv = _this;
return S_OK;
}
return E_NOINTERFACE;
}
HRESULT STDMETHODCALLTYPE ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_QueryInterface(void* _this, REFIID riid, void** ppv)
{
if (IsEqualIID(riid, &IID_ICoreWebView2CreateCoreWebView2ControllerCompletedHandler) || IsEqualIID(riid, &IID_IUnknown))
{
*ppv = _this;
return S_OK;
}
return E_NOINTERFACE;
}
HRESULT STDMETHODCALLTYPE ICoreWebView2NavigationStartingEventHandler_QueryInterface(void* _this, REFIID riid, void** ppv)
{
if (IsEqualIID(riid, &IID_ICoreWebView2NavigationStartingEventHandler) || IsEqualIID(riid, &IID_IUnknown))
{
*ppv = _this;
return S_OK;
}
return E_NOINTERFACE;
}
HRESULT STDMETHODCALLTYPE ICoreWebView2NavigationCompletedEventHandler_QueryInterface(void* _this, REFIID riid, void** ppv)
{
if (IsEqualIID(riid, &IID_ICoreWebView2NavigationCompletedEventHandler) || IsEqualIID(riid, &IID_IUnknown))
{
*ppv = _this;
return S_OK;
}
return E_NOINTERFACE;
}
HRESULT STDMETHODCALLTYPE ICoreWebView2ExecuteScriptCompletedHandler_QueryInterface(void* _this, REFIID riid, void** ppv)
{
if (IsEqualIID(riid, &IID_ICoreWebView2ExecuteScriptCompletedHandler) || IsEqualIID(riid, &IID_IUnknown))
{
*ppv = _this;
return S_OK;
}
return E_NOINTERFACE;
}
HRESULT STDMETHODCALLTYPE ICoreWebView2EnvironmentOptions_QueryInterface(void* _this, REFIID riid, void** ppv)
{
if (IsEqualIID(riid, &IID_ICoreWebView2EnvironmentOptions) || IsEqualIID(riid, &IID_IUnknown))
{
*ppv = _this;
return S_OK;
}
return E_NOINTERFACE;
}
HRESULT STDMETHODCALLTYPE ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_QueryInterface(void* _this, REFIID riid, void** ppv)
{
if (IsEqualIID(riid, &IID_ICoreWebView2CallDevToolsProtocolMethodCompletedHandler) || IsEqualIID(riid, &IID_IUnknown))
{
*ppv = _this;
return S_OK;
}
return E_NOINTERFACE;
}
HRESULT STDMETHODCALLTYPE ICoreWebView2PermissionRequestedEventHandler_QueryInterface(void* _this, REFIID riid, void** ppv)
{
if (IsEqualIID(riid, &IID_ICoreWebView2PermissionRequestedEventHandler) || IsEqualIID(riid, &IID_IUnknown))
{
*ppv = _this;
return S_OK;
}
return E_NOINTERFACE;
} }
HRESULT STDMETHODCALLTYPE ICoreWebView2_get_AdditionalBrowserArguments(ICoreWebView2EnvironmentOptions* _this, LPWSTR* value) HRESULT STDMETHODCALLTYPE ICoreWebView2_get_AdditionalBrowserArguments(ICoreWebView2EnvironmentOptions* _this, LPWSTR* value)

View File

@ -165,7 +165,6 @@ static void epw_Weather_SetTextScaleFactorFromRegistry(EPWeather* _this, HKEY hK
HRESULT STDMETHODCALLTYPE epw_Weather_static_Stub(void* _this); HRESULT STDMETHODCALLTYPE epw_Weather_static_Stub(void* _this);
ULONG STDMETHODCALLTYPE epw_Weather_static_AddRefRelease(EPWeather* _this); ULONG STDMETHODCALLTYPE epw_Weather_static_AddRefRelease(EPWeather* _this);
HRESULT STDMETHODCALLTYPE epw_Weather_static_QueryInterface(EPWeather* _this, REFIID riid, void** ppv);
HRESULT STDMETHODCALLTYPE ICoreWebView2_CreateCoreWebView2EnvironmentCompleted(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* _this, HRESULT errorCode, ICoreWebView2Environment* pCoreWebView2Environment); HRESULT STDMETHODCALLTYPE ICoreWebView2_CreateCoreWebView2EnvironmentCompleted(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* _this, HRESULT errorCode, ICoreWebView2Environment* pCoreWebView2Environment);
HRESULT STDMETHODCALLTYPE ICoreWebView2_CreateCoreWebView2ControllerCompleted(ICoreWebView2CreateCoreWebView2ControllerCompletedHandler* _this, HRESULT hr, ICoreWebView2Controller* pCoreWebView2Controller); HRESULT STDMETHODCALLTYPE ICoreWebView2_CreateCoreWebView2ControllerCompleted(ICoreWebView2CreateCoreWebView2ControllerCompletedHandler* _this, HRESULT hr, ICoreWebView2Controller* pCoreWebView2Controller);
@ -181,8 +180,9 @@ HRESULT STDMETHODCALLTYPE ICoreWebView2_CallDevToolsProtocolMethodCompleted(ICor
HRESULT STDMETHODCALLTYPE ICoreWebView2_PermissionRequested(ICoreWebView2PermissionRequestedEventHandler* _this2, ICoreWebView2* pCoreWebView2, ICoreWebView2PermissionRequestedEventArgs* pCoreWebView2PermissionRequestedEventArgs); HRESULT STDMETHODCALLTYPE ICoreWebView2_PermissionRequested(ICoreWebView2PermissionRequestedEventHandler* _this2, ICoreWebView2* pCoreWebView2, ICoreWebView2PermissionRequestedEventArgs* pCoreWebView2PermissionRequestedEventArgs);
HRESULT STDMETHODCALLTYPE ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_QueryInterface(void* _this, REFIID riid, void** ppv);
static const ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl EPWeather_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl = { static const ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl EPWeather_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface, .QueryInterface = ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease, .AddRef = epw_Weather_static_AddRefRelease,
.Release = epw_Weather_static_AddRefRelease, .Release = epw_Weather_static_AddRefRelease,
.Invoke = ICoreWebView2_CreateCoreWebView2EnvironmentCompleted, .Invoke = ICoreWebView2_CreateCoreWebView2EnvironmentCompleted,
@ -192,8 +192,9 @@ static const ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler EPWeathe
.lpVtbl = &EPWeather_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl .lpVtbl = &EPWeather_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl
}; };
HRESULT STDMETHODCALLTYPE ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_QueryInterface(void* _this, REFIID riid, void** ppv);
static const ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl EPWeather_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl = { static const ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl EPWeather_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface, .QueryInterface = ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease, .AddRef = epw_Weather_static_AddRefRelease,
.Release = epw_Weather_static_AddRefRelease, .Release = epw_Weather_static_AddRefRelease,
.Invoke = ICoreWebView2_CreateCoreWebView2ControllerCompleted, .Invoke = ICoreWebView2_CreateCoreWebView2ControllerCompleted,
@ -203,8 +204,9 @@ static const ICoreWebView2CreateCoreWebView2ControllerCompletedHandler EPWeather
.lpVtbl = &EPWeather_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl .lpVtbl = &EPWeather_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl
}; };
HRESULT STDMETHODCALLTYPE ICoreWebView2NavigationStartingEventHandler_QueryInterface(void* _this, REFIID riid, void** ppv);
static const ICoreWebView2NavigationStartingEventHandlerVtbl EPWeather_ICoreWebView2NavigationStartingEventHandlerVtbl = { static const ICoreWebView2NavigationStartingEventHandlerVtbl EPWeather_ICoreWebView2NavigationStartingEventHandlerVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface, .QueryInterface = ICoreWebView2NavigationStartingEventHandler_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease, .AddRef = epw_Weather_static_AddRefRelease,
.Release = epw_Weather_static_AddRefRelease, .Release = epw_Weather_static_AddRefRelease,
.Invoke = ICoreWebView2_NavigationStarting, .Invoke = ICoreWebView2_NavigationStarting,
@ -214,8 +216,9 @@ static const ICoreWebView2NavigationStartingEventHandler EPWeather_ICoreWebView2
.lpVtbl = &EPWeather_ICoreWebView2NavigationStartingEventHandlerVtbl .lpVtbl = &EPWeather_ICoreWebView2NavigationStartingEventHandlerVtbl
}; };
HRESULT STDMETHODCALLTYPE ICoreWebView2NavigationCompletedEventHandler_QueryInterface(void* _this, REFIID riid, void** ppv);
static const ICoreWebView2NavigationCompletedEventHandlerVtbl EPWeather_ICoreWebView2NavigationCompletedEventHandlerVtbl = { static const ICoreWebView2NavigationCompletedEventHandlerVtbl EPWeather_ICoreWebView2NavigationCompletedEventHandlerVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface, .QueryInterface = ICoreWebView2NavigationCompletedEventHandler_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease, .AddRef = epw_Weather_static_AddRefRelease,
.Release = epw_Weather_static_AddRefRelease, .Release = epw_Weather_static_AddRefRelease,
.Invoke = ICoreWebView2_NavigationCompleted, .Invoke = ICoreWebView2_NavigationCompleted,
@ -225,8 +228,9 @@ static const ICoreWebView2NavigationCompletedEventHandler EPWeather_ICoreWebView
.lpVtbl = &EPWeather_ICoreWebView2NavigationCompletedEventHandlerVtbl .lpVtbl = &EPWeather_ICoreWebView2NavigationCompletedEventHandlerVtbl
}; };
HRESULT STDMETHODCALLTYPE ICoreWebView2ExecuteScriptCompletedHandler_QueryInterface(void* _this, REFIID riid, void** ppv);
static const ICoreWebView2ExecuteScriptCompletedHandlerVtbl EPWeather_ICoreWebView2ExecuteScriptCompletedHandlerVtbl = { static const ICoreWebView2ExecuteScriptCompletedHandlerVtbl EPWeather_ICoreWebView2ExecuteScriptCompletedHandlerVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface, .QueryInterface = ICoreWebView2ExecuteScriptCompletedHandler_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease, .AddRef = epw_Weather_static_AddRefRelease,
.Release = epw_Weather_static_AddRefRelease, .Release = epw_Weather_static_AddRefRelease,
.Invoke = ICoreWebView2_ExecuteScriptCompleted, .Invoke = ICoreWebView2_ExecuteScriptCompleted,
@ -236,8 +240,9 @@ static const ICoreWebView2ExecuteScriptCompletedHandler EPWeather_ICoreWebView2E
.lpVtbl = &EPWeather_ICoreWebView2ExecuteScriptCompletedHandlerVtbl .lpVtbl = &EPWeather_ICoreWebView2ExecuteScriptCompletedHandlerVtbl
}; };
HRESULT STDMETHODCALLTYPE ICoreWebView2EnvironmentOptions_QueryInterface(void* _this, REFIID riid, void** ppv);
static const ICoreWebView2EnvironmentOptionsVtbl EPWeather_ICoreWebView2EnvironmentOptionsVtbl = { static const ICoreWebView2EnvironmentOptionsVtbl EPWeather_ICoreWebView2EnvironmentOptionsVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface, .QueryInterface = ICoreWebView2EnvironmentOptions_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease, .AddRef = epw_Weather_static_AddRefRelease,
.Release = epw_Weather_static_AddRefRelease, .Release = epw_Weather_static_AddRefRelease,
.get_AdditionalBrowserArguments = ICoreWebView2_get_AdditionalBrowserArguments, .get_AdditionalBrowserArguments = ICoreWebView2_get_AdditionalBrowserArguments,
@ -254,8 +259,9 @@ static const ICoreWebView2EnvironmentOptions EPWeather_ICoreWebView2EnvironmentO
.lpVtbl = &EPWeather_ICoreWebView2EnvironmentOptionsVtbl .lpVtbl = &EPWeather_ICoreWebView2EnvironmentOptionsVtbl
}; };
HRESULT STDMETHODCALLTYPE ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_QueryInterface(void* _this, REFIID riid, void** ppv);
static ICoreWebView2CallDevToolsProtocolMethodCompletedHandlerVtbl EPWeather_ICoreWebView2CallDevToolsProtocolMethodCompletedHandlerVtbl = { static ICoreWebView2CallDevToolsProtocolMethodCompletedHandlerVtbl EPWeather_ICoreWebView2CallDevToolsProtocolMethodCompletedHandlerVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface, .QueryInterface = ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease, .AddRef = epw_Weather_static_AddRefRelease,
.Release = epw_Weather_static_AddRefRelease, .Release = epw_Weather_static_AddRefRelease,
.Invoke = ICoreWebView2_CallDevToolsProtocolMethodCompleted .Invoke = ICoreWebView2_CallDevToolsProtocolMethodCompleted
@ -265,8 +271,9 @@ static const ICoreWebView2CallDevToolsProtocolMethodCompletedHandler EPWeather_I
.lpVtbl = &EPWeather_ICoreWebView2CallDevToolsProtocolMethodCompletedHandlerVtbl .lpVtbl = &EPWeather_ICoreWebView2CallDevToolsProtocolMethodCompletedHandlerVtbl
}; };
HRESULT STDMETHODCALLTYPE ICoreWebView2PermissionRequestedEventHandler_QueryInterface(void* _this, REFIID riid, void** ppv);
static const ICoreWebView2PermissionRequestedEventHandlerVtbl EPWeather_ICoreWebView2PermissionRequestedEventHandlerVtbl = { static const ICoreWebView2PermissionRequestedEventHandlerVtbl EPWeather_ICoreWebView2PermissionRequestedEventHandlerVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface, .QueryInterface = ICoreWebView2PermissionRequestedEventHandler_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease, .AddRef = epw_Weather_static_AddRefRelease,
.Release = epw_Weather_static_AddRefRelease, .Release = epw_Weather_static_AddRefRelease,
.Invoke = ICoreWebView2_PermissionRequested, .Invoke = ICoreWebView2_PermissionRequested,