Skip to content

Commit 01a0906

Browse files
committed
[NETCFGX] Move the pointer(s) to notification object interfaces into the component item
1 parent 1bdaeee commit 01a0906

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

dll/win32/netcfgx/inetcfgcomp_iface.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ typedef struct
77
const INetCfgComponentPrivate *lpVtblPrivate;
88
LONG ref;
99
NetCfgComponentItem * pItem;
10-
INetCfgComponentPropertyUi * pProperty;
1110
INetCfg * pNCfg;
1211
} INetCfgComponentImpl;
1312

@@ -647,8 +646,9 @@ CreateNotificationObject(
647646
INetCfgComponentPropertyUi_Release(pNCCPU);
648647
return hr;
649648
}
650-
This->pProperty = pNCCPU;
649+
651650
This->pItem->pNCCC = pNCCC;
651+
This->pItem->pProperty = pNCCPU;
652652

653653
return S_OK;
654654
}
@@ -686,7 +686,7 @@ INetCfgComponent_fnRaisePropertyUi(
686686
INT_PTR iResult;
687687
INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface;
688688

689-
if (!This->pProperty)
689+
if (!This->pItem->pProperty)
690690
{
691691
hr = CreateNotificationObject(This,iface, pUnk);
692692
if (FAILED(hr))
@@ -699,7 +699,7 @@ INetCfgComponent_fnRaisePropertyUi(
699699
dwDefPages = 0;
700700
Pages = 0;
701701

702-
hr = INetCfgComponentPropertyUi_MergePropPages(This->pProperty, &dwDefPages, (BYTE**)&hppages, &Pages, hwndParent, NULL);
702+
hr = INetCfgComponentPropertyUi_MergePropPages(This->pItem->pProperty, &dwDefPages, (BYTE**)&hppages, &Pages, hwndParent, NULL);
703703
if (FAILED(hr) || !Pages)
704704
{
705705
return hr;
@@ -720,14 +720,14 @@ INetCfgComponent_fnRaisePropertyUi(
720720
CoTaskMemFree(hppages);
721721
if (iResult > 0)
722722
{
723-
hr = INetCfgComponentPropertyUi_ApplyProperties(This->pProperty);
723+
hr = INetCfgComponentPropertyUi_ApplyProperties(This->pItem->pProperty);
724724
/* indicate that settings should be stored */
725725
if (hr == S_OK)
726726
This->pItem->bChanged = TRUE;
727727
}
728728
else if (iResult == 0)
729729
{
730-
hr = INetCfgComponentPropertyUi_CancelProperties(This->pProperty);
730+
hr = INetCfgComponentPropertyUi_CancelProperties(This->pItem->pProperty);
731731
}
732732
else
733733
{
@@ -773,7 +773,6 @@ INetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, N
773773
This->lpVtbl = (const INetCfgComponent*)&vt_NetCfgComponent;
774774
This->lpVtblBindings = (const INetCfgComponentBindings*)&vt_NetCfgComponentBindings;
775775
This->lpVtblPrivate = (const INetCfgComponentPrivate*)&vt_NetCfgComponentPrivate;
776-
This->pProperty = NULL;
777776
This->pItem = pItem;
778777
This->pNCfg = pNCfg;
779778

dll/win32/netcfgx/precomp.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ typedef struct tagNetCfgComponentItem
5151
ULONG Status; //Y
5252
BOOL bChanged; //Y
5353
LPWSTR pszBinding;
54-
struct tagNetCfgComponentItem * pNext;
55-
INetCfgComponentControl * pNCCC;
54+
INetCfgComponentControl *pNCCC;
55+
INetCfgComponentPropertyUi *pProperty;
56+
struct tagNetCfgComponentItem *pNext;
5657
} NetCfgComponentItem;
5758

5859
typedef struct

0 commit comments

Comments
 (0)