Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2024-08

important web assembly question

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to Mgr. Janusz Chmiel
Mgr. Janusz Chmiel wrote
Dear elite Pascal developers here, ?????????? Please, could someone tell Me, if WEB assembly allow programmer to develop module, which will be able to use Microsoft object libraryes such as WIA to access USB scanner?

No.

Webassembly relies on the host environment to access all kinds of things. That means it can only access what the hosting environment offers. For WebAssembly in the browser, that means the browser APIs.

Consequently Microsoft Object libraries are not accessible.

My goal is to make some simple WEB app which will be capable to scan by using USB compatible WIQA scanner and app would be capable to use UWP API Windows.Media.Ocr to perform OCR on some image file. Or unfortunately, such operations are not allowed to do by using WEB assembly for security reasons?

Correct, the security model of the browser does not allow this.

I Am afraid that it will not be possible to control USB scanner directly from The Javascript level by using Pas2JS.

Pas2js offers you access to all the browser APIs.
For obvious reasons, it cannot offer you more than what the browser itself offers.

The Chrome browser has some experimental USB APIs which can conceivably be used, but I would not recommend using them, they are not .