I got requirement from client that when any user swipe their card then their details should be capture in web page automatically on client side. However same we are doing in IE by creating ActiveX control in C#. Card service provider install their DLL on client side and from ActiveX control, we can call their DLL and get details.
But now client want the same operation in multiple browser, i.e. Mozilla Firefox and Chrome, which does not support ActiveX control. Can you please give me an idea how it is possible to call client side DLL method from browser?
The only way you could do that would be to use the NPAPI — e.g., a "browser plugin" like the Java plugin. NPAPI plugins have full, unrestricted access to the client machine.
But note that Chrome is dropping support for NPAPI plugins (in fact, already has in Linux and will soon under Windows), so even if you wrote an NPAPI plugin and got people to install it, before long they wouldn't be able to use it in Chrome. Similarly, your ActiveX solution won't work in more modern versions of IE, since IE dropped support for them.
In short: You cannot do this in a modern browser. Instead, you'll need to create a program users download and install. That program could contain a hosted browser control, or you could try to use the OS's application automatic interface (if it has one) to find the browser window and paste the information into it. That would, of course, be different on every OS.
The dll returns a delegate function as a receive handler. You initialize the dll with the send handler. I haven't found a method to run the dlls from the browser yet as you do with ActiveX.
The solution in the stackoverflow question is a node process that runs on the client computer that has the Swipe Reader. The client application connects to the node process that runs a websocket server and communicates through websocket messages. I think you can port this on every platform (Win, Unix, MacOS).
Another solution is to build a C# application (windows only if you use .NET, all platforms if you only use the CoreCLR) that listens to swipes and triggers an event to send the data on all connected websockets.
After gone through some links, it seems it can be possible through following option.
Create plug-in for those browser are written using the NPAPI.
Write signed applets to call dll that runs from a html or any web application. It almost run on all browsers. Here is the link for sample
©2020 All rights reserved.