mirror of
https://github.com/reactos/reactos.git
synced 2026-06-02 17:31:23 +08:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user