ReactOS 0.4.16-dev-1028-g8602629
netcfgclass_iface.c File Reference
#include "precomp.h"
Include dependency graph for netcfgclass_iface.c:

Go to the source code of this file.

Classes

struct  INetCfgClassImpl
 

Typedefs

typedef struct INetCfgClassImplLPINetCfgClassImpl
 

Functions

static __inline LPINetCfgClassImpl impl_from_INetCfgClassSetup (INetCfgClassSetup *iface)
 
HRESULT WINAPI INetCfgClassSetup_fnQueryInterface (INetCfgClassSetup *iface, REFIID iid, LPVOID *ppvObj)
 
ULONG WINAPI INetCfgClassSetup_fnAddRef (INetCfgClassSetup *iface)
 
ULONG WINAPI INetCfgClassSetup_fnRelease (INetCfgClassSetup *iface)
 
HRESULT WINAPI INetCfgClassSetup_fnSelectAndInstall (_In_ INetCfgClassSetup *iface, _In_ HWND hwndParent, _In_opt_ OBO_TOKEN *pOboToken, _Out_opt_ INetCfgComponent **ppnccItem)
 
HRESULT WINAPI INetCfgClassSetup_fnInstall (_In_ INetCfgClassSetup *iface, _In_ LPCWSTR pszwComponentId, _In_opt_ OBO_TOKEN *pOboToken, _In_opt_ DWORD dwSetupFlags, _In_opt_ DWORD dwUpgradeFromBuildNo, _In_opt_ LPCWSTR pszwAnswerFile, _In_opt_ LPCWSTR pszwAnswerSections, _Out_opt_ INetCfgComponent **ppComponent)
 
HRESULT WINAPI INetCfgClassSetup_fnDeInstall (_In_ INetCfgClassSetup *iface, _In_ INetCfgComponent *pComponent, _In_opt_ OBO_TOKEN *pOboToken, _Out_opt_ LPWSTR *pmszwRefs)
 
HRESULT WINAPI INetCfgClass_fnQueryInterface (INetCfgClass *iface, REFIID iid, LPVOID *ppvObj)
 
ULONG WINAPI INetCfgClass_fnAddRef (INetCfgClass *iface)
 
ULONG WINAPI INetCfgClass_fnRelease (INetCfgClass *iface)
 
HRESULT WINAPI INetCfgClass_fnFindComponent (INetCfgClass *iface, INetCfgComponent **pComponent)
 
HRESULT WINAPI INetCfgClass_fnEnumComponents (INetCfgClass *iface, IEnumNetCfgComponent **ppenumComponent)
 
HRESULT WINAPI INetCfgClass_Constructor (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, const GUID *pguidClass, INetCfg *pNetCfg)
 

Variables

static const INetCfgClassSetupVtbl vt_NetCfgClassSetup
 
static const INetCfgClassVtbl vt_NetCfgClass
 

Typedef Documentation

◆ LPINetCfgClassImpl

Function Documentation

◆ impl_from_INetCfgClassSetup()

static __inline LPINetCfgClassImpl impl_from_INetCfgClassSetup ( INetCfgClassSetup *  iface)
static

Definition at line 12 of file netcfgclass_iface.c.

13{
14 return (INetCfgClassImpl*)((char *)iface - FIELD_OFFSET(INetCfgClassImpl, lpVtblSetup));
15}
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255

Referenced by INetCfgClassSetup_fnAddRef(), INetCfgClassSetup_fnQueryInterface(), and INetCfgClassSetup_fnRelease().

◆ INetCfgClass_Constructor()

HRESULT WINAPI INetCfgClass_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv,
const GUID pguidClass,
INetCfg *  pNetCfg 
)

Definition at line 204 of file netcfgclass_iface.c.

210{
212
213 if (!ppv)
214 return E_POINTER;
215
217 if (!This)
218 return E_OUTOFMEMORY;
219
220 This->ref = 1;
221 This->lpVtbl = (const INetCfgClass*)&vt_NetCfgClass;
222 This->lpVtblSetup = (const INetCfgClassSetup*)&vt_NetCfgClassSetup;
223
224 memcpy(&This->ClassGuid, pguidClass, sizeof(GUID));
225 This->pNetCfg = pNetCfg;
226
227 if (!SUCCEEDED(INetCfgClass_QueryInterface((INetCfgClass*)This, riid, ppv)))
228 {
229 INetCfgClass_Release((INetCfgClass*)This);
230 return E_NOINTERFACE;
231 }
232
233 INetCfgClass_Release((INetCfgClass*)This);
234 return S_OK;
235}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static const INetCfgClassSetupVtbl vt_NetCfgClassSetup
static const INetCfgClassVtbl vt_NetCfgClass
#define INetCfgClass_Release(p)
Definition: netcfgx.h:335
#define INetCfgClass_QueryInterface(p, a, b)
Definition: netcfgx.h:333
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365

