Changeset 36121 in vbox
- Timestamp:
- Mar 1, 2011 3:25:18 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 18 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk
r35380 r36121 31 31 endif 32 32 VBoxNetFlt_DEFS = IN_RT_R0 IN_SUP_STATIC 33 VBoxNetFlt_SDKS.win = W2K3DDK WINPSDKINCS34 33 VBoxNetFlt_INCS = . 35 34 VBoxNetFlt_SOURCES.darwin = \ … … 37 36 #VBoxNetFlt_SOURCES.darwin += \ 38 37 # darwin/VBoxNetAdapter-darwin.cpp 38 VBoxNetFlt_SDKS.win = WINDDKWLH WINPSDKINCS 39 39 VBoxNetFlt_SOURCES.win = \ 40 win/ VBoxNetFlt-win.c\41 win/ VBoxNetFltPt-win.c\42 win/ VBoxNetFlt-win.rc43 ifdef VBOX_NETFLT_ONDEMAND_BIND 44 VBoxNetFlt_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND 45 else 46 VBoxNetFlt_DEFS.win += VBOXNETFLT_STATIC_CONFIG 47 VBoxNetFlt_DEFS.win += VBOXNETFLT_NO_PACKET_QUEUE 48 VBoxNetFlt_DEFS.win += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0 49 VBoxNetFlt_DEFS.win += NDIS50_MINIPORT=1 NDIS50=1 50 VBoxNetFlt_SOURCES.win += win/VBoxNetFltMp-win.c 51 endif 40 win/drv/VBoxNetFltP-win.cpp \ 41 win/drv/VBoxNetFltM-win.cpp \ 42 win/drv/VBoxNetFltRt-win.cpp \ 43 win/drv/VBoxNetFlt-win.rc 44 # with WINDDKWLH the WIN9X_COMPAT_SPINLOCK is needed to avoid inline declaration of KeInitializeSpinLock 45 # otherwise the linker would complain about dumplicate _KeInitializeSpinLock@4 definition 46 # in ntoskrnl.lib and our object files 47 VBoxNetFlt_DEFS.win += WIN9X_COMPAT_SPINLOCK=1 48 VBoxNetFlt_DEFS.win += VBOXNETFLT_STATIC_CONFIG 49 VBoxNetFlt_DEFS.win += VBOXNETFLT_NO_PACKET_QUEUE 50 VBoxNetFlt_DEFS.win += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0 51 VBoxNetFlt_DEFS.win += NDIS50_MINIPORT=1 NDIS50=1 52 52 ifdef VBOX_LOOPBACK_USEFLAGS 53 53 VBoxNetFlt_DEFS.win += VBOX_LOOPBACK_USEFLAGS … … 58 58 VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry 59 59 VBoxNetFlt_LIBS.win = \ 60 $(PATH_SDK_W 2K3DDK_LIB)/ntoskrnl.lib \61 $(PATH_SDK_W 2K3DDK_LIB)/hal.lib \62 $(PATH_SDK_W 2K3DDK_LIB)/ndis.lib \60 $(PATH_SDK_WINDDKWLH_LIB)/ntoskrnl.lib \ 61 $(PATH_SDK_WINDDKWLH_LIB)/hal.lib \ 62 $(PATH_SDK_WINDDKWLH_LIB)/ndis.lib \ 63 63 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) 64 64 VBoxNetFlt_LIBS = \ … … 107 107 VBoxNetFlt-inf_SOURCES = \ 108 108 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \ 109 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt _m.inf109 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltM.inf 110 110 VBoxNetFlt-inf_CLEAN = $(VBoxNetFlt-inf_SOURCES) 111 111 VBoxNetFlt-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetFltCat.dir 112 112 113 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf: $(PATH_SUB_CURRENT)/win/ VBoxNetFlt.inf $(MAKEFILE_CURRENT) | $$(dir $$@)113 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetFlt.inf $(MAKEFILE_CURRENT) | $$(dir $$@) 114 114 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<) 115 115 $(call VBOX_EDIT_INF_FN,$<,$@) 116 116 117 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt _m.inf: $(PATH_SUB_CURRENT)/win/VBoxNetFlt_m.inf $(MAKEFILE_CURRENT) | $$(dir $$@)117 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltM.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetFltM.inf $(MAKEFILE_CURRENT) | $$(dir $$@) 118 118 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<) 119 119 $(call VBOX_EDIT_INF_FN,$<,$@) 120 120 121 121 ifdef VBOX_SIGNING_MODE 122 122 VBoxNetFlt-inf_SOURCES += \ 123 123 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \ 124 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNo tify.dll \124 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNobj.dll \ 125 125 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat 126 126 127 127 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys: $$(TARGET_VBoxNetFlt) | $$(dir $$@) 128 128 $(INSTALL) -m 644 $< $(@D) 129 130 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNo tify.dll: $$(TARGET_VBoxNetFltNotify) | $$(dir $$@)129 130 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNobj.dll: $$(TARGET_VBoxNetFltNobj) | $$(dir $$@) 131 131 $(INSTALL) -m 644 $< $(@D) 132 132 133 133 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat: \ 134 134 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \ 135 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNo tify.dll \135 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNobj.dll \ 136 136 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \ 137 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt _m.inf137 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltM.inf 138 138 $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<) 139 139 $(call VBOX_MAKE_CAT_FN, $(@D),$@) … … 149 149 WinNetConfig_SDKS = WINPSDK W2K3DDK 150 150 WinNetConfig_SOURCES = \ 151 win/ WinNetConfig.cpp151 win/cfg/VBoxNetCfg.cpp 152 152 WinNetConfig_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC) 153 153 … … 158 158 NetFltInstall_TEMPLATE = VBOXR3STATIC 159 159 NetFltInstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL 160 NetFltInstall_SOURCES = win/ NetFltInstall.cpp160 NetFltInstall_SOURCES = win/tools/VBoxNetFltInstall.cpp 161 161 NetFltInstall_LIBS = $(TARGET_WinNetConfig) \ 162 162 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \ … … 170 170 NetFltUninstall_TEMPLATE = VBOXR3STATIC 171 171 NetFltUninstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL 172 NetFltUninstall_SOURCES = win/ NetFltUninstall.cpp172 NetFltUninstall_SOURCES = win/tools/VBoxNetFltUninstall.cpp 173 173 NetFltUninstall_LIBS = $(TARGET_WinNetConfig) \ 174 174 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \ … … 181 181 NetAdpInstall_TEMPLATE = VBOXR3STATIC 182 182 NetAdpInstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL 183 NetAdpInstall_SOURCES = win/ NetAdpInstall.cpp183 NetAdpInstall_SOURCES = win/tools/VBoxNetAdpInstall.cpp 184 184 NetAdpInstall_LIBS = $(TARGET_WinNetConfig) \ 185 185 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \ … … 193 193 NetAdpUninstall_TEMPLATE = VBOXR3STATIC 194 194 NetAdpUninstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL 195 NetAdpUninstall_SOURCES = win/ NetAdpUninstall.cpp195 NetAdpUninstall_SOURCES = win/tools/VBoxNetAdpUninstall.cpp 196 196 NetAdpUninstall_LIBS = $(TARGET_WinNetConfig) \ 197 197 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \ … … 199 199 200 200 # 201 # VBoxNetFltNo tify202 # 203 DLLS.win += VBoxNetFltNo tify201 # VBoxNetFltNobj 202 # 203 DLLS.win += VBoxNetFltNobj 204 204 if defined(VBOX_SIGNING_MODE) 205 VBoxNetFltNo tify_NOINST = true205 VBoxNetFltNobj_NOINST = true 206 206 endif 207 VBoxNetFltNo tify_TEMPLATE = VBOXR3STATIC208 VBoxNetFltNo tify_SDKS = WINPSDK W2K3DDK VBOX_NTDLL209 VBoxNetFltNo tify_DEFS = _WIN32_WINNT=0x0500 WIN32 _ATL_STATIC_REGISTRY210 VBoxNetFltNo tify_INCS = \211 $(VBoxNetFltNo tify_0_OUTDIR)212 VBoxNetFltNo tify_SOURCES = \213 win/no tifyobj/VBoxNetFltNotify.cpp \214 win/no tifyobj/VBoxNetFltNotify.def \215 win/no tifyobj/VBoxNetFltNotify.rc216 VBoxNetFltNo tify_LIBS = \207 VBoxNetFltNobj_TEMPLATE = VBOXR3STATIC 208 VBoxNetFltNobj_SDKS = WINPSDK W2K3DDK VBOX_NTDLL 209 VBoxNetFltNobj_DEFS = _WIN32_WINNT=0x0500 WIN32 _ATL_STATIC_REGISTRY 210 VBoxNetFltNobj_INCS = \ 211 $(VBoxNetFltNobj_0_OUTDIR) 212 VBoxNetFltNobj_SOURCES = \ 213 win/nobj/VBoxNetFltNobj.cpp \ 214 win/nobj/VBoxNetFltNobj.def \ 215 win/nobj/VBoxNetFltNobj.rc 216 VBoxNetFltNobj_LIBS = \ 217 217 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_VCC_CRT_TYPE).lib 218 #VBoxNetFltNo tify_INTERMEDIATES =219 VBoxNetFltNo tify_DEPS = \220 $(VBoxNetFltNo tify_0_OUTDIR)/VBoxNetFltNotifyn_i.c \221 $(VBoxNetFltNo tify_0_OUTDIR)/VBoxNetFltNotifyn_p.c \222 $(VBoxNetFltNo tify_0_OUTDIR)/VBoxNetFltNotifyn.h \223 $(VBoxNetFltNo tify_0_OUTDIR)/dlldata.c \224 $(VBoxNetFltNo tify_0_OUTDIR)/VBoxNetFltNotifyn.tlb225 VBoxNetFltNo tify_CLEAN = $(VBoxNetFltNotify_DEPS)226 227 VBOXNETFLT_NO TIFY_IDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(firstword $(wildcard \218 #VBoxNetFltNobj_INTERMEDIATES = 219 VBoxNetFltNobj_DEPS = \ 220 $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_i.c \ 221 $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_p.c \ 222 $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.h \ 223 $(VBoxNetFltNobj_0_OUTDIR)/dlldata.c \ 224 $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.tlb 225 VBoxNetFltNobj_CLEAN = $(VBoxNetFltNobj_DEPS) 226 227 VBOXNETFLT_NOBJ_IDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(firstword $(wildcard \ 228 228 $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\ 229 229 $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\ … … 231 231 ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK)) 232 232 233 $$(VBoxNetFltNo tify_0_OUTDIR)/VBoxNetFltNotifyn_i.c \234 + $$(VBoxNetFltNo tify_0_OUTDIR)/VBoxNetFltNotifyn_p.c \235 + $$(VBoxNetFltNo tify_0_OUTDIR)/VBoxNetFltNotifyn.h \236 + $$(VBoxNetFltNo tify_0_OUTDIR)/dlldata.c \237 + $$(VBoxNetFltNo tify_0_OUTDIR)/VBoxNetFltNotifyn.tlb: \238 $(PATH_SUB_CURRENT)/win/no tifyobj/VBoxNetFltNotifyn.idl \233 $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_i.c \ 234 + $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_p.c \ 235 + $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.h \ 236 + $$(VBoxNetFltNobj_0_OUTDIR)/dlldata.c \ 237 + $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.tlb: \ 238 $(PATH_SUB_CURRENT)/win/nobj/VBoxNetFltNobjT.idl \ 239 239 | $$(dir $$@) 240 $(VBOXNETFLT_NO TIFY_IDL) /nologo \241 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxNetFltNo tify_0_OUTDIR)) \240 $(VBOXNETFLT_NOBJ_IDL) /nologo \ 241 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxNetFltNobj_0_OUTDIR)) \ 242 242 /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \ 243 243 $(addprefix /I , $(call VBOX_FN_MAKE_WIN_PATH,$(SDK_W2K3DDK_INCS))) \ … … 254 254 endif 255 255 VBoxNetAdp_DEFS = IN_RT_R0 IN_SUP_STATIC 256 VBoxNetAdp_SDKS = W2K3DDK WINPSDKINCS257 256 VBoxNetAdp_INCS := $(PATH_SUB_CURRENT) 257 VBoxNetAdp_SDKS = WINDDKWLH WINPSDKINCS 258 258 VBoxNetAdp_SOURCES = \ 259 259 VBoxNetFlt.c \ 260 win/ VBoxNetFlt-win.c\261 win/ VBoxNetFltMp-win.c\262 win/ VBoxNetFlt-win.rc260 win/drv/VBoxNetFltM-win.cpp \ 261 win/drv/VBoxNetFltRt-win.cpp \ 262 win/drv/VBoxNetFlt-win.rc 263 263 VBoxNetAdp_DEFS += VBOXNETFLT_STATIC_CONFIG VBOXNETADP 264 264 VBoxNetAdp_DEFS.win += VBOXNETFLT_NO_PACKET_QUEUE … … 284 284 VBoxNetAdp-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetAdpCat.dir 285 285 286 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf: $(PATH_SUB_CURRENT)/win/ VBoxNetAdp.inf $(MAKEFILE_CURRENT) | $$(dir $$@)286 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetAdp.inf $(MAKEFILE_CURRENT) | $$(dir $$@) 287 287 $(call MSG_GENERATE,VBoxNetAdp-inf,$@,$<) 288 288 $(call VBOX_EDIT_INF_FN,$<,$@) -
trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
r33141 r36121 241 241 * @{ */ 242 242 /** Filter driver device context. */ 243 ADAPT IfAdaptor;243 VBOXNETFLTWIN WinIf; 244 244 245 245 volatile uint32_t cModeNetFltRefs; … … 251 251 /** The MAC address of the interface. Caching MAC for performance reasons. */ 252 252 RTMAC MacAddr; 253 /** mutex used to synchronize ADAPTinit/deinit */254 RTSEMMUTEX h AdaptMutex;253 /** mutex used to synchronize WinIf init/deinit */ 254 RTSEMMUTEX hWinIfMutex; 255 255 /** @} */ 256 256 # else -
trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
r34547 r36121 17 17 18 18 #ifdef VBOX_WITH_NETFLT 19 # include "VBox/ WinNetConfig.h"19 # include "VBox/VBoxNetCfg-win.h" 20 20 #endif /* VBOX_WITH_NETFLT */ 21 21 … … 457 457 #define VBOX_NETCFG_MAX_RETRIES 10 458 458 #define NETFLT_PT_INF_REL_PATH L"drivers\\network\\netflt\\VBoxNetFlt.inf" 459 #define NETFLT_MP_INF_REL_PATH L"drivers\\network\\netflt\\VBoxNetFlt _m.inf"459 #define NETFLT_MP_INF_REL_PATH L"drivers\\network\\netflt\\VBoxNetFltM.inf" 460 460 #define NETFLT_ID L"sun_VBoxNetFlt" /** @todo Needs to be changed (?). */ 461 461 #define NETADP_ID L"sun_VBoxNetAdp" /** @todo Needs to be changed (?). */ … … 547 547 { 548 548 LPWSTR lpszLockedBy; 549 HRESULT hr = VBoxNetCfgWinQueryINetCfg( bWrite, VBOX_NETCFG_APP_NAME, ppnc, &lpszLockedBy);549 HRESULT hr = VBoxNetCfgWinQueryINetCfg(ppnc, bWrite, VBOX_NETCFG_APP_NAME, 10000, &lpszLockedBy); 550 550 if(hr != NETCFG_E_NO_WRITE_LOCK) 551 551 { … … 898 898 if(!!pInfPath && bIsFile) 899 899 { 900 HRESULT tmpHr = VBoxNetCfgWinIn stallInf(pInfPath);900 HRESULT tmpHr = VBoxNetCfgWinInfInstall(pInfPath); 901 901 Assert(tmpHr == S_OK); 902 902 } … … 948 948 if(hr == S_OK) 949 949 { 950 hr = VBoxNetCfgWin UninstallInfs(&GUID_DEVCLASS_NET, NETADP_ID, 0/* could be SUOI_FORCEDELETE */);950 hr = VBoxNetCfgWinInfUninstallAll(&GUID_DEVCLASS_NET, NETADP_ID, L"Net", 0/* could be SUOI_FORCEDELETE */); 951 951 if(hr != S_OK) 952 952 { -
trunk/src/VBox/Installer/win/VirtualBox.wxs
r35166 r36121 283 283 Source="$(env.PATH_OUT)\bin\VBoxNetFlt.sys" 284 284 Checksum="yes"/> 285 <File Id="vboxnetfltno tifydll" Name="VBoxNFN.dll" LongName="VBoxNetFltNotify.dll" DiskId="1" Vital="yes"286 Source="$(env.PATH_OUT)\bin\VBoxNetFltNo tify.dll"285 <File Id="vboxnetfltnobjdll" Name="VBoxNob.dll" LongName="VBoxNetFltNobj.dll" DiskId="1" Vital="yes" 286 Source="$(env.PATH_OUT)\bin\VBoxNetFltNobj.dll" 287 287 Checksum="yes"/> 288 <File Id="vboxnetfltminf" Name="VBoxNFlM.inf" LongName="VBoxNetFltM.inf" DiskId="1" Vital="yes" 289 Source="$(env.PATH_OUT)\bin\VBoxNetFltM.inf" /> 288 290 <File Id="vboxnetfltinf" Name="VBoxNFlt.inf" LongName="VBoxNetFlt.inf" DiskId="1" Vital="yes" 289 291 Source="$(env.PATH_OUT)\bin\VBoxNetFlt.inf" /> … … 292 294 Source="$(env.PATH_OUT)\bin\VBoxNetFlt.cat" /> 293 295 <?endif ?> 294 <File Id="vboxnetflt_minf" Name="VBoxNFlM.inf" LongName="VBoxNetFlt_m.inf" DiskId="1" Vital="yes"295 Source="$(env.PATH_OUT)\bin\VBoxNetFlt_m.inf" />296 296 </Component> 297 297 </Directory> <!-- Directory "drivers\network\netflt" --> -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r36107 r36121 100 100 # endif 101 101 # if defined(RT_OS_WINDOWS) 102 # include <VBox/ WinNetConfig.h>102 # include <VBox/VBoxNetCfg-win.h> 103 103 # include <Ntddndis.h> 104 104 # include <devguid.h> … … 3834 3834 Guid hostIFGuid(bstr); 3835 3835 3836 INetCfg 3836 INetCfg *pNc; 3837 3837 ComPtr<INetCfgComponent> pAdaptorComponent; 3838 LPWSTR pszApp; 3839 3840 hrc = VBoxNetCfgWinQueryINetCfg(FALSE /*fGetWriteLock*/, 3841 L"VirtualBox", 3842 &pNc, 3843 &pszApp); 3838 LPWSTR pszApp; 3839 3840 hrc = VBoxNetCfgWinQueryINetCfg(&pNc, FALSE, L"VirtualBox", 10, &pszApp); 3844 3841 Assert(hrc == S_OK); 3845 3842 if (hrc != S_OK) … … 4219 4216 ComPtr<INetCfgComponent> pAdaptorComponent; 4220 4217 LPWSTR pszApp; 4221 4222 hrc = VBoxNetCfgWinQueryINetCfg(FALSE, 4223 L"VirtualBox", 4224 &pNc, 4225 &pszApp); 4218 hrc = VBoxNetCfgWinQueryINetCfg(&pNc, FALSE, L"VirtualBox", 10, &pszApp); 4226 4219 Assert(hrc == S_OK); 4227 4220 if (hrc != S_OK) -
trunk/src/VBox/Main/src-server/HostImpl.cpp
r36057 r36121 52 52 53 53 #if defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT) 54 # include <VBox/ WinNetConfig.h>54 # include <VBox/VBoxNetCfg-win.h> 55 55 #endif /* #if defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT) */ 56 56 -
trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
r35785 r36121 33 33 34 34 #ifdef VBOX_WITH_NETFLT 35 # include "VBox/WinNetConfig.h"36 # include "devguid.h"35 # include "VBox/VBoxNetCfg-win.h" 36 # include "devguid.h" 37 37 #endif 38 38 … … 1001 1001 1002 1002 /* we are using the INetCfg API for getting the list of miniports */ 1003 hr = VBoxNetCfgWinQueryINetCfg( FALSE,1003 hr = VBoxNetCfgWinQueryINetCfg(&pNc, FALSE, 1004 1004 VBOX_APP_NAME, 1005 &pNc,1005 10000, 1006 1006 &lpszApp); 1007 1007 Assert(hr == S_OK); 1008 1008 if (hr == S_OK) 1009 1009 { 1010 hr = VBoxNetCfgWinGetComponentEnum(pNc,&GUID_DEVCLASS_NET, &pEnumComponent);1010 hr = pNc->EnumComponents(&GUID_DEVCLASS_NET, &pEnumComponent); 1011 1011 if (hr == S_OK) 1012 1012 { 1013 while ((hr = VBoxNetCfgWinGetNextComponent(pEnumComponent, &pMpNcc)) == S_OK)1013 while ((hr = pEnumComponent->Next(1, &pMpNcc, NULL)) == S_OK) 1014 1014 { 1015 1015 ULONG uComponentStatus; … … 1032 1032 } 1033 1033 } 1034 VBoxNetCfgWinReleaseRef(pMpNcc);1034 pMpNcc->Release(); 1035 1035 } 1036 1036 Assert(hr == S_OK || hr == S_FALSE); 1037 1037 1038 VBoxNetCfgWinReleaseRef(pEnumComponent);1038 pEnumComponent->Release(); 1039 1039 } 1040 1040 else 1041 1041 { 1042 LogRel(( "failed to get the sun_VBoxNetFlt component,error (0x%x)", hr));1042 LogRel((__FUNCTION__": EnumComponents error (0x%x)", hr)); 1043 1043 } 1044 1044 … … 1442 1442 1443 1443 /* we are using the INetCfg API for getting the list of miniports */ 1444 hr = VBoxNetCfgWinQueryINetCfg( FALSE,1444 hr = VBoxNetCfgWinQueryINetCfg(&pNc, FALSE, 1445 1445 VBOX_APP_NAME, 1446 &pNc,1446 10000, 1447 1447 &lpszApp); 1448 1448 Assert(hr == S_OK); … … 1466 1466 if (hr == S_OK) 1467 1467 { 1468 hr = VBoxNetCfgWinGetBindingPathEnum(pTcpIpNcc, EBP_BELOW, &pEnumBp); 1468 INetCfgComponentBindings *pBindings; 1469 hr = pTcpIpNcc->QueryInterface(IID_INetCfgComponentBindings, (PVOID*)&pBindings); 1469 1470 Assert(hr == S_OK); 1470 1471 if (hr == S_OK) 1471 1472 { 1472 hr = VBoxNetCfgWinGetFirstBindingPath(pEnumBp, &pBp);1473 Assert(hr == S_OK || hr == S_FALSE);1474 while(hr == S_OK)1473 hr = pBindings->EnumBindingPaths(EBP_BELOW, &pEnumBp); 1474 Assert(hr == S_OK); 1475 if (hr == S_OK) 1475 1476 { 1476 /* S_OK == enabled, S_FALSE == disabled */ 1477 if (pBp->IsEnabled() == S_OK) 1478 { 1479 hr = VBoxNetCfgWinGetBindingInterfaceEnum(pBp, &pEnumBi); 1480 Assert(hr == S_OK); 1481 if ( hr == S_OK ) 1477 hr = pEnumBp->Reset(); 1478 Assert(hr == S_OK); 1479 if (hr == S_OK) 1480 { 1481 while ((hr = pEnumBp->Next(1, &pBp, NULL)) == S_OK) 1482 1482 { 1483 hr = VBoxNetCfgWinGetFirstBindingInterface(pEnumBi, &pBi); 1484 Assert(hr == S_OK); 1485 while (hr == S_OK) 1483 /* S_OK == enabled, S_FALSE == disabled */ 1484 if (pBp->IsEnabled() == S_OK) 1486 1485 { 1487 hr = pB i->GetLowerComponent( &pMpNcc);1486 hr = pBp->EnumBindingInterfaces(&pEnumBi); 1488 1487 Assert(hr == S_OK); 1489 if ( hr == S_OK)1488 if ( hr == S_OK ) 1490 1489 { 1491 ULONG uComponentStatus;1492 hr = pMpNcc->GetDeviceStatus(&uComponentStatus);1490 hr = pEnumBi->Reset(); 1491 Assert(hr == S_OK); 1493 1492 if (hr == S_OK) 1494 1493 { 1495 if (uComponentStatus == 0)1494 while ((hr = pEnumBi->Next(1, &pBi, NULL)) == S_OK) 1496 1495 { 1497 vboxNetWinAddComponent(&list, pMpNcc, HostNetworkInterfaceType_Bridged, iDefault); 1496 hr = pBi->GetLowerComponent( &pMpNcc ); 1497 Assert(hr == S_OK); 1498 if (hr == S_OK) 1499 { 1500 ULONG uComponentStatus; 1501 hr = pMpNcc->GetDeviceStatus(&uComponentStatus); 1502 if (hr == S_OK) 1503 { 1504 if (uComponentStatus == 0) 1505 { 1506 vboxNetWinAddComponent(&list, pMpNcc, HostNetworkInterfaceType_Bridged, iDefault); 1507 } 1508 } 1509 pMpNcc->Release(); 1510 } 1511 pBi->Release(); 1498 1512 } 1513 Assert(hr == S_OK || hr == S_FALSE); 1499 1514 } 1500 VBoxNetCfgWinReleaseRef( pMpNcc);1515 pEnumBi->Release(); 1501 1516 } 1502 VBoxNetCfgWinReleaseRef(pBi);1503 1504 hr = VBoxNetCfgWinGetNextBindingInterface(pEnumBi, &pBi);1505 1517 } 1506 VBoxNetCfgWinReleaseRef(pEnumBi);1518 pBp->Release(); 1507 1519 } 1508 } 1509 VBoxNetCfgWinReleaseRef(pBp); 1510 1511 hr = VBoxNetCfgWinGetNextBindingPath(pEnumBp, &pBp); 1520 Assert(hr == S_OK || hr == S_FALSE); 1521 } 1522 pEnumBp->Release(); 1512 1523 } 1513 VBoxNetCfgWinReleaseRef(pEnumBp);1514 } 1515 VBoxNetCfgWinReleaseRef(pTcpIpNcc);1524 pBindings->Release(); 1525 } 1526 pTcpIpNcc->Release(); 1516 1527 } 1517 1528 else
Note:
See TracChangeset
for help on using the changeset viewer.