title: How to call Windows API functions in JScript?
body: <p>I would like to obtain the current process id in a JScript script. This id is returned by the Windows API <em>GetCurrentProcessId</em> (<a href="http://msdn.microsoft.com/en-us/library/ms683180.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms683180.aspx</a>) function. How do I call this function in JScript?</p>
  
  <p>This obviously doesn't work:</p>
  
  <pre><code>var id = GetCurrentProcessId();
  WScript.Echo("ProcessId is " + id);
  </code></pre>