mirror of
https://github.com/reactos/reactos.git
synced 2026-05-23 15:50:29 +08:00
[REACTOS][NETCFGX] Add the undocumented ITcpipProperties interface to the tcpip notify object
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <cfgmgr32.h>
|
||||
|
||||
#include <netcfgx_undoc.h>
|
||||
#include <netcfgn_undoc.h>
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
27
sdk/include/reactos/netcfgn_undoc.h
Normal file
27
sdk/include/reactos/netcfgn_undoc.h
Normal file
@@ -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__ */
|
||||
Reference in New Issue
Block a user