title: How to make system calls counter using deviare
body: <p>I would like to hook all the functions calls of all running processes. I can hook certain function("ws2_32.dll!recv") of all processes using deviare by:</p>
  
  <pre><code>        CreateSpyMgr(out mgr);
          hook = mgr.CreateHook("ws2_32.dll!recv");
          hook.Attach(mgr.get_Processes(0));
          mgr.set_ReportProcessCreation(DeviareCommonLib.ReportMethod._create_process_hook_and_polling, 0);
          hook.set_HookNewProcesses(0, 1);
          hook.OnFunctionCalled += new DHookEvents_OnFunctionCalledEventHandler(hook_OnFunctionCalled);
          hook.Hook();
  </code></pre>
  
  <p>How can I hook all function calls instead of just one? is it possible?</p>
  
  <p>Or should I create hooks collection(of all functions which is way hard) using INktSpyMgr::CreateHooksCollection and add hooks to it, then call hook method and pass the INktHooksEnum object as the parameter. Is this the only way to do this?</p>
  
  <p>My aim is to make a tool that counts all system calls for each running process. Feel free to give any suggestions.</p>