Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeout to COM initialization #141

Open
SimonFischer04 opened this issue Jul 29, 2024 · 0 comments
Open

Add timeout to COM initialization #141

SimonFischer04 opened this issue Jul 29, 2024 · 0 comments

Comments

@SimonFischer04
Copy link
Contributor

Hi,
Thanks for the great project.

I'm using this package to communicate with a device-driver. In my logic I'm calling (default settings from readme):

var winax = require('winax');

console.log('a')
const device = new winax.Object('somedevice.comif', {
        activate: false,
        getobject: false,
        type: true
      });
console.log('b')

If the driver is running everything is fine. But if not, it just hangs my program indefinitely (prints a, but never b).
(ps: the 'somedevice.comif' is correct, because if I put in some random value I get a proper error that a class with this name does not exist)
I don't know if it's a Problem with the driver I'm using (more likely, but unfortunately I have no control over this one) or with this package.

Would be great if the COM initialization could be made asynchronous, or I'm able to pass some 'timeout' option to the constructor call, so I can deal with this and not just stuck my whole application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant