mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
[NETCFGX] Add the interfaces INetCfgBindingInterface and IEnumNetCfgBindingInterface (stubs only).
This commit is contained in:
parent
8d6c9e844c
commit
e57f103d53
4 changed files with 307 additions and 1 deletions
|
@ -9,6 +9,7 @@ list(APPEND SOURCE
|
||||||
classfactory.c
|
classfactory.c
|
||||||
installer.c
|
installer.c
|
||||||
netcfg_iface.c
|
netcfg_iface.c
|
||||||
|
netcfgbindinginterface_iface.c
|
||||||
netcfgbindingpath_iface.c
|
netcfgbindingpath_iface.c
|
||||||
inetcfgcomp_iface.c
|
inetcfgcomp_iface.c
|
||||||
tcpipconf_notify.c
|
tcpipconf_notify.c
|
||||||
|
|
301
dll/win32/netcfgx/netcfgbindinginterface_iface.c
Normal file
301
dll/win32/netcfgx/netcfgbindinginterface_iface.c
Normal file
|
@ -0,0 +1,301 @@
|
||||||
|
#include "precomp.h"
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
const INetCfgBindingInterface *lpVtbl;
|
||||||
|
LONG ref;
|
||||||
|
} INetCfgBindingInterfaceImpl;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
const IEnumNetCfgBindingInterface *lpVtbl;
|
||||||
|
LONG ref;
|
||||||
|
} IEnumNetCfgBindingInterfaceImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
* INetCfgBindingInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
INetCfgBindingInterface_fnQueryInterface(
|
||||||
|
INetCfgBindingInterface *iface,
|
||||||
|
REFIID iid,
|
||||||
|
LPVOID *ppvObj)
|
||||||
|
{
|
||||||
|
INetCfgBindingInterfaceImpl *This = (INetCfgBindingInterfaceImpl*)iface;
|
||||||
|
*ppvObj = NULL;
|
||||||
|
|
||||||
|
if (IsEqualIID (iid, &IID_IUnknown) ||
|
||||||
|
IsEqualIID (iid, &IID_INetCfgBindingInterface))
|
||||||
|
{
|
||||||
|
*ppvObj = This;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
WINAPI
|
||||||
|
INetCfgBindingInterface_fnAddRef(
|
||||||
|
INetCfgBindingInterface *iface)
|
||||||
|
{
|
||||||
|
INetCfgBindingInterfaceImpl *This = (INetCfgBindingInterfaceImpl*)iface;
|
||||||
|
ULONG refCount = InterlockedIncrement(&This->ref);
|
||||||
|
|
||||||
|
return refCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
WINAPI
|
||||||
|
INetCfgBindingInterface_fnRelease(
|
||||||
|
INetCfgBindingInterface *iface)
|
||||||
|
{
|
||||||
|
INetCfgBindingInterfaceImpl *This = (INetCfgBindingInterfaceImpl*)iface;
|
||||||
|
ULONG refCount = InterlockedDecrement(&This->ref);
|
||||||
|
|
||||||
|
if (!refCount)
|
||||||
|
{
|
||||||
|
CoTaskMemFree(This);
|
||||||
|
}
|
||||||
|
return refCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
INetCfgBindingInterface_fnGetName(
|
||||||
|
INetCfgBindingInterface *iface,
|
||||||
|
LPWSTR *ppszwInterfaceName)
|
||||||
|
{
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
INetCfgBindingInterface_fnGetUpperComponent(
|
||||||
|
INetCfgBindingInterface *iface,
|
||||||
|
INetCfgComponent **ppnccItem)
|
||||||
|
{
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
INetCfgBindingInterface_fnGetLowerComponent(
|
||||||
|
INetCfgBindingInterface *iface,
|
||||||
|
INetCfgComponent **ppnccItem)
|
||||||
|
{
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const INetCfgBindingInterfaceVtbl vt_NetCfgBindingInterface =
|
||||||
|
{
|
||||||
|
INetCfgBindingInterface_fnQueryInterface,
|
||||||
|
INetCfgBindingInterface_fnAddRef,
|
||||||
|
INetCfgBindingInterface_fnRelease,
|
||||||
|
INetCfgBindingInterface_fnGetName,
|
||||||
|
INetCfgBindingInterface_fnGetUpperComponent,
|
||||||
|
INetCfgBindingInterface_fnGetLowerComponent,
|
||||||
|
};
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
INetCfgBindingInterface_Constructor(
|
||||||
|
IUnknown *pUnkOuter,
|
||||||
|
REFIID riid,
|
||||||
|
LPVOID *ppv)
|
||||||
|
{
|
||||||
|
INetCfgBindingInterfaceImpl *This;
|
||||||
|
|
||||||
|
if (!ppv)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
This = (INetCfgBindingInterfaceImpl *)CoTaskMemAlloc(sizeof(INetCfgBindingInterfaceImpl));
|
||||||
|
if (!This)
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
This->ref = 1;
|
||||||
|
This->lpVtbl = (const INetCfgBindingInterface*)&vt_NetCfgBindingInterface;
|
||||||
|
|
||||||
|
if (!SUCCEEDED(INetCfgBindingInterface_QueryInterface((INetCfgBindingInterface*)This, riid, ppv)))
|
||||||
|
{
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
INetCfgBindingInterface_Release((INetCfgBindingInterface*)This);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
* IEnumNetCfgBindingInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
IEnumNetCfgBindingInterface_fnQueryInterface(
|
||||||
|
IEnumNetCfgBindingInterface *iface,
|
||||||
|
REFIID iid,
|
||||||
|
LPVOID *ppvObj)
|
||||||
|
{
|
||||||
|
IEnumNetCfgBindingInterfaceImpl *This = (IEnumNetCfgBindingInterfaceImpl*)iface;
|
||||||
|
*ppvObj = NULL;
|
||||||
|
|
||||||
|
if (IsEqualIID (iid, &IID_IUnknown) ||
|
||||||
|
IsEqualIID (iid, &IID_IEnumNetCfgBindingInterface))
|
||||||
|
{
|
||||||
|
*ppvObj = This;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
WINAPI
|
||||||
|
IEnumNetCfgBindingInterface_fnAddRef(
|
||||||
|
IEnumNetCfgBindingInterface *iface)
|
||||||
|
{
|
||||||
|
IEnumNetCfgBindingInterfaceImpl *This = (IEnumNetCfgBindingInterfaceImpl*)iface;
|
||||||
|
ULONG refCount = InterlockedIncrement(&This->ref);
|
||||||
|
|
||||||
|
return refCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
WINAPI
|
||||||
|
IEnumNetCfgBindingInterface_fnRelease(
|
||||||
|
IEnumNetCfgBindingInterface *iface)
|
||||||
|
{
|
||||||
|
IEnumNetCfgBindingInterfaceImpl *This = (IEnumNetCfgBindingInterfaceImpl*)iface;
|
||||||
|
ULONG refCount = InterlockedDecrement(&This->ref);
|
||||||
|
|
||||||
|
return refCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
IEnumNetCfgBindingInterface_fnNext(
|
||||||
|
IEnumNetCfgBindingInterface *iface,
|
||||||
|
ULONG celt,
|
||||||
|
INetCfgBindingInterface **rgelt,
|
||||||
|
ULONG *pceltFetched)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
IEnumNetCfgBindingInterfaceImpl *This = (IEnumNetCfgBindingInterfaceImpl*)iface;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
if (!iface || !rgelt)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
if (celt != 1)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (!This->pCurrent)
|
||||||
|
return S_FALSE;
|
||||||
|
|
||||||
|
hr = INetCfgBindingInterface_Constructor(NULL, &IID_INetCfgBindingInterface, (LPVOID*)rgelt);
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
This->pCurrent = This->pCurrent->pNext;
|
||||||
|
if (pceltFetched)
|
||||||
|
*pceltFetched = 1;
|
||||||
|
}
|
||||||
|
return hr;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
IEnumNetCfgBindingInterface_fnSkip(
|
||||||
|
IEnumNetCfgBindingInterface *iface,
|
||||||
|
ULONG celt)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
IEnumNetCfgBindingInterfaceImpl *This = (IEnumNetCfgBindingInterfaceImpl*)iface;
|
||||||
|
|
||||||
|
if (!This->pCurrent)
|
||||||
|
return S_FALSE;
|
||||||
|
|
||||||
|
while (celt-- > 0 && This->pCurrent)
|
||||||
|
This->pCurrent = This->pCurrent->pNext;
|
||||||
|
|
||||||
|
if (!celt)
|
||||||
|
return S_OK;
|
||||||
|
else
|
||||||
|
return S_FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
IEnumNetCfgBindingInterface_fnReset(
|
||||||
|
IEnumNetCfgBindingInterface *iface)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
IEnumNetCfgBindingInterfaceImpl *This = (IEnumNetCfgBindingInterfaceImpl*)iface;
|
||||||
|
|
||||||
|
This->pCurrent = This->pHead;
|
||||||
|
return S_OK;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
IEnumNetCfgBindingInterface_fnClone(
|
||||||
|
IEnumNetCfgBindingInterface *iface,
|
||||||
|
IEnumNetCfgBindingInterface **ppenum)
|
||||||
|
{
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const IEnumNetCfgBindingInterfaceVtbl vt_EnumNetCfgBindingInterface =
|
||||||
|
{
|
||||||
|
IEnumNetCfgBindingInterface_fnQueryInterface,
|
||||||
|
IEnumNetCfgBindingInterface_fnAddRef,
|
||||||
|
IEnumNetCfgBindingInterface_fnRelease,
|
||||||
|
IEnumNetCfgBindingInterface_fnNext,
|
||||||
|
IEnumNetCfgBindingInterface_fnSkip,
|
||||||
|
IEnumNetCfgBindingInterface_fnReset,
|
||||||
|
IEnumNetCfgBindingInterface_fnClone
|
||||||
|
};
|
||||||
|
|
||||||
|
HRESULT
|
||||||
|
WINAPI
|
||||||
|
IEnumNetCfgBindingInterface_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
|
||||||
|
{
|
||||||
|
IEnumNetCfgBindingInterfaceImpl *This;
|
||||||
|
|
||||||
|
if (!ppv)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
This = (IEnumNetCfgBindingInterfaceImpl *)CoTaskMemAlloc(sizeof(IEnumNetCfgBindingInterfaceImpl));
|
||||||
|
if (!This)
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
This->ref = 1;
|
||||||
|
This->lpVtbl = (const IEnumNetCfgBindingInterface*)&vt_EnumNetCfgBindingInterface;
|
||||||
|
#if 0
|
||||||
|
This->pCurrent = pItem;
|
||||||
|
This->pHead = pItem;
|
||||||
|
This->pNCfg = pNCfg;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (!SUCCEEDED (IEnumNetCfgBindingInterface_QueryInterface((INetCfgBindingInterface*)This, riid, ppv)))
|
||||||
|
{
|
||||||
|
IEnumNetCfgBindingInterface_Release((INetCfg*)This);
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumNetCfgBindingInterface_Release((IEnumNetCfgBindingInterface*)This);
|
||||||
|
return S_OK;
|
||||||
|
}
|
|
@ -131,7 +131,7 @@ INetCfgBindingPath_fnEnumBindingInterfaces(
|
||||||
INetCfgBindingPath *iface,
|
INetCfgBindingPath *iface,
|
||||||
IEnumNetCfgBindingInterface **ppenumInterface)
|
IEnumNetCfgBindingInterface **ppenumInterface)
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return IEnumNetCfgBindingInterface_Constructor(NULL, &IID_IEnumNetCfgBindingInterface, (LPVOID *)ppenumInterface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const INetCfgBindingPathVtbl vt_NetCfgBindingPath =
|
static const INetCfgBindingPathVtbl vt_NetCfgBindingPath =
|
||||||
|
|
|
@ -64,6 +64,10 @@ extern HINSTANCE netcfgx_hInstance;
|
||||||
HRESULT WINAPI INetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, NetCfgComponentItem * pItem,INetCfg * iface);
|
HRESULT WINAPI INetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, NetCfgComponentItem * pItem,INetCfg * iface);
|
||||||
HRESULT WINAPI IEnumNetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, NetCfgComponentItem * pItem, INetCfg * iface);
|
HRESULT WINAPI IEnumNetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, NetCfgComponentItem * pItem, INetCfg * iface);
|
||||||
|
|
||||||
|
/* netcfgbindinginterface_iface.c */
|
||||||
|
HRESULT WINAPI INetCfgBindingInterface_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv);
|
||||||
|
HRESULT WINAPI IEnumNetCfgBindingInterface_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv);
|
||||||
|
|
||||||
/* netcfgbindingpath_iface.c */
|
/* netcfgbindingpath_iface.c */
|
||||||
HRESULT WINAPI INetCfgBindingPath_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv);
|
HRESULT WINAPI INetCfgBindingPath_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv);
|
||||||
HRESULT WINAPI IEnumNetCfgBindingPath_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, DWORD dwFlags);
|
HRESULT WINAPI IEnumNetCfgBindingPath_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, DWORD dwFlags);
|
||||||
|
|
Loading…
Reference in a new issue