VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.h@ 62534

Last change on this file since 62534 was 60765, checked in by vboxsync, 9 years ago

API: stop using ATL and use a vastly smaller lookalike instead, plus a lot of cleanups

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/* $Id: VBoxNetFltNobj.h 60765 2016-04-29 14:26:58Z vboxsync $ */
2/** @file
3 * VBoxNetFltNobj.h - Notify Object for Bridged Networking Driver.
4 * Used to filter Bridged Networking Driver bindings
5 */
6/*
7 * Copyright (C) 2011-2016 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17#ifndef ___VBoxNetFltNobj_h___
18#define ___VBoxNetFltNobj_h___
19
20#include <windows.h>
21
22#include "VBox/com/defs.h"
23#include "VBoxNetFltNobjT.h"
24#include "VBoxNetFltNobjRc.h"
25
26#define VBOXNETFLTNOTIFY_ONFAIL_BINDDEFAULT false
27
28/*
29 * VirtualBox Bridging driver notify object.
30 * Needed to make our driver bind to "real" host adapters only
31 */
32class ATL_NO_VTABLE VBoxNetFltNobj :
33 public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>,
34 public ATL::CComCoClass<VBoxNetFltNobj, &CLSID_VBoxNetFltNobj>,
35 public INetCfgComponentControl,
36 public INetCfgComponentNotifyBinding
37{
38public:
39 VBoxNetFltNobj();
40 ~VBoxNetFltNobj();
41
42 BEGIN_COM_MAP(VBoxNetFltNobj)
43 COM_INTERFACE_ENTRY(INetCfgComponentControl)
44 COM_INTERFACE_ENTRY(INetCfgComponentNotifyBinding)
45 END_COM_MAP()
46
47 // this is a "just in case" conditional, which is not defined
48#ifdef VBOX_FORCE_REGISTER_SERVER
49 DECLARE_REGISTRY_RESOURCEID(IDR_VBOXNETFLT_NOBJ)
50#endif
51
52 /* INetCfgComponentControl methods */
53 STDMETHOD(Initialize)(IN INetCfgComponent *pNetCfgComponent, IN INetCfg *pNetCfg, IN BOOL bInstalling);
54 STDMETHOD(ApplyRegistryChanges)();
55 STDMETHOD(ApplyPnpChanges)(IN INetCfgPnpReconfigCallback *pCallback);
56 STDMETHOD(CancelChanges)();
57
58 /* INetCfgComponentNotifyBinding methods */
59 STDMETHOD(NotifyBindingPath)(IN DWORD dwChangeFlag, IN INetCfgBindingPath *pNetCfgBP);
60 STDMETHOD(QueryBindingPath)(IN DWORD dwChangeFlag, IN INetCfgBindingPath *pNetCfgBP);
61private:
62
63 void init(IN INetCfgComponent *pNetCfgComponent, IN INetCfg *pNetCfg, IN BOOL bInstalling);
64 void cleanup();
65
66 /* these two used to maintain the component info passed to
67 * INetCfgComponentControl::Initialize */
68 INetCfg *mpNetCfg;
69 INetCfgComponent *mpNetCfgComponent;
70 BOOL mbInstalling;
71};
72
73#endif /* #ifndef ___VBoxNetFltNobj_h___ */
Note: See TracBrowser for help on using the repository browser.

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