ReactOS 0.4.16-dev-816-g135a9a9
precomp.h File Reference
#include <stdio.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <winsvc.h>
#include <windowsx.h>
#include <objbase.h>
#include <netcfgx.h>
#include <setupapi.h>
#include <netcfgn.h>
#include <devguid.h>
#include <commctrl.h>
#include <cfgmgr32.h>
#include <wine/debug.h>
#include "resource.h"
Include dependency graph for precomp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  INTERFACE_TABLE
 
struct  tagNetCfgComponentItem
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define COBJMACROS
 
#define NONAMELESSUNION
 
#define NONAMELESSSTRUCT
 

Typedefs

typedef HRESULT(CALLBACKLPFNCREATEINSTANCE) (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppvObject)
 
typedef struct tagNetCfgComponentItem NetCfgComponentItem
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (netcfgx)
 
HRESULT WINAPI INetCfg_Constructor (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
 
IClassFactoryIClassFactory_fnConstructor (LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst)
 
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 INetCfgBindingInterface_Constructor (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI IEnumNetCfgBindingInterface_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 INetCfgClass_Constructor (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, const GUID *pguidClass, INetCfg *pNetCfg)
 
BOOL InstallNetworkComponent (_In_ PCWSTR pszComponentId)
 
HRESULT WINAPI TcpipConfigNotify_Constructor (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
 

Variables

HINSTANCE netcfgx_hInstance
 
const GUID CLSID_TcpipConfigNotifyObject
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 7 of file precomp.h.

◆ COBJMACROS

#define COBJMACROS

Definition at line 10 of file precomp.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 8 of file precomp.h.

◆ NONAMELESSSTRUCT

#define NONAMELESSSTRUCT

Definition at line 12 of file precomp.h.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 11 of file precomp.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 6 of file precomp.h.

Typedef Documentation

◆ LPFNCREATEINSTANCE

typedef HRESULT(CALLBACK * LPFNCREATEINSTANCE) (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppvObject)

Definition at line 33 of file precomp.h.

◆ NetCfgComponentItem

Function Documentation

◆ IClassFactory_fnConstructor()

IClassFactory * IClassFactory_fnConstructor ( LPFNCREATEINSTANCE  lpfnCI,
PLONG  pcRefDll,
REFIID  riidInst 
)

Definition at line 125 of file classfactory.c.

129{
130 IClassFactoryImpl* lpclf;
131
132 lpclf = CoTaskMemAlloc(sizeof(IClassFactoryImpl));
133 lpclf->ref = 1;
134 lpclf->lpVtbl = &dclfvt;
135 lpclf->lpfnCI = lpfnCI;
136
137 if (pcRefDll)
138 InterlockedIncrement(pcRefDll);
139 lpclf->riidInst = riidInst;
140
141 return (LPCLASSFACTORY)lpclf;
142}
#define InterlockedIncrement
Definition: armddk.h:53
static const IClassFactoryVtbl dclfvt
Definition: classfactory.c:114
LPFNCREATEINSTANCE lpfnCI
Definition: shellole.c:61
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
LPFNCREATEINSTANCE lpfnCI
Definition: classfactory.c:18
const IID * riidInst
Definition: classfactory.c:19
const IClassFactoryVtbl * lpVtbl
Definition: classfactory.c:15

Referenced by DllGetClassObject().

◆ IEnumNetCfgBindingInterface_Constructor()

HRESULT WINAPI IEnumNetCfgBindingInterface_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv 
)

Definition at line 274 of file netcfgbindinginterface_iface.c.

275{
277
278 if (!ppv)
279 return E_POINTER;
280
282 if (!This)
283 return E_OUTOFMEMORY;
284
285 This->ref = 1;
286 This->lpVtbl = (const IEnumNetCfgBindingInterface*)&vt_EnumNetCfgBindingInterface;
287#if 0
288 This->pCurrent = pItem;
289 This->pHead = pItem;
290 This->pNCfg = pNCfg;
291#endif
292
293 if (!SUCCEEDED (IEnumNetCfgBindingInterface_QueryInterface((INetCfgBindingInterface*)This, riid, ppv)))
294 {
296 return E_NOINTERFACE;
297 }
298
299 IEnumNetCfgBindingInterface_Release((IEnumNetCfgBindingInterface*)This);
300 return S_OK;
301}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
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
static const IEnumNetCfgBindingInterfaceVtbl vt_EnumNetCfgBindingInterface
#define IEnumNetCfgBindingInterface_QueryInterface(p, a, b)
Definition: netcfgx.h:122
#define IEnumNetCfgBindingInterface_Release(p)
Definition: netcfgx.h:124
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365

Referenced by INetCfgBindingPath_fnEnumBindingInterfaces().

◆ IEnumNetCfgBindingPath_Constructor()

HRESULT WINAPI IEnumNetCfgBindingPath_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv,
DWORD  dwFlags 
)

Definition at line 323 of file netcfgbindingpath_iface.c.

324{
326
327 if (!ppv)
328 return E_POINTER;
329
331 if (!This)
332 return E_OUTOFMEMORY;
333
334 This->ref = 1;
335 This->lpVtbl = (const IEnumNetCfgBindingPath*)&vt_EnumNetCfgBindingPath;
336#if 0
337 This->pCurrent = pItem;
338 This->pHead = pItem;
339 This->pNCfg = pNCfg;
340#endif
341
342 if (!SUCCEEDED (IEnumNetCfgBindingPath_QueryInterface((INetCfgBindingPath*)This, riid, ppv)))
343 {
345 return E_NOINTERFACE;
346 }
347
348 IEnumNetCfgBindingPath_Release((IEnumNetCfgBindingPath*)This);
349 return S_OK;
350}
static const IEnumNetCfgBindingPathVtbl vt_EnumNetCfgBindingPath
#define IEnumNetCfgBindingPath_Release(p)
Definition: netcfgx.h:185
#define IEnumNetCfgBindingPath_QueryInterface(p, a, b)
Definition: netcfgx.h:183

Referenced by INetCfgComponentBindings_fnEnumBindingPaths().

◆ IEnumNetCfgComponent_Constructor()

HRESULT WINAPI IEnumNetCfgComponent_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv,
NetCfgComponentItem pItem,
INetCfg *  iface 
)