Referenced by INetCfg_fnQueryNetCfgClass().

◆ INetCfgClass_fnAddRef()

ULONG WINAPI INetCfgClass_fnAddRef ( INetCfgClass *  iface)

Definition at line 142 of file netcfgclass_iface.c.

144{
146 ULONG refCount = InterlockedIncrement(&This->ref);
147
148 return refCount;
149}
#define InterlockedIncrement
Definition: armddk.h:53
uint32_t ULONG
Definition: typedefs.h:59

◆ INetCfgClass_fnEnumComponents()

HRESULT WINAPI INetCfgClass_fnEnumComponents ( INetCfgClass *  iface,
IEnumNetCfgComponent **  ppenumComponent 
)

Definition at line 183 of file netcfgclass_iface.c.

186{
187// INetCfgClassImpl *This = (INetCfgClassImpl *)iface;
188
189
190 return E_NOINTERFACE;
191}

◆ INetCfgClass_fnFindComponent()

HRESULT WINAPI INetCfgClass_fnFindComponent ( INetCfgClass *  iface,
INetCfgComponent **  pComponent 
)

Definition at line 168 of file netcfgclass_iface.c.

171{
172// HRESULT hr;
173// INetCfgClassImpl *This = (INetCfgClassImpl *)iface;
174
175
176 /* TODO */
177
178 return S_FALSE;
179}
#define S_FALSE
Definition: winerror.h:2357

◆ INetCfgClass_fnQueryInterface()

HRESULT WINAPI INetCfgClass_fnQueryInterface ( INetCfgClass *  iface,
REFIID  iid,
LPVOID ppvObj 
)

Definition at line 115 of file netcfgclass_iface.c.

