ReactOS 0.4.16-dev-1946-g52006dd
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 <netcfgx_undoc.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
 
struct  INetCfgImpl
 

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 35 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:3479
#define E_POINTER
Definition: winerror.h:3480

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 909 of file inetcfgcomp_iface.c.

910{
912
913 if (!ppv)
914 return E_POINTER;
915
917 if (!This)
918 return E_OUTOFMEMORY;
919
920 This->ref = 1;
921 This->lpVtbl = (const IEnumNetCfgComponent*)&vt_EnumNetCfgComponent;
922 This->pCurrent = pItem;
923 This->pHead = pItem;
924 This->pNCfg = pNCfg;
925
926 if (!SUCCEEDED (IEnumNetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
927 {
929 return E_NOINTERFACE;
930 }
931
932 IEnumNetCfgComponent_Release((IEnumNetCfgComponent*)This);
933 return S_OK;
934}
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(), and INetCfgClass_fnEnumComponents().

◆ INetCfg_Constructor()

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

Definition at line 851 of file netcfg_iface.c.

852{
854
855 if (!ppv)
856 return E_POINTER;
857
859 if (!This)
860 return E_OUTOFMEMORY;
861
862 This->ref = 1;
863 This->lpVtbl = (const INetCfg*)&vt_NetCfg;
864 This->lpVtblLock = (const INetCfgLock*)&vt_NetCfgLock;
865 This->lpVtblPnpReconfigCallback = (const INetCfgPnpReconfigCallback*)&vt_NetCfgPnpReconfigCallback;
866 This->hMutex = NULL;
867 This->bInitialized = FALSE;
868 This->pNet = NULL;
869 This->pClient = NULL;
870 This->pService = NULL;
871 This->pProtocol = NULL;
872
873 if (!SUCCEEDED (INetCfg_QueryInterface ((INetCfg*)This, riid, ppv)))
874 {
875 INetCfg_Release((INetCfg*)This);
876 return E_NOINTERFACE;
877 }
878
879 INetCfg_Release((INetCfg*)This);
880 return S_OK;
881}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
static const INetCfgPnpReconfigCallbackVtbl vt_NetCfgPnpReconfigCallback
Definition: netcfg_iface.c:202
static const INetCfgLockVtbl vt_NetCfgLock
Definition: netcfg_iface.c:144
static const INetCfgVtbl vt_NetCfg
Definition: netcfg_iface.c:837
#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 233 of file netcfgclass_iface.c.

239{
241
242 if (!ppv)
243 return E_POINTER;
244
246 if (!This)
247 return E_OUTOFMEMORY;
248
249 This->ref = 1;
250 This->lpVtbl = (const INetCfgClass*)&vt_NetCfgClass;
251 This->lpVtblSetup = (const INetCfgClassSetup*)&vt_NetCfgClassSetup;
252
253 memcpy(&This->ClassGuid, pguidClass, sizeof(GUID));
254 This->pNetCfg = pNetCfg;
255
256 if (!SUCCEEDED(INetCfgClass_QueryInterface((INetCfgClass*)This, riid, ppv)))
257 {
258 INetCfgClass_Release((INetCfgClass*)This);
259 return E_NOINTERFACE;
260 }
261
262 INetCfgClass_Release((INetCfgClass*)This);
263 return S_OK;
264}
#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 748 of file inetcfgcomp_iface.c.

749{
751
752 if (!ppv)
753 return E_POINTER;
754
756 if (!This)
757 return E_OUTOFMEMORY;
758
759 This->ref = 1;
760 This->lpVtbl = (const INetCfgComponent*)&vt_NetCfgComponent;
761 This->lpVtblBindings = (const INetCfgComponentBindings*)&vt_NetCfgComponentBindings;
762 This->lpVtblPrivate = (const INetCfgComponentPrivate*)&vt_NetCfgComponentPrivate;
763 This->pProperty = NULL;
764 This->pItem = pItem;
765 This->pNCfg = pNCfg;
766
767 if (!SUCCEEDED (INetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv)))
768 {
770 return E_NOINTERFACE;
771 }
772
773 INetCfgComponent_Release((INetCfgComponent*)This);
774 return S_OK;
775}
static const INetCfgComponentBindingsVtbl vt_NetCfgComponentBindings
static const INetCfgComponentVtbl vt_NetCfgComponent
static const INetCfgComponentPrivateVtbl vt_NetCfgComponentPrivate
#define INetCfgComponent_QueryInterface(p, a, b)
Definition: netcfgx.h:60
#define INetCfgComponent_Release(p)
Definition: netcfgx.h:62

Referenced by FindNetworkComponent(), IEnumNetCfgComponent_fnNext(), and INetCfgClass_fnFindComponent().

◆ 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
#define ZeroMemory
Definition: minwinbase.h:31
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
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

◆ TcpipConfigNotify_Constructor()

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

Definition at line 3591 of file tcpipconf_notify.c.

3592{
3594
3595 if (!ppv)
3596 return E_POINTER;
3597
3599 if (!This)
3600 return E_OUTOFMEMORY;
3601
3602 This->ref = 1;
3603 This->lpVtbl = (const INetCfgComponentPropertyUi*)&vt_NetCfgComponentPropertyUi;
3604 This->lpVtblCompControl = (const INetCfgComponentControl*)&vt_NetCfgComponentControl;
3605 This->pNCfg = NULL;
3606 This->pUnknown = NULL;
3607 This->pNComp = NULL;
3608 This->pCurrentConfig = NULL;
3609
3610 if (!SUCCEEDED (INetCfgComponentPropertyUi_QueryInterface ((INetCfgComponentPropertyUi*)This, riid, ppv)))
3611 {
3612 INetCfgComponentPropertyUi_Release((INetCfgComponentPropertyUi*)This);
3613 return E_NOINTERFACE;
3614 }
3615
3616 INetCfgComponentPropertyUi_Release((INetCfgComponentPropertyUi*)This);
3617 return S_OK;
3618}
#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