WinCE barcode scanner - COM Exception when initializing CCoreScannerClass

天大地大妈咪最大 提交于 2019-12-24 01:33:50

问题



I am following this tutorial (https://atgsupportcentral.motorolasolutions.com/content/emb/docs/manuals/14978403a.pdf), created a simple Windows Forms and successfully can debug it on the scanner (it's a Symbol MC3000). However I am getting an exception when trying to initialize the CCoreScannerClass:

        //Instantiate CoreScanner Class
        CCoreScannerClass cCoreScannerClass = new CoreScanner.CCoreScannerClass();

The exact error message is this:

"COM object with CLSID '{9F8D4F16-0F61-4A38-98B3-1F6F80F11C87}' cannot be created due to the following error: 0x80040154."

Can anyone please provide some help? Since it's a COM exception, I assume it's because the class is not registered? Any ideas on how to fix this?

Many thanks.


回答1:


I got it working by downloading the EMDK for .NET from the Motorola's website:

https://portal.motorolasolutions.com/Support/US-EN/Resolution?solutionId=88177&productDetailGUID=f5563b1ca4151410VgnVCM10000001c7b00aRCRD&detailChannelGUID=a0bde8cea8151410VgnVCM10000001c7b00aRCRD




回答2:


0x80040154 is an error that, as you mentioned, pertains to the COM class not being registered, which means that COM couldn't find the class factory in the Windows registry. You can use C:\Windows\system32\regsvr32 to register the missing SDK DLL.




回答3:


I got it working after the installation of the Scanner Management Service https://portal.motorolasolutions.com/Support/US-EN/Resolution?solutionId=87864&productDetailGUID=f0acd085364cf310VgnVCM10000081c7b10aRCRD&detailChannelGUID=84a76e203763e310VgnVCM1000000389bd0aRCRD



来源:https://stackoverflow.com/questions/25440900/wince-barcode-scanner-com-exception-when-initializing-ccorescannerclass

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!