diff --git a/dll/win32/netcfgx/precomp.h b/dll/win32/netcfgx/precomp.h index 1d6c3c9120e..5dc48127705 100644 --- a/dll/win32/netcfgx/precomp.h +++ b/dll/win32/netcfgx/precomp.h @@ -25,6 +25,7 @@ #include #include +#include #include diff --git a/dll/win32/netcfgx/tcpipconf_notify.c b/dll/win32/netcfgx/tcpipconf_notify.c index c76494fc806..3f2336e2653 100644 --- a/dll/win32/netcfgx/tcpipconf_notify.c +++ b/dll/win32/netcfgx/tcpipconf_notify.c @@ -100,6 +100,7 @@ typedef struct const INetCfgComponentControl *lpVtbl; const INetCfgComponentPropertyUi *lpVtblCompPropertyUi; const INetCfgComponentSetup *lpVtblCompSetup; + const ITcpipProperties *lpVtblTcpipProperties; LONG ref; IUnknown *pUnknown; INetCfg *pNCfg; @@ -159,6 +160,11 @@ static __inline LPTcpipConfNotifyImpl impl_from_INetCfgComponentSetup(INetCfgCom return (TcpipConfNotifyImpl*)((char *)iface - FIELD_OFFSET(TcpipConfNotifyImpl, lpVtblCompSetup)); } +static __inline LPTcpipConfNotifyImpl impl_from_ITcpipProperties(ITcpipProperties *iface) +{ + return (TcpipConfNotifyImpl*)((char *)iface - FIELD_OFFSET(TcpipConfNotifyImpl, lpVtblTcpipProperties)); +} + INT GetSelectedItem(HWND hDlgCtrl); HRESULT InitializeTcpipBasicDlgCtrls(HWND hwndDlg, TcpipConfNotifyImpl *This); VOID InsertColumnToListView(HWND hDlgCtrl, UINT ResId, UINT SubItem, UINT Size); @@ -3602,6 +3608,12 @@ INetCfgComponentControl_fnQueryInterface( INetCfgComponentControl_AddRef(iface); return S_OK; } + else if (IsEqualIID(iid, &IID_ITcpipProperties)) + { + *ppvObj = (LPVOID*)&This->lpVtblTcpipProperties; + INetCfgComponentControl_AddRef(iface); + return S_OK; + } return E_NOINTERFACE; } @@ -4185,6 +4197,63 @@ static const INetCfgComponentSetupVtbl vt_NetCfgComponentSetup = INetCfgComponentSetup_fnRemoving }; + +/*************************************************************** + * ITcpipProperties interface + */ + +HRESULT +WINAPI +ITcpipProperties_fnQueryInterface( + ITcpipProperties *iface, + REFIID iid, + LPVOID *ppvObj) +{ + TRACE("ITcpipProperties_fnQueryInterface()\n"); + TcpipConfNotifyImpl *This = impl_from_ITcpipProperties(iface); + return INetCfgComponentControl_QueryInterface((INetCfgComponentControl*)This, iid, ppvObj); +} + +ULONG +WINAPI +ITcpipProperties_fnAddRef( + ITcpipProperties *iface) +{ + TRACE("ITcpipProperties_fnAddRef()\n"); + TcpipConfNotifyImpl *This = impl_from_ITcpipProperties(iface); + return INetCfgComponentControl_AddRef((INetCfgComponentControl*)This); +} + +ULONG +WINAPI +ITcpipProperties_fnRelease( + ITcpipProperties *iface) +{ + TRACE("ITcpipProperties_fnRelease()\n"); + TcpipConfNotifyImpl *This = impl_from_ITcpipProperties(iface); + return INetCfgComponentControl_Release((INetCfgComponentControl*)This); +} + +HRESULT +WINAPI +ITcpipProperties_fnUnknown1( + ITcpipProperties *iface, + DWORD dwParam1, + DWORD dwParam2) +{ + ERR("ITcpipProperties_fnUnknown1(0x%lx 0x%lx)\n", dwParam1, dwParam2); +// TcpipConfNotifyImpl *This = impl_from_ITcpipProperties(iface); + return S_OK; +} + +static const ITcpipPropertiesVtbl vt_TcpipProperties = +{ + ITcpipProperties_fnQueryInterface, + ITcpipProperties_fnAddRef, + ITcpipProperties_fnRelease, + ITcpipProperties_fnUnknown1, +}; + HRESULT WINAPI TcpipConfigNotify_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) @@ -4202,6 +4271,7 @@ TcpipConfigNotify_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) This->lpVtbl = (const INetCfgComponentControl*)&vt_NetCfgComponentControl; This->lpVtblCompPropertyUi = (const INetCfgComponentPropertyUi*)&vt_NetCfgComponentPropertyUi; This->lpVtblCompSetup = (const INetCfgComponentSetup*)&vt_NetCfgComponentSetup; + This->lpVtblTcpipProperties = (const ITcpipProperties*)&vt_TcpipProperties; This->pNCfg = NULL; This->pUnknown = NULL; This->pNComp = NULL; diff --git a/sdk/include/reactos/netcfgn_undoc.h b/sdk/include/reactos/netcfgn_undoc.h new file mode 100644 index 00000000000..0e104bd504f --- /dev/null +++ b/sdk/include/reactos/netcfgn_undoc.h @@ -0,0 +1,27 @@ +#ifndef __NETCFGN_UNDOC_H__ +#define __NETCFGN_UNDOC_H__ + +#undef INTERFACE +#define INTERFACE ITcpipProperties +DECLARE_INTERFACE_(ITcpipProperties, IUnknown) +{ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD_(HRESULT,Unknown1)(THIS_ DWORD dwParam1, DWORD dwParam2) PURE; + /* ??? */ +}; +#undef INTERFACE + +EXTERN_C const IID IID_ITcpipProperties; + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define ITcpipProperties_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define ITcpipProperties_AddRef(p) (p)->lpVtbl->AddRef(p) +#define ITcpipProperties_Release(p) (p)->lpVtbl->Release(p) +#define ITcpipProperties_Unknown1(p,a,b) (p)->lpVtbl->Unknown1(p,a,b) +/* ??? */ +#endif + +#endif /* __NETCFGX_UNDOC_H__ */