Link to home
Start Free TrialLog in
Avatar of kalukaley
kalukaleyFlag for United States of America

asked on

COM Add-Ins and Apartments

Do you have to initialize COM in each new thread that is launched inside of an In-proc server?  I know that this has to be done client side.

Each new thread in the dll server will be accessing the COM object via the GIT, and my threading model is STA.

It's a little puzzling to me since I know I don't have to initialize COM in a dll server since it's threading model is set in the registry.

However, when I launch a new thread, I don't know if this new thread will automatically enter an Apartment.  Given that you can sometimes not follow COM rules and still have your code work correctly; I also know that if you don't follow Good programming practices, you will pay for it later, even if you think you're getting away with it now.

ASKER CERTIFIED SOLUTION
Avatar of multithreading
multithreading

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial