title: How to convert std::string to LPVOID
body: <p>I need convert std::string to LPVOID for create PIMAGE_DOS_HEADER.</p>
  
  <p>Already i have tested some casting but my PE Header isn't right.</p>
  
  <pre><code>std::ifstream file;
  file.open("C:/testDLL.enc");
  std::string data;
  file &gt;&gt; data;
  file.close();;
  
  std::string decrypted = decrypt(data);
  
  LPVOID lpData = static_cast&lt;LPVOID&gt;(&amp;decrypted[0]);
  
  //LPVOID lpData = reinterpret_cast&lt;LPVOID&gt;((char*)decrypted.c_str());
  //LPVOID lpData = (char*)decrypted.c_str();
  
  PIMAGE_DOS_HEADER pDH = (PIMAGE_DOS_HEADER)lpData;
  </code></pre>
  
  <p>Thanks for helps.</p>