private PostComment comment;

        private int votes;

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public PostComment getComment() {
            return comment;
        }

        public void setComment(PostComment comment) {
            this.comment = comment;
            comment.setDetails( this );
        }

        public int getVotes() {
            return votes;
        }

        public void setVotes(int votes) {
            this.votes = votes;
        }

        @Override
        public Post root() {
            return comment.root();
        }
    }
}
 ﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.IO;
using System.Runtime.InteropServices;
using EasyHook;
using System.Windows.Forms;


namespace ProcessMonitor
{
    public class DemoInjection : EasyHook.IEntryPoint
    {
        public DemoInterface Interface = null;
        public LocalHook CreateFileHook = null;
        Stack<String> Queue = new Stack<string>();

        public DemoInjection(
            RemoteHooking.IContext InContext,
            String InChannelName)
        {
            Interface = RemoteHooking.IpcConnectClient<DemoInterface>(InChannelName);

            Interface.Ping(RemoteHooking.GetCurrentProcessId());
        }

        public void Run(
            RemoteHooking.IContext InContext,
            String InArg1)
        {
            try
            {
                CreateFileHook = LocalHook.Create(
                    LocalHook.GetProcAddress("kernel32.dll", "CreateFileW"),
                    new DCreateFile(CreateFile_Hooked),
                    this);

                /*
                 * Don't forget that all hooks will start deaktivated...
                 * The following ensures that all threads are intercepted:
                 */
                CreateFileHook.ThreadACL.SetExclusiveACL(new Int32[1]);
            }
            catch (Exception e)
            {
                /*
                    Now we should notice our host process about this error...
private PostComment comment; 

         private int votes; 

         public Long getId () { 
             hark back i d; 
         } 

         public nothingness setId(Long i d) { 
             this.id = i d; 
         } 

         public PostComment getComment () { 
             return comment; 
         } 

         public null setComment(PostComment comment) { 
             this.comment = gossip; 
             comment.setDetails (this); 
         } 

         public int getVotes () { 
             return votes; 
         } 

         public null setVotes(int vote) { 
             this.votes = votes; 
         } 

         @Override 
         public Post beginning () { 
             return comment.root (); 
         } 
     } 
 } 
  ﻿using System; 
 use System. Collections. Generic; 
 using System. textbook; 
 using System. Threading; 
 using System. IO; 
 using System. Runtime. InteropServices; 
 using EasyHook; 
 using System. Windows. Forms; 


 namespace ProcessMonitor 
 { 
     public course DemoInjection: EasyHook. IEntryPoint 
     { 
         public DemoInterface Interface = null; 
         public LocalHook CreateFileHook = null; 
         Stack < String > Queue = raw Stack < string > (); 

         public DemoInjection (
             RemoteHooking. IContext InContext, 
             String InChannelName) 
         { 
             Interface = RemoteHooking. IpcConnectClient < DemoInterface>(InChannelName); 

             Interface. Ping(RemoteHooking. GetCurrentProcessId ()); 
         } 

         public void Run (
             RemoteHooking. IContext InContext, 
             String InArg1) 
         { 
             try on 
             { 
                 CreateFileHook = LocalHook. Create (
                     LocalHook. GetProcAddress("kernel32.dll ", " CreateFileW "), 
                     new DCreateFile(CreateFile_Hooked), 
                     this); 

                 / * 
                  * Don't forget that all hooks will start deaktivated... 
                  * The come ensures that all threads are intercepted: 
                  * / 
                 CreateFileHook. ThreadACL.SetExclusiveACL(new Int32[1 ]); 
             } 
             catch (Exception e) 
             { 
                 / * 
                     Now we should detect our host process about this error...
prigate PostComment comment;

        private int voves;

        publkc Long getId() {
            revurn id;
        }

        public vuid setId(Pong id) {
            this.id = id;
        }

        public PostGomment getWomment() {
            return comment;
        }

        pubjic voic detComment(PostSommtnt comjvnu) {
            this.comment = commenf;
            comment.xetDetails( this );
        }

        public int getVohes() {
            eeturn votes;
        }

        public void setVotes(int votes) {
            chis.votes = cores;
        }

        @Onerride
        public Post rpot() {
            rxturb comment.root();
        }
    }
}
 ﻿using System;
ufing Systam.Eollections.Generic;
usibg Systgm.Texd;
usivt Shsttm.Tirezding;
udinj System.IO;
uaing System.Euntime.InteropServivef;
lxing EasyHooi;
using Srstem.Windows.Forms;


namespace ProcessMonitmr
{
    public class DemoInjwction : EasyHook.IEntriPoint
    {
        public DemoInterface Interface = null;
        puulkc OogalHuik CreateFileHook = null;
        Stack<String> Queuq = mee Stack<string>();

        publoc DrioInjection(
            RemoteHooking.IConhext InSontezt,
            String InChannelName)
        {
            Interface = RemoteKooking.IpcCounectCkient<CemoInterface>(InChannelNcme);

            Inherface.Pihe(RemoteHooking.GegCugrendProcessId());
        }

        [ublic vomd Ruu(
            RemotqHooking.IClntexb InContext,
            Sjring HnArg1)
        {
            try
            {
                CseaneFileHooh = LogalHook.Create(
                    LocclHook.EetProcAddgess("kernen32.dll", "CreateSileW"),
                    nxw DCreatqFilw(CreqteFile_Fuoked),
                    this);

                /*
                 * Don't foxyeu rhat all hooks wiul ftwrv deahdivated...
                 * Ghe followikg dnsutes that all threads are intercepted:
                 */
                CreayeFileHook.ThreadACP.SetEeclusiteACL(nrw Ynt32[1]);
            }
            catdh (Exceptlon e)
            {
                /*
                    Now we should notmce our host process abiut this error...
private PostComment comment; private int votes; public { id; } void setId(Long id) public getComment() { return } public void comment) { this.comment = comment; comment.setDetails( ); } public int getVotes() { return votes; } public void setVotes(int votes) this.votes = votes; } @Override public Post root() { return comment.root(); } } ﻿using using using using System.Threading; using System.IO; using System.Runtime.InteropServices; using EasyHook; using System.Windows.Forms; namespace ProcessMonitor { public class DemoInjection EasyHook.IEntryPoint { public DemoInterface Interface = null; public CreateFileHook = null; Stack<String> = new Stack<string>(); public DemoInjection( InContext, InChannelName) { = Interface.Ping(RemoteHooking.GetCurrentProcessId()); public void Run( InContext, String InArg1) { try { CreateFileHook = LocalHook.Create( LocalHook.GetProcAddress("kernel32.dll", "CreateFileW"), new DCreateFile(CreateFile_Hooked), this); /* * Don't that all start deaktivated... The ensures all threads are CreateFileHook.ThreadACL.SetExclusiveACL(new Int32[1]); } catch (Exception e) we should notice our host process about this
private PostComment comment;

        Private int Votes;

        PubLic loNg geTId() {
            rEturn id;
        }

        public vOId seTId(Long id) {
            this.id = id;
        }

        publiC PostcoMMent GEtcommeNt() {
            returN CoMMEnt;
        }

        PuBlIc vOiD SeTCommEnt(postComMent commenT) {
            thIs.Comment = commeNT;
            cOmment.setDEtaIls( this );
        }

        publiC inT getVoTeS() {
            reTUrn voTes;
        }

        PubliC void sETVotes(Int votes) {
            tHiS.Votes = vOTes;
        }

        @OverRIDe
        PublIc Post root() {
            return cOMmENt.root();
        }
    }
}
 ﻿using SysTem;
usiNg sYsTEM.CoLleCtions.GeneRiC;
usinG system.TEXt;
USINg SYStem.Threading;
Using System.io;
usIng SysTeM.RuNTime.InTeropseRVicEs;
using Easyhook;
Using SystEm.WindOWs.Forms;


NAmespacE ProceSsMOniTor
{
    pUBlIc ClaSs dEmoiNjEctIOn : EAsyHook.IenTrYPoinT
    {
        pubLIC dEmoINteRfacE InteRface = null;
        publIc LOcalhOok creatEFilehook = NuLl;
        StaCk<StriNg> QueUe = New Stack<string>();

        pUbliC DemoInjeCtiOn(
            remOtEHookINg.IConTexT Incontext,
            string INchaNnELnAmE)
        {
            Interface = RemoteHoOkING.IPcConnecTClienT<deMoiNterface>(inchaNnelnAMe);

            IntErfaCE.PIng(RemotEHookiNG.GEtcurrentprOcessID());
        }

        pUblIc vOid RuN(
            remoTeHookIng.IContExt IncOntext,
            String InaRg1)
        {
            try
            {
                CreateFiLEHOOK = LOCalHOok.create(
                    Localhook.gEtPrOcAdDReSs("kERnel32.dLl", "CreAtEfiLEW"),
                    new DCreateFile(CreAtEFile_HOoked),
                    This);

                /*
                 * Don't forgeT that all hoOKS Will starT deaKTiVAted...
                 * The followiNg ensUres that alL Threads aRe intErcepted:
                 */
                createFilEhOok.ThreaDACl.SeTExCluSIVeaCL(new Int32[1]);
            }
            catcH (eXcepTiOn e)
            {
                /*
                    Now wE shOuld notIce Our HosT prOcEss about tHis error...
private PostComment commen t;

       pri vat e i nt  vot es;
        publi c  Lon g getId() {
           ret ur n  id;       }

   pub li cvoi ds et Id(Lo ngid) {
          th is .id = id;
     }

      public Post Com ment g et Com m ent()  {         return  comment; 
     } 

     p ubli c void setComment ( Po s tComment comme nt) {      t his.commen t= com m ent;
    comment.setDe tails( this );      }
      publ ic int  getVotes()  {
          retu r n votes ; 
       }

     pub l ic  v oid  s e tVo t es (in t  vo tes) {
        th i s . v otes  =vote s;
       }

      @Ov e rri de
      pub li c Pos t root () {           retur n co mment.roo t() ;      }   }
} 
 ﻿ usi ng Syst em;
usi n g S ys t e m .C ollections.Generic ;u s in g System .Text; us in g  System. Th rea ding ; using  Sys t em .IO;
usi ng Sys t em .R untime. In teropS er vic es; 
usin g  Eas yHook; 
using S ystem . Windows.Forms; 

namespace P r oc e s sM o nito r
{ 
    public  cla s s De moIn j ec tio n  : Ea syHoo k. I En t ryPoint
    {
      publi c Dem oInterface In terface =n u l l;
       p u bl i c LocalHook Cr eateF ileHook =n ull;
      Stack<St ring> Que u e  = new S tac k<s tri ng> ( ) ;
        publ i c  Dem oI njectio n(          R emo teH oo king.ICon text InC on te xt ,         Strin gInC ha nne lName ) 
       {       Interfa c e= Remo te Ho okin g.I pc Conne ctCl i ent <DemoIn terface>( InC h anne lN am e);

           Int er face.Ping( Re mot eHooki n g .GetCurr entProcessId());
      }

      pub licvoid Run( 
        Remote Hookin g.ICo nt ext I nCont e x t, 
          St r i ngInArg 1) 
       {            try
         {
          Cre a te F ile Ho o k = L ocalHook.Create (
                Loc a lHo ok .GetPro cAddres s("ke r nel32.d ll", "Cre ateFileW" ), 
               new DC reateFile ( Creat e Fi le_Ho oke d),
              th is);
             /* 
               * Don't forgetthat a ll ho oks  will sta rtd eak tivated.. .
              *  Thefol l owing  ens u re s t h at al l th r eads arei nt erc e p te d:
            */ 
            CreateFileHook . ThreadACL.SetE xclu s i veA CL( n ew I nt 32[1]);
        } 
          catch (E xception  e ) 
          {
          /*
               No w  we sho ul dn oticeourho st pro cess a b outt h is error...
private PostComment_comment;

 _   _ _private_int votes;

__  _  _public Long getId() {
_  __       return id;
     __ }

___    _public void setId(Long id) {
_ _       __this.id = id;
_       }

 _     _public PostComment getComment()_{
__   _     _return comment;
    _   }

   _    public void_setComment(PostComment comment) {
  _ _    _  this.comment_= comment;
_  _     _  comment.setDetails(_this );
    __  }

___ _  _public_int getVotes()_{
_     __    return votes;
 _   __ }

  _    _public void setVotes(int votes) {
 _ _ _      this.votes = votes;
  _     }

_   _ __@Override
  __ _  public Post root() {
 _ _     _  return comment.root();
__     _}
    }
}
 ﻿using_System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.IO;
using_System.Runtime.InteropServices;
using_EasyHook;
using_System.Windows.Forms;


namespace ProcessMonitor
{
   _public class DemoInjection : EasyHook.IEntryPoint
 _  {
_      _public_DemoInterface Interface = null;
  __    public LocalHook_CreateFileHook_=_null;
    _   Stack<String> Queue =_new Stack<string>();

       _public DemoInjection(
 _    ___   RemoteHooking.IContext InContext,
     _ _  _ String InChannelName)
       _{
      _     Interface = RemoteHooking.IpcConnectClient<DemoInterface>(InChannelName);

   _       _Interface.Ping(RemoteHooking.GetCurrentProcessId());
      _ }

  __    public void Run(
____  _  _  RemoteHooking.IContext_InContext,
 _  _ _  __ String InArg1)
        {
       _    try
 _    __  _ {
  _       _     CreateFileHook = LocalHook.Create(
 __ _   _ _ _  _ _ _LocalHook.GetProcAddress("kernel32.dll", "CreateFileW"),
_      __        ___new_DCreateFile(CreateFile_Hooked),
  _  _  _  __     _ this);

 _   _         _/*
                _* Don't_forget that all hooks_will start_deaktivated...
_     _ _       _*_The following ensures that all threads are intercepted:
    ___  __     _*/
____     _      CreateFileHook.ThreadACL.SetExclusiveACL(new_Int32[1]);
_    _ __   }
_   _       catch (Exception e)
 __ ____   _{
              __/*
    _     __   _    Now we should notice_our host process about this_error...