Skip to content

Commit 526a79c

Browse files
committed
[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.
1 parent 7066dcc commit 526a79c

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

‎dll/win32/netcfgx/inetcfgcomp_iface.c‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,9 @@ CreateNotifyObject(
583583
INetCfgComponentControl *pControl;
584584
INetCfgComponentPropertyUi *pPropertyUi;
585585
INetCfgComponentSetup *pSetup;
586+
INetCfgComponentNotifyBinding *pNotifyBinding;
587+
INetCfgComponentNotifyGlobal *pNotifyGlobal;
588+
INetCfgComponentUpperEdge *pUpperEdge;
586589
HRESULT hr;
587590
LONG lRet;
588591
CLSID ClassGUID;
@@ -652,8 +655,32 @@ CreateNotifyObject(
652655
This->pItem->pSetup = pSetup;
653656
}
654657

658+
hr = INetCfgComponentControl_QueryInterface(pControl, &IID_INetCfgComponentNotifyBinding, (LPVOID*)&pNotifyBinding);
659+
if (SUCCEEDED(hr))
660+
{
661+
This->pItem->pNotifyBinding = pNotifyBinding;
662+
}
663+
664+
hr = INetCfgComponentControl_QueryInterface(pControl, &IID_INetCfgComponentNotifyGlobal, (LPVOID*)&pNotifyGlobal);
665+
if (SUCCEEDED(hr))
666+
{
667+
This->pItem->pNotifyGlobal = pNotifyGlobal;
668+
}
669+
670+
hr = INetCfgComponentControl_QueryInterface(pControl, &IID_INetCfgComponentUpperEdge, (LPVOID*)&pUpperEdge);
671+
if (SUCCEEDED(hr))
672+
{
673+
This->pItem->pUpperEdge = pUpperEdge;
674+
}
675+
655676
INetCfgComponentControl_Initialize(pControl, iface, This->pNCfg, FALSE);
656677

678+
if (This->pItem->pNotifyGlobal)
679+
{
680+
INetCfgComponentNotifyGlobal_GetSupportedNotifications(This->pItem->pNotifyGlobal,
681+
&This->pItem->dwSupportedNotifications);
682+
}
683+
657684
return S_OK;
658685
}
659686

‎dll/win32/netcfgx/precomp.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@ typedef struct tagNetCfgComponentItem
5454
LPWSTR pszUpperRange;
5555
LPWSTR pszLowerRange;
5656
LPWSTR pszBinding;
57+
DWORD dwSupportedNotifications;
5758
INetCfgComponentControl *pControl;
5859
INetCfgComponentPropertyUi *pPropertyUi;
5960
INetCfgComponentSetup *pSetup;
61+
INetCfgComponentNotifyBinding *pNotifyBinding;
62+
INetCfgComponentNotifyGlobal *pNotifyGlobal;
63+
INetCfgComponentUpperEdge *pUpperEdge;
6064
struct tagNetCfgComponentItem *pNext;
6165
} NetCfgComponentItem;
6266

0 commit comments

Comments
 (0)