18 lines
1,009 B
C
18 lines
1,009 B
C
#pragma once
|
|
|
|
#include <windows.h>
|
|
#include <crtdbg.h>
|
|
#include "netfw.h"
|
|
#include <objbase.h>
|
|
#include <oleauto.h>
|
|
#include <stdio.h>
|
|
|
|
HRESULT WindowsFirewallInitialize(OUT INetFwProfile** fwProfile);
|
|
void WindowsFirewallCleanup(IN INetFwProfile* fwProfile);
|
|
HRESULT WindowsFirewallIsOn(IN INetFwProfile* fwProfile, OUT BOOL* fwOn);
|
|
HRESULT WindowsFirewallTurnOn(IN INetFwProfile* fwProfile);
|
|
HRESULT WindowsFirewallTurnOff(IN INetFwProfile* fwProfile);
|
|
HRESULT WindowsFirewallAppIsEnabled( IN INetFwProfile* fwProfile, IN const wchar_t* fwProcessImageFileName, OUT BOOL* fwAppEnabled );
|
|
HRESULT WindowsFirewallAddApp( IN INetFwProfile* fwProfile, IN const wchar_t* fwProcessImageFileName, IN const wchar_t* fwName );
|
|
HRESULT WindowsFirewallPortIsEnabled( IN INetFwProfile* fwProfile, IN LONG portNumber, IN NET_FW_IP_PROTOCOL ipProtocol, OUT BOOL* fwPortEnabled );
|
|
HRESULT WindowsFirewallPortAdd( IN INetFwProfile* fwProfile, IN LONG portNumber, IN NET_FW_IP_PROTOCOL ipProtocol, IN const wchar_t* name );
|