4

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.

The extension reads the Windows Registry and returns a value.

Does anyone know what can I use to do the same in Chrome these days?

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.

This is my 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;
}

What am I doing wrong?

erip
  • 16,374
  • 11
  • 66
  • 121
  • +1 because this seems like an interesting question others might have. I'm a little surprised you got a down-vote without some explanation. My guess is perhaps someone felt like you hadn't done any research. – Brian Vandenberg Jul 22 '15 at 14:34

1 Answers1

4

Native Messaging is the only thing that would be able to do what you want.

taxilian
  • 14,229
  • 4
  • 34
  • 73
  • As of Jan 15 2020, Chrome apps are being discontinued: https://blog.chromium.org/2020/01/moving-forward-from-chrome-apps.html . Does anyone know of a way to do native messaging in chrome extensions? – Skewjo Feb 03 '21 at 13:03
  • 1
    Chrome extensions support native messaging extensions – taxilian Feb 06 '21 at 21:52