title: Node-webkit WinAPI
body: <p>I’m developing simple node-webkit application for Windows (Vista, 7, …) and I need to use some WinAPI functions, specifically, <code>RegisterHotKey</code> and <code>SendInput</code>, to bind system-wide hotkeys and make keystrokes based on that. There’s no such API supplied by node-webkit, so I thought to use <a href="https://github.com/rbranson/node-ffi">node-ffi</a> to call that functions.</p>
  
  <p>I’m new to WinAPI development, so I’ve read some MSDN manuals, but found that most of examples create window, message loop, message handling procedure and so on. So I don’t understand quite well, how to implement correctly calling to WinAPI from node-webkit, without creating separate window? </p>
  
  <p><a href="https://github.com/rbranson/node-ffi/wiki/Node-FFI-Tutorial">Node-ffi tutorial</a> doesn’t cover that case, so I’ve found the <a href="https://github.com/Benvie/node-Windows">node Windows</a> library, but it seems that it just implements Windows application by means of node.</p>
  
  <p>Is there a way to implement native calls without creating windows application? What’s the correct way to do that?</p>