119{
121 *ppvObj = NULL;
122
123 if (IsEqualIID (iid, &IID_IUnknown) ||
125 {
126 *ppvObj = This;
127 INetCfgClass_AddRef(iface);
128 return S_OK;
129 }
130 else if (IsEqualIID (iid, &IID_INetCfgClassSetup))
131 {
132 *ppvObj = (LPVOID)&This->lpVtblSetup;
133 INetCfgClass_AddRef(iface);
134 return S_OK;
135 }
136
137 return E_NOINTERFACE;
138}
const GUID IID_IUnknown
#define NULL
Definition: types.h:112
EXTERN_C const IID IID_INetCfgClassSetup
Definition: netcfgx.h:361
EXTERN_C const IID IID_INetCfgClass
Definition: netcfgx.h:317
#define INetCfgClass_AddRef(p)
Definition: netcfgx.h:334
#define LPVOID
Definition: nt_native.h:45
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ INetCfgClass_fnRelease()

ULONG WINAPI INetCfgClass_fnRelease ( INetCfgClass *  iface)

Definition at line 153 of file netcfgclass_iface.c.

155{
157 ULONG refCount = InterlockedDecrement(&This->ref);
158
159 if (!refCount)
160 {
162 }
163 return refCount;
164}
#define InterlockedDecrement
Definition: armddk.h:52
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442

◆ INetCfgClassSetup_fnAddRef()

ULONG WINAPI INetCfgClassSetup_fnAddRef ( INetCfgClassSetup *  iface)

Definition at line 35 of file netcfgclass_iface.c.

37{
39 return INetCfgClass_AddRef((INetCfgClass*)This);
40}
static __inline LPINetCfgClassImpl impl_from_INetCfgClassSetup(INetCfgClassSetup *iface)

◆ INetCfgClassSetup_fnDeInstall()

HRESULT WINAPI INetCfgClassSetup_fnDeInstall ( _In_ INetCfgClassSetup *  iface,
_In_ INetCfgComponent *  pComponent,
_In_opt_ OBO_TOKEN pOboToken,
_Out_opt_ LPWSTR pmszwRefs 
)

Definition at line 88 of file netcfgclass_iface.c.

93{
94// INetCfgClassImpl *This = impl_from_INetCfgClassSetup(iface);
95
96 return S_OK;
97}

◆ INetCfgClassSetup_fnInstall()

HRESULT WINAPI INetCfgClassSetup_fnInstall ( _In_ INetCfgClassSetup *  iface,
_In_ LPCWSTR  pszwComponentId,
_In_opt_ OBO_TOKEN pOboToken,
_In_opt_ DWORD  dwSetupFlags,
_In_opt_ DWORD  dwUpgradeFromBuildNo,
_In_opt_ LPCWSTR  pszwAnswerFile,
_In_opt_ LPCWSTR  pszwAnswerSections,
_Out_opt_ INetCfgComponent **  ppComponent 
)

Definition at line 65 of file netcfgclass_iface.c.

74{
75// INetCfgClassImpl *This = impl_from_INetCfgClassSetup(iface);
76
77 if (ppComponent)
78 *ppComponent = NULL;
79
80 InstallNetworkComponent(pszwComponentId);
81
82 return S_OK;
83}
static HRESULT InstallNetworkComponent(LPWSTR pszComponentName, const GUID *pClassGuid)
Definition: setup.cpp:54

◆ INetCfgClassSetup_fnQueryInterface()

HRESULT WINAPI INetCfgClassSetup_fnQueryInterface ( INetCfgClassSetup *  iface,
REFIID  iid,
LPVOID ppvObj 
)

Definition at line 23 of file netcfgclass_iface.c.

27{
29 return INetCfgClass_QueryInterface((INetCfgClass*)This, iid, ppvObj);
30}

◆ INetCfgClassSetup_fnRelease()

ULONG WINAPI INetCfgClassSetup_fnRelease ( INetCfgClassSetup *  iface)

Definition at line 44 of file netcfgclass_iface.c.

46{
48 return INetCfgClass_Release((INetCfgClass*)This);
49}

◆ INetCfgClassSetup_fnSelectAndInstall()

HRESULT WINAPI INetCfgClassSetup_fnSelectAndInstall ( _In_ INetCfgClassSetup *  iface,
_In_ HWND  hwndParent,
_In_opt_ OBO_TOKEN pOboToken,
_Out_opt_ INetCfgComponent **  ppnccItem 
)

Definition at line 53 of file netcfgclass_iface.c.

58{
59// INetCfgClassImpl *This = impl_from_INetCfgClassSetup(iface);
60 return S_OK;
61}

Variable Documentation

◆ vt_NetCfgClass

const INetCfgClassVtbl vt_NetCfgClass
static
Initial value:
=
{
}
ULONG WINAPI INetCfgClass_fnAddRef(INetCfgClass *iface)
HRESULT WINAPI INetCfgClass_fnFindComponent(INetCfgClass *iface, INetCfgComponent **pComponent)
HRESULT WINAPI INetCfgClass_fnEnumComponents(INetCfgClass *iface, IEnumNetCfgComponent **ppenumComponent)
ULONG WINAPI INetCfgClass_fnRelease(INetCfgClass *iface)
HRESULT WINAPI INetCfgClass_fnQueryInterface(INetCfgClass *iface, REFIID iid, LPVOID *ppvObj)

Definition at line 193 of file netcfgclass_iface.c.

Referenced by INetCfgClass_Constructor().

◆ vt_NetCfgClassSetup

const INetCfgClassSetupVtbl vt_NetCfgClassSetup
static
Initial value:
=
{
}
ULONG WINAPI INetCfgClassSetup_fnRelease(INetCfgClassSetup *iface)
HRESULT WINAPI INetCfgClassSetup_fnDeInstall(_In_ INetCfgClassSetup *iface, _In_ INetCfgComponent *pComponent, _In_opt_ OBO_TOKEN *pOboToken, _Out_opt_ LPWSTR *pmszwRefs)
HRESULT WINAPI INetCfgClassSetup_fnInstall(_In_ INetCfgClassSetup *iface, _In_ LPCWSTR pszwComponentId, _In_opt_ OBO_TOKEN *pOboToken, _In_opt_ DWORD dwSetupFlags, _In_opt_ DWORD dwUpgradeFromBuildNo, _In_opt_ LPCWSTR pszwAnswerFile, _In_opt_ LPCWSTR pszwAnswerSections, _Out_opt_ INetCfgComponent **ppComponent)
HRESULT WINAPI INetCfgClassSetup_fnSelectAndInstall(_In_ INetCfgClassSetup *iface, _In_ HWND hwndParent, _In_opt_ OBO_TOKEN *pOboToken, _Out_opt_ INetCfgComponent **ppnccItem)
HRESULT WINAPI INetCfgClassSetup_fnQueryInterface(INetCfgClassSetup *iface, REFIID iid, LPVOID *ppvObj)
ULONG WINAPI INetCfgClassSetup_fnAddRef(INetCfgClassSetup *iface)

Definition at line 99 of file netcfgclass_iface.c.

Referenced by INetCfgClass_Constructor().