About the dual attribute of COM interface

Source: Internet
Author: User

Recently, I encountered a strange problem. When calling the COM interface itest1 and C #, If I convert it into an object and then convert it into itest1, the access will fail and the result is null.

If they are all accessed in the main thread, OK. If they are accessed using a new thread, they will not work.

Fortunately, there is another interface, itest2, which can be used normally.

After careful comparison, it is found that itest1 is less than the statement of itest2 [Dual]. In addition, everything is OK.

[Object, UUID (1ef52fdb-1959-481a-a316-b238e49f332b ),Dual,Nonextensible, helpstring ("inbengine interface"), pointer_default (unique)] interface itest1: idispatch

I checked the description about "dual" on the Internet. It's not too clear. Can someone passing by explain the magic?

Http://bbs.csdn.net/topics/90411184

Http://topic.okbase.net/200611/2006110713/2760986.html

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.