title: What exactly is this API and what is it doing?
body: <p>I know you are gonna hate me for that kind of question. But could somebody tell me what the following code is doing?</p>
  
  <p>I mean there are some libraries loaded, i get that. plus there are some methods, still I don't get it.</p>
  
  <p>F.e.:</p>
  
  <pre><code>[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
          [return: MarshalAs(UnmanagedType.Bool)]
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>private static class API 
      {
  
          [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
          public static extern IntPtr SetWindowsHookEx(
              int idHook,
              HookDel lpfn,
              IntPtr hMod,
              uint dwThreadId);
  
          [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
          [return: MarshalAs(UnmanagedType.Bool)]
          public static extern bool UnhookWindowsHookEx(IntPtr hhk);
  
          [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
          public static extern IntPtr CallNextHookEx(
              IntPtr hhk,
              int nCode,
              IntPtr wParam,
              IntPtr lParam);
  
          [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
          public static extern IntPtr GetModuleHandle(
              string lpModuleName);
      }
  </code></pre>
  
  <p>You do not have to explain it to me line for line. At least give me some reference where I can read it up, please.</p>
  
  <p>Thx in advance!</p>