Call Function from DLL loaded in front-end javascript (load dll in clientside javascript)

前端 未结 2 1991
南笙
南笙 2020-12-05 22:25

I have a simple clientside javascript application. I want it to load a DLL file (for a SwipeReader CR100) and call functions from the DLL library from within the javascript

2条回答
  •  醉酒成梦
    2020-12-05 22:58

    Call functions from the DLL library from within the javascript code.

    No. You can't load a DLL inside JavaScript.

    Why?

    JavaScript is executed in the stack of the browser. To make anything available, you'll have to wire it up with the browser and then make it accessible; too much of work.

    Work Around

    You can have a client application written in say C# which connects to a JS websocket, then transfer the data. The WebSocket can check for specific chunks of data, and process it the way you want.

    I have used it the way I have described in a project using a fingerprint scanner. Works great! If you add a little bit of Crypto, even better!

提交回复
热议问题