ATL \ com compilation error "error c2370 'libid" and "error c2227: Left of '-> queryinterfac

Source: Internet
Author: User

1. Error c2370: 'libid _ atllib ': redefinition; Different Storage Class

C: \ Program Files \ Microsoft Visual Studio \ vc98 \ ATL \ include \ atlbase. H (79): See Declaration of 'libid _ atllib'

Check if both. H and. file C, which is generated under vc6. H and. the C file also defines the Type Library libid_atllib. You can use Conditional compilation to include only one of them. This problem is not found in the compiler of the higher version.

 

2. Error c2227: The left side of "-> QueryInterface" must point to class/structure/Union/generic type D: \ Program Files \ vs2010 \ Vc \ include \ comip. h 810

The left and right types do not match, such as the originalCodeIs:

_ Recordsetptr esou = (_ recordsetptr) TW. saddr;

Val = esou-> fields-> item [TW. Para-> getat (0). allocsysstring ()]-> getvalue (). bstrval;

Change

_ Recordsetptr * esou = (_ recordsetptr *) TW. saddr;

Val = (* esou)-> fields-> item [TW. Para-> getat (0). allocsysstring ()]-> getvalue (). bstrval;

Make sure the type conversion is correct.

 

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.