I'm working on a NW.JS-based application that uses a document scanner. Since the API for that scanner is packed in a OCX component, I had to build a wrapper DLL in C++ and call this wrapper through the node-ffi module.
The scanner API is event-based, so it fires events for almost everything. From hardware initialization to image generation when processing documents.
The issue I'm facing is when the scanner notifies my wrapper layer about the images from the document being scanned. The API fires the event twice, one for the front image and another for the rear image. When testing the wrapper DLL using a console application, everything works fine and I can get the two images from the document. If I call the DLL from node-ffi (through my NW.JS application) the behavior is almost the same, except that I get only the front image from the document.
I analyzed the behavior of the two applications using WinDbg and I could notice that everything seems to be the same between the two tests. The only difference is that the event for image generation is being fired only once when testing from the NW.JS application.
It's very strange and I'm running out of ideas about what to investigate. Does anyone here have faced this kind of issue?
Any ideas and hints are welcome.
Thanks!
Strange event behavior in Node.js and C++ DLL integration through node-ffi
126 views Asked by Flávio Araki At
1
There are 1 answers
Related Questions in NODE.JS
- Using Puppeteer to scrape a public API only when the data changes
- How to request administrator rights?
- How do I link two models in mongoose?
- Variable inside a Variable, not updating
- Unable to Post Form Data to MongoDB because of picturepath
- Connection terminated unexpectedly while performing multi row insert using pg-promise
- Processing multiple forms in nodejs and postgresql
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- My unban and ban commands arent showing when i put the slash
- how to make read only file/directory in Mac writable
- How can I outsource worker processes within a for loop?
- Get remote MKV file metadata using nodejs
- Adding google-profanity-words to web page
- Products aren't displayed after fetching data from mysql db (node.js & express)
Related Questions in VISUAL-C++
- Visual Studio C++, breakpoints not stopping debugging DLL (GODOT GDExtention)
- MSVC Compiler Template Sizeof...() not working
- Visual Studio C++ Access to path is denied
- How can I use CsvHelper to parse a string into a list of tokens?
- Unable to add request headers via CHttpFile - C++/MFC
- Is there a worked example of using CStrBufT with a CString?
- wxMediaCtrl causes access read violation when loading
- Why do I get weird class method redefinition errors when I compile with Visual C++ 2022?
- How to make VCPKG copies dependencies pdb files in output directory
- Difference between INT_MIN , INT8_MIN , INT16_MIN. For MAX too
- 'pip install mariadb' states that it cannot find include file 'mysql.h' on my Windows 10 dekstop
- Windows Custom Credential Provider is not displaying tile on logon for all users in a pc
- Why does MSVC never return struct in RAX for member-functions?
- Configure target system
- UI Interface Crashes and Hanging Issues in MFC Application
Related Questions in OCX
- OCX and the MVP Pattern in Window Forms (Winform)
- How to use RichTextBox similar to Richtx32.ocx for Office 365 64 bit
- How can I use OCX in console without System.Windows.Forms?
- How to use vendor specifc OPOS object
- How to call "flash.ocx" with python by filename
- Register Flash.ocx Exception EOleSysError in Delphi
- OCX reg-free-com process with manifests
- How to get method on an Ocx in vb.net
- In a JS method, the native DLL method is called. The DLL execution returns, and the the method remaining js code sometimes does not execute?
- Is there a way to convert 32bit ocx files into 64bit ocx without source code
- How to invoke ActiveX method in C++
- Visual Studio Resource Editor ActiveX control ... could not be instantiated after I just added it with the resource editor?
- finger print or face scanner in oracle forms
- How to remove This action cannot be completed because the other application is busy message
- When i added missing dll and ran regsvr32 name_of_dll.dll it shown me weird message
Related Questions in NW.JS
- User navigating to site in game client gets HTML response from an unknown site
- How can I add a loading gif while my nw.js application reads a csv file?
- nw.js chromedriver won't run from outside of the project folder
- How to use npm package in nw.js without installing Node JS
- AngularJS alert strange behavior
- How to open new window on production build NW-React?
- Change the language locale for chrome.app?
- NW.js - check if confirm window has focus
- NW.js How to debug when your main file is an JS file?
- NW.js fullscreen mode is actually borderless windowed, not true fullscreen
- How to change JSON save location/directory in NW.js
- NW.js + PDF.js: How to provide an URL to pdf.js?
- "Script error" on IndexedDB with window.onerror()
- In Windows Node.js fs.readdirSync With Users Folders etc
- NWJS (Node Webkit) app is not responding on Linux systems when I use it with Web Workers
Related Questions in NODE-FFI
- NodeJS ffi-napi H.264 buffer to mp4 file
- How can I get stream using SDK?
- How to pack a Node JS project to .exe file while using packages such as opencv4nodejs and robotjs
- use safer-ffi in Rust to created dll,analytic struct fail
- Tmp.Node is not a valid Win32 application
- node-ffi-napi : Promise not resolved inside ffi.Cllback
- Electron node-ffi-napi Error: No native build was found
- How to use a custom struct with EnumWindows in the win32-api node module
- How can I get the printfs coming from c functions displayed in the console with node-ffi
- Using node FFI to import types from .so
- How to share c++ data from multiple worker-thread loaded node addons
- How to call function with arguments( char *, int *) in below code using node-ffi?
- node-ffi-napi output parameter @types/ffi-napi missmatch
- Node ffi SHAppBarMessage(ABM_GETTASKBARPOS, data2.ref()) return wrong data
- Node ffi napi, call return true but no result in pointer
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
After having a hard time hitting my head on the table I discovered that the problem was caused by a typo in a configuration file.