[Component] "component errors occur when COM components are referenced.

Source: Internet
Author: User

[Component] "component errors occur when COM components are referenced.
Preface?

Recently, when translating audio and text, I encountered an error: "The interoperability type SpeechLib. SpVoiceClass cannot be embedded ". Use the appropriate interface.

Ask the experts to obtain the correct solution.

Add references from the Com group first:

Right-click the introduced Com Component Library and choose properties:

Change the embedded interoperability type to "false ":

Cause of Error Correction

1. The meaning of timely introduction of embedding in "embedded interoperability type" is similar to the function of Using in C # and include in C. The meaning of this attribute

Is to tell the compiler whether to introduce the interoperability type.

2. "Interoperability type" refers to a series of Com group discipline inspection assembly, which is a library file in the public Runtime Library, similar to compiled classes and interfaces.

3. The "embedded interoperability type" is set to true. In fact, the interoperability set is not introduced (the Com assembly is abandoned during compilation), and only the user code is compiled.

Assembly. If it is set to false, the type information of the COM type needs to be obtained from the interoperability program.

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.