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

ActiveX.Object is not a constructor #109

Open
952185530 opened this issue Mar 25, 2022 · 1 comment
Open

ActiveX.Object is not a constructor #109

952185530 opened this issue Mar 25, 2022 · 1 comment

Comments

@952185530
Copy link

952185530 commented Mar 25, 2022

import winax from "winax"
function getDM() {
try {
console.log(global.ActiveXObject)

return new ActiveXObject("dm.dmsoft");
} catch (e) {
try {
execSync(regsvr32 ${path.join(process.cwd(), 'src/dll/dm.dll')});
} catch (e) {
// fix electron not work
execSync(
regsvr32 ${path.join(process.cwd(), 'src/dll/dm.dll' )}``
);
}
` return new ActiveXObject("dm.dmsoft");`
}
}

@952185530
Copy link
Author

952185530 commented Mar 25, 2022

The console output this error : ActiveX.Object is not a constructor。
I know what this error means, but I don't know how it happened. I just imported the dependency and new to instantiation。
My project use Vue2.0, Typescript and Electron

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