Definition at line 843 of file inetcfgcomp_iface.c.

844{
846
847 if (!ppv)
848 return E_POINTER;
849
851 if (!This)
852 return E_OUTOFMEMORY;
853
854 This->ref = 1;
855 This->lpVtbl = (const IEnumNetCfgComponent*)&vt_EnumNetCfgComponent;
856 This->pCurrent = pItem;
857 This->pHead = pItem;
858 This->pNCfg = pNCfg;
859
860 if (!SUCCEEDED (IEnumNetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
861 {
863 return E_NOINTERFACE;
864 }
865
866 IEnumNetCfgComponent_Release((IEnumNetCfgComponent*)This);
867 return S_OK;
868}
static const IEnumNetCfgComponentVtbl vt_EnumNetCfgComponent
#define IEnumNetCfgComponent_QueryInterface(p, a, b)
Definition: netcfgx.h:257
#define IEnumNetCfgComponent_Release(p)
Definition: netcfgx.h:259

Referenced by INetCfg_fnEnumComponents().

◆ INetCfg_Constructor()

HRESULT WINAPI INetCfg_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv 
)

Definition at line 865 of file netcfg_iface.c.

866{
868
869 if (!ppv)
870 return E_POINTER;
871
873 if (!This)
874 return E_OUTOFMEMORY;
875
876 This->ref = 1;
877 This->lpVtbl = (const INetCfg*)&vt_NetCfg;
878 This->lpVtblLock = (const INetCfgLock*)&vt_NetCfgLock;
879 This->lpVtblPnpReconfigCallback = (const INetCfgPnpReconfigCallback*)&vt_NetCfgPnpReconfigCallback;
880 This->hMutex = NULL;
881 This->bInitialized = FALSE;
882 This->pNet = NULL;
883 This->pClient = NULL;
884 This->pService = NULL;
885 This->pProtocol = NULL;
886
887 if (!SUCCEEDED (INetCfg_QueryInterface ((INetCfg*)This, riid, ppv)))
888 {
889 INetCfg_Release((INetCfg*)This);
890 return E_NOINTERFACE;
891 }
892
893 INetCfg_Release((INetCfg*)This);
894 return S_OK;
895}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
static const INetCfgPnpReconfigCallbackVtbl vt_NetCfgPnpReconfigCallback
Definition: netcfg_iface.c:216
static const INetCfgLockVtbl vt_NetCfgLock
Definition: netcfg_iface.c:158
static const INetCfgVtbl vt_NetCfg
Definition: netcfg_iface.c:851
#define INetCfg_Release(p)
Definition: netcfgx.h:289
#define INetCfg_QueryInterface(p, a, b)
Definition: netcfgx.h:287

◆ INetCfgBindingInterface_Constructor()

HRESULT WINAPI INetCfgBindingInterface_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv 
)

Definition at line 105 of file netcfgbindinginterface_iface.c.

109{
111
112 if (!ppv)
113 return E_POINTER;
114
116 if (!This)
117 return E_OUTOFMEMORY;
118
119 This->ref = 1;
120 This->lpVtbl = (const INetCfgBindingInterface*)&vt_NetCfgBindingInterface;
121
122 if (!SUCCEEDED(INetCfgBindingInterface_QueryInterface((INetCfgBindingInterface*)This, riid, ppv)))
123 {
124 return E_NOINTERFACE;
125 }
126
127 INetCfgBindingInterface_Release((INetCfgBindingInterface*)This);
128 return S_OK;
129}
static const INetCfgBindingInterfaceVtbl vt_NetCfgBindingInterface
#define INetCfgBindingInterface_Release(p)
Definition: netcfgx.h:97
#define INetCfgBindingInterface_QueryInterface(p, a, b)
Definition: netcfgx.h:95

Referenced by IEnumNetCfgBindingInterface_fnNext().

◆ INetCfgBindingPath_Constructor()

HRESULT WINAPI INetCfgBindingPath_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv 
)

Definition at line 154 of file netcfgbindingpath_iface.c.

158{
160
161 if (!ppv)
162 return E_POINTER;
163
165 if (!This)
166 return E_OUTOFMEMORY;
167
168 This->ref = 1;
169 This->lpVtbl = (const INetCfgBindingPath*)&vt_NetCfgBindingPath;
170
171 if (!SUCCEEDED (INetCfgBindingPath_QueryInterface ((INetCfgBindingPath*)This, riid, ppv)))
172 {
173 return E_NOINTERFACE;
174 }
175
176 INetCfgBindingPath_Release((INetCfgBindingPath*)This);
177 return S_OK;
178}
static const INetCfgBindingPathVtbl vt_NetCfgBindingPath
#define INetCfgBindingPath_Release(p)
Definition: netcfgx.h:154
#define INetCfgBindingPath_QueryInterface(p, a, b)
Definition: netcfgx.h:152

Referenced by IEnumNetCfgBindingPath_fnNext().

◆ 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 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

Referenced by INetCfg_fnQueryNetCfgClass().

◆ INetCfgComponent_Constructor()

HRESULT WINAPI INetCfgComponent_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv,
NetCfgComponentItem pItem,
INetCfg *  iface 
)

Definition at line 683 of file inetcfgcomp_iface.c.

