Using the old COM in. Net makes people feel a headache!

Source: Internet
Author: User

Using the old COM component in. NET is also non-. Net COM, which is often confusing !!! WrittenProgramIt is possible to run all the OK statements in the header, but it is inexplicable to let it run several times. Exceptions are strange. I had to find a solution.

Google, I saw a friend's post mentioning the solution. "In. net, when calling the unmanaged COM component, it is actually indirectly carried out through RCW (runtime callalbe wrapper). Therefore, we must follow some rules when calling. For objects returned from the unmanaged COM component, we need to call system. runtime. interopservices. marshal. only when the releasecomobject () method is set to null can it be correctly released and its normal operation be ensured. In particular, some objects that are implicitly returned must be called like this .", I also think that the LJ recycling mechanism of. NET is to be changed. Otherwise, let the hackers try to press the keyboard multiple times !!!

I hate reading the technical documentation in msdn. This time, it seems I am still going to suffer. I don't know how. NET 2.0 works in this regard?

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.