title: Read the Windows Registry from Chrome Extension
body: <p>I built a browser extension with Firebreath a couple of years ago, but now I realized that it isn't working anymore on Chrome because it doesn't support NPAPI anymore.</p>
  
  <p>The extension reads the Windows Registry and returns a value.</p>
  
  <p>Does anyone know what can I use to do the same in Chrome these days?</p>
  
  <p>EDIT:
  After hours of work, I'm able to run the extension and the host app, but everytime I try to receive data, I get undefined.</p>
  
  <p>This is my code:</p>
  
  <pre><code>int main(int argc, char* argv[]) {
      char message[] = "{\"t\": \"t\"}";
  
      unsigned int len = strlen(message);
      _setmode(_fileno(stdout), _O_BINARY);
      _setmode(_fileno(stdin),  _O_BINARY);
  
      printf("%c%c%c%c", (char) 10, (char) 0, (char) 0, (char) 0);
  
      printf("%s", message);
  
      return 0;
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>