From 526a79ce029cd9973f8a7c66bd5f9dc9d835ec0f Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 10 May 2026 02:13:27 +0200 Subject: [PATCH] [NETCFGX] Retrieve remaining interfaces from notify OBJECT_BASED_STORAGE_DEVICE - Retrieve the INetCfgComponentNotifyBinding, INetCfgComponentNotifyGlobal and INetCfgComponentUpperEdge interfaces from notify objects. - If implemented by a notify object, call INetCfgComponentNotifyGlobal::GetSupportedNotifications right after the initialization of a notify object. --- dll/win32/netcfgx/inetcfgcomp_iface.c | 27 +++++++++++++++++++++++++++ dll/win32/netcfgx/precomp.h | 4 ++++ 2 files changed, 31 insertions(+) diff --git a/dll/win32/netcfgx/inetcfgcomp_iface.c b/dll/win32/netcfgx/inetcfgcomp_iface.c index 21ccf824d8f..eac3dee909f 100644 --- a/dll/win32/netcfgx/inetcfgcomp_iface.c +++ b/dll/win32/netcfgx/inetcfgcomp_iface.c @@ -583,6 +583,9 @@ CreateNotifyObject( INetCfgComponentControl *pControl; INetCfgComponentPropertyUi *pPropertyUi; INetCfgComponentSetup *pSetup; + INetCfgComponentNotifyBinding *pNotifyBinding; + INetCfgComponentNotifyGlobal *pNotifyGlobal; + INetCfgComponentUpperEdge *pUpperEdge; HRESULT hr; LONG lRet; CLSID ClassGUID; @@ -652,8 +655,32 @@ CreateNotifyObject( This->pItem->pSetup = pSetup; } + hr = INetCfgComponentControl_QueryInterface(pControl, &IID_INetCfgComponentNotifyBinding, (LPVOID*)&pNotifyBinding); + if (SUCCEEDED(hr)) + { + This->pItem->pNotifyBinding = pNotifyBinding; + } + + hr = INetCfgComponentControl_QueryInterface(pControl, &IID_INetCfgComponentNotifyGlobal, (LPVOID*)&pNotifyGlobal); + if (SUCCEEDED(hr)) + { + This->pItem->pNotifyGlobal = pNotifyGlobal; + } + + hr = INetCfgComponentControl_QueryInterface(pControl, &IID_INetCfgComponentUpperEdge, (LPVOID*)&pUpperEdge); + if (SUCCEEDED(hr)) + { + This->pItem->pUpperEdge = pUpperEdge; + } + INetCfgComponentControl_Initialize(pControl, iface, This->pNCfg, FALSE); + if (This->pItem->pNotifyGlobal) + { + INetCfgComponentNotifyGlobal_GetSupportedNotifications(This->pItem->pNotifyGlobal, + &This->pItem->dwSupportedNotifications); + } + return S_OK; } diff --git a/dll/win32/netcfgx/precomp.h b/dll/win32/netcfgx/precomp.h index c36511eb6d5..e4186b2f430 100644 --- a/dll/win32/netcfgx/precomp.h +++ b/dll/win32/netcfgx/precomp.h @@ -54,9 +54,13 @@ typedef struct tagNetCfgComponentItem LPWSTR pszUpperRange; LPWSTR pszLowerRange; LPWSTR pszBinding; + DWORD dwSupportedNotifications; INetCfgComponentControl *pControl; INetCfgComponentPropertyUi *pPropertyUi; INetCfgComponentSetup *pSetup; + INetCfgComponentNotifyBinding *pNotifyBinding; + INetCfgComponentNotifyGlobal *pNotifyGlobal; + INetCfgComponentUpperEdge *pUpperEdge; struct tagNetCfgComponentItem *pNext; } NetCfgComponentItem;