:Start of vdsfirewall <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"> <html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>vdsfirewall.dsc</title><STYLE>BODY{FONT-SIZE: 12px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #ffffed } A{COLOR: Blue} A:active {FONT-WEIGHT: bold; COLOR: #008000} A:visited{FONT-WEIGHT: bold; COLOR: #400000} A:hover{ FONT-WEIGHT: bold; COLOR: #008000;} H1{COLOR: #400000; TEXT-ALIGN: left FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif} #copyright{ TEXT-ALIGN: left FONT-SIZE: smaller} DIV.left{TEXT-ALIGN: left} DIV.centered{TEXT-ALIGN: center}</STYLE></head><body bgcolor=#ffffed><table width="100%" height="133"><tr height="129"><th width="173"><a href = "http://www.dragonsphere.net" target = "_blank"><img style="Z-INDEX: 100; LEFT: 25px; POSITION: absolute; TOP: 40px" height="124" alt="DragonSphere" src="http://www.dragonsphere.net/images/dragonfly.png" width="169" align="left" border="0"></a></th><th><a href = "http://www.dragonsphere.net" target = "_blank"><img style="Z-INDEX: 100; LEFT: 200px; POSITION: absolute; TOP: 40px" height="124" alt="Software" src="http://www.dragonsphere.net/images/dslogotext.png" width="473" align="left" border="0"></a></th></tr></table><br/><!--

#DEFINE COMMAND,<!--
#DEFINE COMMAND,-->
<!-- This is crazy but now we should be able to see this script in the browser and run it in VDS too without changing the source code. --><h1>DragonSphere Software Demos</h1><br/><p>If you are viewing this script in your browser you can save it as a VDS 5.x source file (*.dsc) to run it.</p><br/><hr><br/><pre>
#
# <a href = "http://www.dragonsphere.net" target = "_blank">DragonSphere Software's Home Page</a>
#  
# <a href = "http://www.dragonsphere.net/products/gadgetx/demos/vdsfirewall.zip">All Source Files for this demo including ipfwlite.zip</a>
#
# This demo uses the IPFWLite ActiveX control TIPFWLite.dll which is no longer being developed
# or supported by the original author: Egemen Tas, <a href = "http://www.modemwall.com" target = "_blank">modemwall.com</a>
#
#
# To install and use the Firewall control please see the install.txt file found in ipfwlite.zip file
#

If @Greater(@Name(@SYSINFO(DSVER)),4)
<!-- GadgetX --><a href = "http://www.dragonsphere.net/products/gadgetx/gadgetx.zip">
External @Path(%0)gadgetx.dll,5.0
<!-- GadgetX --></a>
  #DEFINE COMMAND,GADGETX,OLE,DEFINE,SET,CALL
  #DEFINE FUNCTION,GADGETX,OLE,GET,CALL
  #DEFINE COMMAND,ONLOG
  #DEFINE COMMAND,ONERROR
Else
  Warn This demo is desinged for VDS 5.x
  Exit
End
Ole Init

<!-- vdsfirewall --><a href = "http://www.dragonsphere.net/products/gadgetx/demos/vdsfirewall.zip">
%%StartFirewall = @Path(%0)sample_lite.policy
<!-- vdsfirewall --></a>
Define Variable,Object,TIPFWLITELib
Define GUID,TIPFirewallEvents,{4DAB9BB3-F312-4220-B901-B916D9FCDDAB}
<!-- vdsfirewall --><a href = "http://www.dragonsphere.net/products/gadgetx/demos/vdsfirewall.zip">
Set TIPFWLITELib,@Ole(Create,TIPFWLite.TIPFirewall.1,NULL)
<!-- vdsfirewall --></a>

  DIALOG CREATE,VDS FireWall,-1,0,499,409
# *** Modified by Dialog Designer on 5/27/2005 - 12:09 ***
  DIALOG ADD,MENU,&File,Start,Stop,-,Save FireWall Log,Save Error Log,-,E&xit
  DIALOG ADD,TEXT,TEXT1,10,30,,,This is a simple FireWall demo that uses the TIPFWLite FireWall control.@CR()This is a demo that shows how you can use VDS and Gadget to access@CR()an ActiveX control that communicates with a windows driver.
  DIALOG ADD,TEXT,FireWall_txt,63,38,,,FireWall Log
  DIALOG ADD,LIST,FireWall_lst,81,37,442,150
  DIALOG ADD,TEXT,Error_txt,236,41,,,Error Log
  DIALOG ADD,LIST,Error_lst,252,37,442,94
  DIALOG ADD,BUTTON,Start,356,135,64,24,Start
  DIALOG ADD,BUTTON,Stop,356,301,64,24,Stop
  DIALOG ADD,STATUS,STATUS1
  DIALOG SHOW
Define EventMap,TIPFirewallEvents,OnLog,1
Define EventMap,TIPFirewallEvents,OnError,2
%%token = @Ole(ConnectEvents,TIPFWLITELib,TIPFirewallEvents)
%%Stopped = 0
:evloop
  Wait Event
  %E = @Event()
  If %E
    Goto %E
  End
goto evloop
:EXITMENU
:CLOSE
  If @Zero(%%Stopped)
    Ole Call,TIPFWLITELib,"StopFirewall"
    Dialog Set,STATUS1,VDS Firewall Stopped
  End
  Ole DisConnectEvents,TIPFWLITELib,TIPFirewallEvents,%%token
  Ole Free,object,TIPFWLITELib
  Ole UnInit
Exit
:STARTMENU
:STARTBUTTON
  Ole Call,TIPFWLITELib,"StartFirewall(^B)",%%StartFirewall
  Dialog Set,STATUS1,VDS Firewall Started
  %%Stopped = 0
goto evloop
:STOPMENU
:STOPBUTTON
  If @Zero(%%Stopped)
    Ole Call,TIPFWLITELib,"StopFirewall"
    Dialog Set,STATUS1,VDS Firewall Stopped
    %%Stopped = 1
  End
goto evloop
:Save FireWall LogMENU

goto evloop
:Save Error LogMENU
  
goto evloop
:TIPFirewallEventsOnError
  %%ErrTxt = @Ole(EventParamsList,TIPFirewallEventsOnError)
  List Append,Error_lst,%%ErrTxt
  Dialog Set,Status1,%%ErrTxt
goto evloop
:TIPFirewallEventsOnLog
  %%LogTxt = @Ole(EventParamsList,TIPFirewallEventsOnLog)
  List Append,FireWall_lst,%%LogTxt
goto evloop
<!-- This is crazy but now we should be able to see this script in the browser. --></pre><div id="copyright"><p>copyright &copy; DragonSphere Software 2000-2006<br><a href="http://www.dragonsphere.net/terms.html" target="_blank">Terms and Conditions</a></p></div></body></html><!--
:-->
:<!--
  
Exit 
# -->End of vdsfirewall
