Sumber Kode

Disable Windows Firewall

  • delphibasics
  • Nov 19' 14
  • Delphi
  • 216
  • 241
  • United States
This snippet disables Windows Firewall on WindowsXP and WindowsVista.

program DisableWindowsFirewall;

{$APPTYPE GUI}

{www.delphibasics.co.nr}

uses
  Windows, winsvc, shellapi;
 
procedure Close_Firewal;
var
  SCM, hService: LongWord;
  sStatus: TServiceStatus;
begin
  SCM      := OpenSCManager(nil, nil, SC_MANAGER_ALL_ACCESS);
  hService := OpenService(SCM, PChar('SharedAccess'), SERVICE_ALL_ACCESS);
  ControlService(hService, SERVICE_CONTROL_STOP, sStatus);
  CloseServiceHandle(hService);
end;
Powered by
Pasar Kode Partner

Share

  • Tags :
comments powered by Disqus

Kode Terkait

Memory Execution of File Stored in Resource

Simple TCP Sockets Chat Example

Memory Execution Unit - [WinXP|WinVista|Win7] - uRunPE

Memory Execution Unit - [WinXP|WinVista|Win7] - uExecFromMem

Rtl Compression Unit - uRtlCompression

Suspend Process / Resume Process

Simple Split Function - Reading settings from executables.

PrintWindow Example - Delphi Source Code

MiniReg - LightWeight TRegistry Replacement

Delete Self - Procedure to close and delete the current application



Kategori