home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / dev / e / amigae / src / tools / hook / hooktest.e next >
Text File  |  1992-09-02  |  358b  |  17 lines

  1. -> test hooks
  2.  
  3. MODULE 'utility', 'utility/hooks', 'tools/installhook'
  4.  
  5. PROC main()
  6.   DEF myhook:hook
  7.   IF utilitybase:=OpenLibrary('utility.library',37)
  8.     installhook(myhook,{myfunction})
  9.     CallHookPkt(myhook,1,2)
  10.     CloseLibrary(utilitybase)
  11.   ENDIF
  12. ENDPROC
  13.  
  14. PROC myfunction(hook,obj,msg)
  15.   WriteF('hook: $\h, obj: \d, msg: \d\n',hook,obj,msg)
  16. ENDPROC
  17.