COM component Debugging

Source: Internet
Author: User

Although COM technology has not been recommended by Microsoft, I still have a simple record of how to debug a COM component.

It's almost like debugging a normal DLL, a little different.

1. Creating COM components

Now use vs to create COM components is very easy, can use c++/vc++ or C #, indifferent C # to write COM components or relatively few, this example with VC + + writing.

2. Create a client invoke COM component.

After we create a COM component, we often call it to a third party, where the client does not have our code, only our DLL and usage instructions. When a third party calls a COM component, it may have a special case that requires us to locate the problem or modify the bug.

3. Debugging COM components

In the third party client feedback to us, we need to today's code debugging, through the following ways to do simple debugging,

3.1 Compile a debug version COM component and register it,

3.2 Run the client's application or write their own mock client,

3.3 Using vs to open the COM component code,

3.4 Attach COM project to the client (impersonation), if it is C # to open support native Debug.

This will enter the code when the client calls COM, and it can be debugged.

If you need to invoke COM when the client starts, set the external launcher below debug in VS, set the client's path, and start debugging directly F5.

From the above steps, COM component debugging and ordinary DLL debugging basically consistent, in addition to register a step.

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.