parameters: (self, debug, pid)
docstring: Installs the API hook on a given process and module.
  
          @warning: Do not call from an API hook callback.
  
          @type  debug: L{Debug}
          @param debug: Debug object.
  
          @type  pid: int
          @param pid: Process ID.
docstring_summary: Installs the API hook on a given process and module.
docstring_tokens: Installs the API hook on a given process and module .
function: def hook(self, debug, pid):
          """
          Installs the API hook on a given process and module.
  
          @warning: Do not call from an API hook callback.
  
          @type  debug: L{Debug}
          @param debug: Debug object.
  
          @type  pid: int
          @param pid: Process ID.
          """
          label = "%s!%s" % (self.__modName, self.__procName)
          try:
              hook = self.__hook[pid]
          except KeyError:
              try:
                  aProcess = debug.system.get_process(pid)
              except KeyError:
                  aProcess = Process(pid)
              hook = Hook(self.__preCB, self.__postCB,
                          self.__paramCount, self.__signature,
                          aProcess.get_arch() )
              self.__hook[pid] = hook
          hook.hook(debug, pid, label)
function_tokens: def hook ( self , debug , pid ) : label = "%s!%s" % ( self . __modName , self . __procName ) try : hook = self . __hook [ pid ] except KeyError : try : aProcess = debug . system . get_process ( pid ) except KeyError : aProcess = Process ( pid ) hook = Hook ( self . __preCB , self . __postCB , self . __paramCount , self . __signature , aProcess . get_arch ( ) ) self . __hook [ pid ] = hook hook . hook ( debug , pid , label )