title: Get output from JavaScript function in C++
body: <p>Hy,</p>
  <p>I'm working at a project that must call from C++ a custom function made in JavaScript. I'm able to run the function</p>
  <p>The project should work only on Windows (actually it's a Windows service), so it's ok to use interfaces IWebBrowser2 and IHtmlDocument2</p>
  <p>The function's signature is <code>string function(string)</code>. I'm able to run the function in C++, based on <a href="http://www.codeproject.com/Articles/2352/JavaScript-call-from-C" rel="nofollow noreferrer">this tutorial</a> (I'm using IWebBrowser2 and IHtmlDocument2 interface), but I'm not able to get the output from that JS function back in C++.</p>
  <p>Is there any method to retrieve the output from that JS function back in C++, using those interfaces? ( or maybe other)</p>
  <p>Thank you,</p>