I´m looking for a sustainable solution when it comes to communicating with hardware on a local machine. I´ve been reading about NPAPI but unfortunately it is being phased out.
I would like to run things like silent printing from a website. The system shall be able to decide if it shall print to a receipt printer or a A4-printer. At the moment I need to set a default printer but I would the system to determine which printer that shall be used.
I would also like to run a dll file that exists locally on the users machine.
Are there any other solutions for my problem?
Kind regards / H
For hardware support, have a look at chrome.usb, chrome.bluetooth, chrome.sockets, and chrome.serial. These APIs are available to Chrome Apps.
"Running a DLL" doesn't quite makes sense unless you mean DllRegisterServer or some other executable that loads the DLL into its process space. Either way, Native Messaging is your friend. But note that you're going to need administrative access to the target machines; that's the only way to get Chrome to run arbitrary native executables.
As for specific library functionality, have you tried simply building the DLL as a NaCl module? There's a huge number of common libraries that are successfully running under NaCl with minimal porting effort, which bodes well for your DLL doing the same (assuming you have the source).
I have no idea what you mean by "sustainable," so I'm not trying to answer that part of your question.