[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.
This commit is contained in:
Eric Kohl
2026-05-10 02:13:27 +02:00
parent 7066dcccae
commit 526a79ce02
2 changed files with 31 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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;