6 #ifndef _INC_cWinFirewall_H
7 #define _INC_cWinFirewall_H
12 #include "../GrayLibBase.h"
14 #if defined(USE_WIN_SDK) && defined(_WIN32) && ( _MSC_VER >= 1400 ) && ! defined(UNDER_CE)
19 interface INetFwProfile;
21 enum NET_FW_IP_PROTOCOL_;
22 enum NET_FW_PROFILE_TYPE_;
36 cIUnkPtr<INetFwProfile> m_pFwProfile;
42 HRESULT InitFirewallProfile(NET_FW_PROFILE_TYPE_ eProfile);
43 void UnInitFirewall();
45 bool isFirewallPresent()
const
47 return m_pFwProfile !=
nullptr;
50 bool isFirewallEnabled()
const;
51 bool isExceptionsAllowed()
const;
52 bool isNotificationsEnabled()
const;
54 bool IsAppEnabled(
const wchar_t* psFwProcessImageFileName)
const;
56 HRESULT AddAuthorizedApp(
const wchar_t* psFwProcessImageFileName,
const wchar_t* pszFwFriendlyName =
nullptr, NET_FW_SCOPE_ eScope = (NET_FW_SCOPE_)0);
57 HRESULT RemoveAuthorizedApp(
const wchar_t* psFwProcessImageFileName);
59 HRESULT AddOpenPort(WORD wPort, NET_FW_IP_PROTOCOL_ dwProtool,
const wchar_t* pszName);
60 HRESULT RemoveOpenPort(WORD wPort, NET_FW_IP_PROTOCOL_ dwProtool);
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
UNITTEST2_PREDEF(cQuadtree)