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

没有注册类 #110

Open
leemotive opened this issue Apr 28, 2022 · 4 comments
Open

没有注册类 #110

leemotive opened this issue Apr 28, 2022 · 4 comments

Comments

@leemotive
Copy link

var cardac = new winax.Object('Aa.SSCARD.1');
^
Error: CreateInstance: Aa.SSCARD.1 没有注册类
在 ie 浏览器里 var cardac = new ActiveXObject('Aa.SSCARD.1') 可以正常执行,并调用对应的方法。

但是 new winax.Object('Microsoft.XMLHttp') 这样的 windows 自带的是能正常执行的。

@dube116
Copy link

dube116 commented May 11, 2022

ie預設會啟用32位元的版本
可能你的dll只註冊了32位元的版本,而你的node是64位元的。
這個情況就會報沒有註冊的錯

@leemotive
Copy link
Author

leemotive commented May 15, 2022

感谢,dll 确实是只注册了32位的,换装 32位 nodejs 的就取到对象了,明天再连上硬件试试能不能取到数据。

@leemotive
Copy link
Author

ie預設會啟用32位元的版本 可能你的dll只註冊了32位元的版本,而你的node是64位元的。 這個情況就會報沒有註冊的錯

var cardac = new winax.Object('Aa.SSCard.1');

cardac.iReadCardBas('1');

console.log(cardac.pOutInfo);
console.log('读卡结束 ')

控制台输出

### DispObject initialized
### VariantObject initialized
### ConnectionPointObject initialized
### DispObject 'Aa.SSCard.1' constructor
### DispObject 'Aa.SSCard.1.iReadCardBas' get
### DispObject 'iReadCardBas' constructor
### DispObject 'iReadCardBas' call

没有输出结果,也没有执行 console.log @dube116 大佬,这可能是什么原因,是我的 dll 有问题么?

@dube116
Copy link

dube116 commented May 16, 2022

我沒用過的東西我也不清楚
IE上確定能用的話就不知道什麼問題了

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

2 participants