Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't initialize COM #123

Merged
merged 2 commits into from
Sep 1, 2022
Merged

Conversation

AlexGuteniev
Copy link
Contributor

Resolve #121

See the documentation:

You don't need to call CoInitialize, CoInitializeEx, or OleInitialize to use this function and interfaces obtained by it.

Even if DIA support is implemented, there's a way to avoid CoInitializeEx for DIA too.

@AlexGuteniev
Copy link
Contributor Author

BTW if DbgEng interfaces were COM apartment aware, this comment is wrong:

        // COINIT_MULTITHREADED means that we must serialize access to the objects manually.
        // This is the fastest way to work.

COINIT_MULTITHREADED does not always mean better perf (in particular it is worse when the underlying server is apartment-threaded), and does not ever mean that the synchronization to call COM methods is necessary (it rather means that the synchronization often is needed inside COM methods, as they are called from arbitrary threads).

@apolukhin apolukhin merged commit bac3611 into boostorg:develop Sep 1, 2022
@apolukhin
Copy link
Member

Many many thanks for the great news and the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Windows] Remove ::CoInitializeEx(0, COINIT_MULTITHREADED);
2 participants