Author: ekohl
Date: Thu Dec 17 09:32:10 2015
New Revision: 70379
URL:
http://svn.reactos.org/svn/reactos?rev=70379&view=rev
Log:
[NETCFGX]
Implement INetCfgPnpReconfigCallback stub.
Modified:
trunk/reactos/dll/win32/netcfgx/netcfg_iface.c
Modified: trunk/reactos/dll/win32/netcfgx/netcfg_iface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfg_i…
==============================================================================
--- trunk/reactos/dll/win32/netcfgx/netcfg_iface.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netcfgx/netcfg_iface.c [iso-8859-1] Thu Dec 17 09:32:10 2015
@@ -4,6 +4,7 @@
{
const INetCfg * lpVtbl;
const INetCfgLock * lpVtblLock;
+ const INetCfgPnpReconfigCallback *lpVtblPnpReconfigCallback;
LONG ref;
BOOL bInitialized;
HANDLE hMutex;
@@ -18,6 +19,10 @@
return (INetCfgImpl*)((char *)iface - FIELD_OFFSET(INetCfgImpl, lpVtblLock));
}
+static __inline LPINetCfgImpl
impl_from_INetCfgPnpReconfigCallback(INetCfgPnpReconfigCallback *iface)
+{
+ return (INetCfgImpl*)((char *)iface - FIELD_OFFSET(INetCfgImpl,
lpVtblPnpReconfigCallback));
+}
HRESULT
@@ -159,6 +164,63 @@
INetCfgLock_fnReleaseWriteLock,
INetCfgLock_fnIsWriteLocked
};
+
+/***************************************************************
+ * INetCfgPnpReconfigCallback
+ */
+
+HRESULT
+WINAPI
+INetCfgPnpReconfigCallback_fnQueryInterface(
+ INetCfgPnpReconfigCallback * iface,
+ REFIID iid,
+ LPVOID * ppvObj)
+{
+ INetCfgImpl * This = impl_from_INetCfgPnpReconfigCallback(iface);
+ return INetCfg_QueryInterface((INetCfg*)This, iid, ppvObj);
+}
+
+ULONG
+WINAPI
+INetCfgPnpReconfigCallback_fnAddRef(
+ INetCfgPnpReconfigCallback * iface)
+{
+ INetCfgImpl * This = impl_from_INetCfgPnpReconfigCallback(iface);
+
+ return INetCfg_AddRef((INetCfg*)This);
+}
+
+ULONG
+WINAPI
+INetCfgPnpReconfigCallback_fnRelease(
+ INetCfgPnpReconfigCallback * iface)
+{
+ INetCfgImpl * This = impl_from_INetCfgPnpReconfigCallback(iface);
+ return INetCfg_Release((INetCfg*)This);
+}
+
+HRESULT
+WINAPI
+INetCfgPnpReconfigCallback_fnSendPnpReconfig(
+ INetCfgPnpReconfigCallback * iface,
+ NCPNP_RECONFIG_LAYER Layer,
+ LPCWSTR pszwUpper,
+ LPCWSTR pszwLower,
+ PVOID pvData,
+ DWORD dwSizeOfData)
+{
+ /* FIXME */
+ return E_NOTIMPL;
+}
+
+static const INetCfgPnpReconfigCallbackVtbl vt_NetCfgPnpReconfigCallback =
+{
+ INetCfgPnpReconfigCallback_fnQueryInterface,
+ INetCfgPnpReconfigCallback_fnAddRef,
+ INetCfgPnpReconfigCallback_fnRelease,
+ INetCfgPnpReconfigCallback_fnSendPnpReconfig
+};
+
/***************************************************************
* INetCfg
@@ -464,6 +526,15 @@
This->hMutex = CreateMutexW(NULL, FALSE, L"NetCfgLock");
INetCfgLock_AddRef(iface);
+ return S_OK;
+ }
+ else if (IsEqualIID (iid, &IID_INetCfgPnpReconfigCallback))
+ {
+ if (This->bInitialized)
+ return NETCFG_E_ALREADY_INITIALIZED;
+
+ *ppvObj = (LPVOID)&This->lpVtblPnpReconfigCallback;
+ INetCfgPnpReconfigCallback_AddRef(iface);
return S_OK;
}
@@ -721,6 +792,7 @@
This->ref = 1;
This->lpVtbl = (const INetCfg*)&vt_NetCfg;
This->lpVtblLock = (const INetCfgLock*)&vt_NetCfgLock;
+ This->lpVtblPnpReconfigCallback = (const
INetCfgPnpReconfigCallback*)&vt_NetCfgPnpReconfigCallback;
This->hMutex = NULL;
This->bInitialized = FALSE;
This->pNet = NULL;