A COM object of type ' system.__comobject cannot be cast to an interface type because there is no registered class

Source: Internet
Author: User
Error description E = {"Unable to cast COM object of type" System.__comobject "to interface type ' OpcRcw.Da.IOPCServer". This operation failed because of a COM component call to an interface with IID ' {39c13a4d-011e-11d0-9675-0020afd8adb3} ' QueryInterface failed with the following error: No class was registered (exception from hresult:0 x80040154 (Regdb_e_classnotreg)). "} or cannot cast a COM object of type" System.__comobject "to the interface type" HaiGrang.Package.OpcNetApiChs.DaInterface.IOPCServer ". This operation failed because of a COM component call to an interface with IID ' {39c13a4d-011e-11d0-9675-0020afd8adb3} ' QueryInterface failed with the following error: No class was registered (exception from hresult:0 x80040154 (Regdb_e_classnotreg)).
Causes and workarounds under 64-bit systems, some components (Microsoft) have only 32-bit versions, and 64-bit applications do not call 32-bit COM components, and the result is that there is no registered category. In 64-bit systems, VS2008 generates 64-bit programs by default, and you can change the program's deployment platform to x86 to generate 32-bit programs. Workaround: In the "solution"-"Development project name", right-click on "Properties"-"build"-"target platform", "AnyCPU" to "x86", recompile the program.
Original website: http://blog.csdn.net/w88193363/article/details/7497300

A COM object of type ' system.__comobject cannot be cast to an interface type because there is no registered class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.