title: passing parameters (Prob with std::string conversion to LPWSTR)
body: <p>thats a little bit annoying. I try to passing parameters from an <code>NPAPI</code> plugin to an EXE.</p>
  
  <p><strong>First information:</strong> The executable is currently a <strong>placeholder</strong> and prints out only the passed arguments as an message box:  </p>
  
  <pre><code>int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {
      /* Print out the arguments */
      MessageBox(NULL, lpCmdLine, TEXT("World of RPG"), NULL);
  
      /* Exit with return code 0x00 */
      return 0;
  }
  </code></pre>
  
  <p>When i try to start the Application over Visual Studio (started with the parameter "-console"), the message box will prompted correctly:</p>
  
  <p><img src="https://i.stack.imgur.com/ad11g.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/FflVG.png" alt="enter image description here"></p>
  
  <p>Yet, i try to execute the executable from my <code>NPAPI</code> Plugin:</p>
  
  <pre><code>/* Javascript call: document.getElementById("myPlugin").startGame("-console"); */
  std::string WoRPGAPI::startGame(const std::string&amp; method_args) {
      /* Define JSON result variables */
      FB::VariantMap json;
      Json::StyledWriter writer;
  
      /* Define process variables*/
      PROCESS_INFORMATION processInformation = { 0 };
      STARTUPINFO startupInfo = { 0 };
      startupInfo.cb = sizeof(startupInfo);
  
      LPWSTR game_exe = LgetGamePath("World of RPG.exe").c_str(); // example: "C:\\Program Files (x86)\\World of RPG\\World of RPG.exe"
      LPWSTR game_args = method_args.c_str(); // example: "-console"
  
      /* Create the Process */
      BOOL status = CreateProcess(game_exe, game_args, NULL, NULL, FALSE, 0, NULL, NULL, &amp;startupInfo, &amp;processInformation);
  
      /* Check the process status */
      if (!status) {
          DWORD dLastError = GetLastError();
          LPCTSTR strErrorMessage = NULL;
  
          FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, dLastError, 0, (LPWSTR)&amp;strErrorMessage, 0, NULL);
  
          json["code"] = dLastError;
          json["message"] = strErrorMessage;
      }
  
      json["status"] = status;
  
      /* get JSON back to the browser */
      return writer.write(FB::variantToJsonValue(json));
  }
  </code></pre>
  
  <p>And here is the result:</p>
  
  <p><img src="https://i.stack.imgur.com/VLyQb.png" alt="enter image description here"></p>
  
  <p>Ok, try to test with an longer string with <code>startGame("This is a longer string!")</code>. You see, only the first word will be cutten. I've tried over 30 mins to solve that:</p>
  
  <p><img src="https://i.stack.imgur.com/Y2z5F.png" alt="enter image description here"></p>
  
  <p>Can you tell me, what i'm doing wrong?
  I've tried a lot of conversion examples to convert <code>std::string</code> to <code>LPWSTR</code> but nothing works. Other methods gave me cryptical output like chinese characters.</p>