From 2a40a01d4ae18bd931bf727503ee0bfc854fee33 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 5 Apr 2026 12:43:04 +0200 Subject: [PATCH] [NETCFGX] Call the ApplyProperties or CancelProperties method Call the ApplyProperties or CancelProperties method when the user clicks the OK or Cancel button of the property sheet. --- dll/win32/netcfgx/inetcfgcomp_iface.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dll/win32/netcfgx/inetcfgcomp_iface.c b/dll/win32/netcfgx/inetcfgcomp_iface.c index 4f7467a77bf..064eb0030c4 100644 --- a/dll/win32/netcfgx/inetcfgcomp_iface.c +++ b/dll/win32/netcfgx/inetcfgcomp_iface.c @@ -720,12 +720,23 @@ INetCfgComponent_fnRaisePropertyUi( CoTaskMemFree(hppages); if (iResult > 0) { + hr = INetCfgComponentPropertyUi_ApplyProperties(This->pProperty); /* indicate that settings should be stored */ - This->pItem->bChanged = TRUE; - return S_OK; + if (hr == S_OK) + This->pItem->bChanged = TRUE; } - return S_FALSE; + else if (iResult == 0) + { + hr = INetCfgComponentPropertyUi_CancelProperties(This->pProperty); + } + else + { + hr = S_FALSE; + } + + return hr; } + static const INetCfgComponentVtbl vt_NetCfgComponent = { INetCfgComponent_fnQueryInterface,