684{
686
687 if (!ppv)
688 return E_POINTER;
689
691 if (!This)
692 return E_OUTOFMEMORY;
693
694 This->ref = 1;
695 This->lpVtbl = (const INetCfgComponent*)&vt_NetCfgComponent;
696 This->lpVtblComponentBindings = (const INetCfgComponentBindings*)&vt_NetCfgComponentBindings;
697 This->pProperty = NULL;
698 This->pItem = pItem;
699 This->pNCfg = pNCfg;
700
701 if (!SUCCEEDED (INetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
702 {
704 return E_NOINTERFACE;
705 }
706
707 INetCfgComponent_Release((INetCfgComponent*)This);
708 return S_OK;
709}
static const INetCfgComponentBindingsVtbl vt_NetCfgComponentBindings
static const INetCfgComponentVtbl vt_NetCfgComponent
#define INetCfgComponent_QueryInterface(p, a, b)
Definition: netcfgx.h:60
#define INetCfgComponent_Release(p)
Definition: netcfgx.h:62

Referenced by FindNetworkComponent(), and IEnumNetCfgComponent_fnNext().

◆ InstallNetworkComponent()

BOOL InstallNetworkComponent ( _In_ PCWSTR  pszComponentId)

Definition at line 561 of file netinstall.c.

563{
565 HKEY hInstanceKey = NULL;
566 BOOL bResult = FALSE;
567
568 TRACE("InstallNetworkComponent(%S)\n", pszComponentId);
569
571
572 if (!ScanForInfFile(pszComponentId, &ComponentInfo))
573 goto done;
574
575 TRACE("Characteristics: 0x%lx\n", ComponentInfo.dwCharacteristics);
576 TRACE("ComponentId: %S\n", ComponentInfo.pszComponentId);
577 TRACE("Description: %S\n", ComponentInfo.pszDescription);
578 TRACE("InfPath: %S\n", ComponentInfo.pszInfPath);
579 TRACE("InfSection: %S\n", ComponentInfo.pszInfSection);
580 TRACE("ClassGuid: %S\n", ComponentInfo.pszClassGuid);
581
583 &hInstanceKey))
584 {
585 ERR("CreateInstanceKey() failed (Error %lx)\n", GetLastError());
586 goto done;
587 }
588
590 hInstanceKey,
591 ComponentInfo.pszInfPath,
592 ComponentInfo.pszInfSection))
593 {
594 ERR("InstallInfSections() failed (Error %lx)\n", GetLastError());
595 goto done;
596 }
597
598 bResult = TRUE;
599
601
602done:
603 if (hInstanceKey != NULL)
604 RegCloseKey(hInstanceKey);
605
606 if (ComponentInfo.pszFullInfPath)
607 HeapFree(GetProcessHeap(), 0, ComponentInfo.pszFullInfPath);
608
609 if (ComponentInfo.pszInfPath)
610 HeapFree(GetProcessHeap(), 0, ComponentInfo.pszInfPath);
611
612 if (ComponentInfo.pszInfSection)
613 HeapFree(GetProcessHeap(), 0, ComponentInfo.pszInfSection);
614
615 if (ComponentInfo.pszComponentId)
616 HeapFree(GetProcessHeap(), 0, ComponentInfo.pszComponentId);
617
618 if (ComponentInfo.pszDescription)
619 HeapFree(GetProcessHeap(), 0, ComponentInfo.pszDescription);
620
621 if (ComponentInfo.pszClassGuid)
622 HeapFree(GetProcessHeap(), 0, ComponentInfo.pszClassGuid);
623
624 return bResult;
625}
#define ERR(fmt,...)
Definition: precomp.h:57
#define RegCloseKey(hKey)
Definition: registry.h:49
#define TRUE
Definition: types.h:120
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
unsigned int BOOL
Definition: ntddk_ex.h:94
static BOOL ScanForInfFile(_In_ PCWSTR pszComponentId, _In_ PCOMPONENT_INFO pComponentInfo)
Definition: netinstall.c:399
static BOOL InstallInfSections(_In_ HWND hWnd, _In_ HKEY hKey, _In_ LPCWSTR InfFile, _In_ LPCWSTR InfSection)
Definition: netinstall.c:34
static BOOL CreateInstanceKey(_In_ PCOMPONENT_INFO pComponentInfo, _Out_ PHKEY pInstanceKey)
Definition: netinstall.c:112
static VOID StartNetworkServices(_In_ PCOMPONENT_INFO pComponentInfo)
Definition: netinstall.c:471
#define TRACE(s)
Definition: solgame.cpp:4
#define ZeroMemory
Definition: winbase.h:1737
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

◆ TcpipConfigNotify_Constructor()

HRESULT WINAPI TcpipConfigNotify_Constructor ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppv 
)

Definition at line 3553 of file tcpipconf_notify.c.

3554{
3556
3557 if (!ppv)
3558 return E_POINTER;
3559
3561 if (!This)
3562 return E_OUTOFMEMORY;
3563
3564 This->ref = 1;
3565 This->lpVtbl = (const INetCfgComponentPropertyUi*)&vt_NetCfgComponentPropertyUi;
3566 This->lpVtblCompControl = (const INetCfgComponentControl*)&vt_NetCfgComponentControl;
3567 This->pNCfg = NULL;
3568 This->pUnknown = NULL;
3569 This->pNComp = NULL;
3570 This->pCurrentConfig = NULL;
3571
3572 if (!SUCCEEDED (INetCfgComponentPropertyUi_QueryInterface ((INetCfgComponentPropertyUi*)This, riid, ppv)))
3573 {
3574 INetCfgComponentPropertyUi_Release((INetCfgComponentPropertyUi*)This);
3575 return E_NOINTERFACE;
3576 }
3577
3578 INetCfgComponentPropertyUi_Release((INetCfgComponentPropertyUi*)This);
3579 return S_OK;
3580}
#define INetCfgComponentPropertyUi_QueryInterface(p, a, b)
Definition: netcfgn.h:77
#define INetCfgComponentPropertyUi_Release(p)
Definition: netcfgn.h:79
static const INetCfgComponentControlVtbl vt_NetCfgComponentControl
static const INetCfgComponentPropertyUiVtbl vt_NetCfgComponentPropertyUi

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( netcfgx  )

Variable Documentation

◆ CLSID_TcpipConfigNotifyObject

const GUID CLSID_TcpipConfigNotifyObject
extern

Definition at line 16 of file netcfgx.c.

◆ netcfgx_hInstance