title: How to get IHTMLDocument2 ->get_body ->get_innerHTML into a lowercase string?
body: <p>I am trying to get the innerHTML from a webpage body on c++, I have this so far:</p>
  
  <pre><code>// I get "Document" from a parameter when calling this code
  BSTR bstrContent = NULL;
  IHTMLElement *p = 0;
  Document-&gt;get_body( &amp;p );
  
  if( p )
  {
      p-&gt;get_innerHTML( &amp;bstrContent );
      p-&gt;Release();
  }
  </code></pre>
  
  <p>Now I need to turn bstrContent into a lowercase std::string or LPSTR, I've tried this:</p>
  
  <pre><code>LPSTR pagecontent = NULL;
  
  int responseLength = (int)wcslen(bstrContent);
  pagecontent = new CHAR[ responseLength + 1 ];
  wcstombs( pagecontent, bstrContent, responseLength);
  </code></pre>
  
  <p>But "pagecontent" does not always contain the full innerHTML, only a first chunk. I even if it worked, I don't know how to easily make it all lowercase, with a std::string I'd use "transform"+"tolower" to do it.</p>
  
  <p><strong>So, how can I turn bstrContent into a std::string?</strong></p>