VirtualBox

Ignore:
Timestamp:
Sep 3, 2014 8:23:24 PM (10 years ago)
Author:
vboxsync
Message:

NetFlt/win: NDIS6: fixes, enable disconnect interface, PM support for NetAdp6, installer helper functions

Location:
trunk/src/VBox/HostDrivers/VBoxNetFlt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk

    r52134 r52592  
    306306
    307307 #
     308 # NetAdp6Uninstall
     309 #
     310 PROGRAMS.win  += NetAdp6Uninstall
     311 NetAdp6Uninstall_TEMPLATE = VBOXR3STATIC
     312 NetAdp6Uninstall_SDKS     = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
     313 NetAdp6Uninstall_SOURCES  = win/tools/VBoxNetAdpUninstall.cpp
     314 NetAdp6Uninstall_DEFS    += NDIS60=1
     315 NetAdp6Uninstall_LIBS     = \
     316        $(WinNetConfig_1_TARGET) \
     317        $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
     318        $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
     319        $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
     320        $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
     321
     322 #
    308323 # NetLwfInstall
    309324 #
     
    437452 endif #  ifdef VBOX_SIGNING_MODE
    438453
    439  ifdef VBOX_WITH_NDIS6
    440454 #
    441455 # VBoxNetAdp6.sys - The VirtualBox Adapter miniport driver.
     
    494508
    495509 endif #  ifdef VBOX_SIGNING_MODE
    496 
    497  endif #  ifdef VBOX_WITH_NDIS6
    498510
    499511endif #ifeq ($(KBUILD_TARGET), win)
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp

    r51908 r52592  
    23902390
    23912391#define DRIVERHWID _T("sun_VBoxNetAdp")
     2392#define DRIVERHWID_NDIS6 _T("sun_VBoxNetAdp6")
    23922393
    23932394#define SetErrBreak(strAndArgs) \
     
    25462547                     t += _tcslen (t) + 1)
    25472548                {
    2548                     if (!_tcsicmp (DRIVERHWID, t))
     2549                    if (!_tcsicmp (DRIVERHWID, t) || !_tcsicmp (DRIVERHWID_NDIS6, t))
    25492550                    {
    25502551                          /* get the device instance ID */
     
    26032604}
    26042605
    2605 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinUpdateHostOnlyNetworkInterface(LPCWSTR pcsxwInf, BOOL *pbRebootRequired)
    2606 {
    2607     return VBoxDrvCfgDrvUpdate(DRIVERHWID, pcsxwInf, pbRebootRequired);
     2606VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinUpdateHostOnlyNetworkInterface(LPCWSTR pcsxwInf, BOOL *pbRebootRequired, LPCWSTR pcsxwId)
     2607{
     2608    return VBoxDrvCfgDrvUpdate(pcsxwId, pcsxwInf, pbRebootRequired);
    26082609}
    26092610
     
    27662767                while (t && *t && t < (TCHAR *) &detailBuf [RT_ELEMENTS(detailBuf)])
    27672768                {
    2768                     if (!_tcsicmp(t, DRIVERHWID))
     2769                    if (!_tcsicmp(t, DRIVERHWID) || !_tcsicmp(t, DRIVERHWID_NDIS6))
    27692770                        break;
    27702771
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp

    r38738 r52592  
    201201    if (hr == S_OK)
    202202    {
    203         if (!_wcsnicmp(pDevId, L"sun_VBoxNetAdp", sizeof(L"sun_VBoxNetAdp")/2))
     203        if (!_wcsnicmp(pDevId, L"sun_VBoxNetAdp", sizeof(L"sun_VBoxNetAdp")/2) ||
     204            !_wcsnicmp(pDevId, L"sun_VBoxNetAdp6", sizeof(L"sun_VBoxNetAdp6")/2))
    204205        {
    205206            *pbShouldBind = false;
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpInstall.cpp

    r52183 r52592  
    2424#ifdef NDIS60
    2525#define VBOX_NETADP_INF L"VBoxNetAdp6.inf"
     26#define VBOX_NETADP_HWID L"sun_VBoxNetAdp6"
    2627#else /* !NDIS60 */
    2728#define VBOX_NETADP_INF L"VBoxNetAdp.inf"
     29#define VBOX_NETADP_HWID L"sun_VBoxNetAdp"
    2830#endif /* !NDIS60 */
    2931
     
    106108    if (SUCCEEDED(hr))
    107109    {
    108         hr = VBoxNetCfgWinRemoveAllNetDevicesOfId(L"sun_VBoxNetAdp");
    109         if (SUCCEEDED(hr))
    110         {
    111             hr = VBoxDrvCfgInfUninstallAllSetupDi(&GUID_DEVCLASS_NET, L"Net", L"sun_VBoxNetAdp", 0/* could be SUOI_FORCEDELETE */);
     110        hr = VBoxNetCfgWinRemoveAllNetDevicesOfId(VBOX_NETADP_HWID);
     111        if (SUCCEEDED(hr))
     112        {
     113            hr = VBoxDrvCfgInfUninstallAllSetupDi(&GUID_DEVCLASS_NET, L"Net", VBOX_NETADP_HWID, 0/* could be SUOI_FORCEDELETE */);
    112114            if (SUCCEEDED(hr))
    113115            {
     
    139141    {
    140142        BOOL fRebootRequired = FALSE;
    141         hr = VBoxNetCfgWinUpdateHostOnlyNetworkInterface(VBOX_NETADP_INF, &fRebootRequired);
     143        hr = VBoxNetCfgWinUpdateHostOnlyNetworkInterface(VBOX_NETADP_INF, &fRebootRequired, VBOX_NETADP_HWID);
    142144        if (SUCCEEDED(hr))
    143145        {
     
    168170    if (SUCCEEDED(hr))
    169171    {
    170         hr = VBoxNetCfgWinPropChangeAllNetDevicesOfId(L"sun_VBoxNetAdp", VBOXNECTFGWINPROPCHANGE_TYPE_DISABLE);
     172        hr = VBoxNetCfgWinPropChangeAllNetDevicesOfId(VBOX_NETADP_HWID, VBOXNECTFGWINPROPCHANGE_TYPE_DISABLE);
    171173        if (SUCCEEDED(hr))
    172174        {
     
    195197    if (SUCCEEDED(hr))
    196198    {
    197         hr = VBoxNetCfgWinPropChangeAllNetDevicesOfId(L"sun_VBoxNetAdp", VBOXNECTFGWINPROPCHANGE_TYPE_ENABLE);
     199        hr = VBoxNetCfgWinPropChangeAllNetDevicesOfId(VBOX_NETADP_HWID, VBOXNECTFGWINPROPCHANGE_TYPE_ENABLE);
    198200        if (SUCCEEDED(hr))
    199201        {
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpUninstall.cpp

    r44529 r52592  
    2222#include <devguid.h>
    2323
     24#ifdef NDIS60
     25#define VBOX_NETADP_HWID L"sun_VBoxNetAdp6"
     26#else /* !NDIS60 */
     27#define VBOX_NETADP_HWID L"sun_VBoxNetAdp"
     28#endif /* !NDIS60 */
    2429
    2530static VOID winNetCfgLogger (LPCSTR szString)
     
    3843    if(hr == S_OK)
    3944    {
    40         hr = VBoxNetCfgWinRemoveAllNetDevicesOfId(L"sun_VBoxNetAdp");
     45        hr = VBoxNetCfgWinRemoveAllNetDevicesOfId(VBOX_NETADP_HWID);
    4146        if(hr == S_OK)
    4247        {
    43             hr = VBoxDrvCfgInfUninstallAllSetupDi(&GUID_DEVCLASS_NET, L"Net", L"sun_VBoxNetAdp", 0/* could be SUOI_FORCEDELETE */);
     48            hr = VBoxDrvCfgInfUninstallAllSetupDi(&GUID_DEVCLASS_NET, L"Net", VBOX_NETADP_HWID, 0/* could be SUOI_FORCEDELETE */);
    4449            if(hr == S_OK)
    4550            {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette