On Wed, 26 Jul 2023 23:35:25 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
> is it possible that our "::CoInitialize(NULL);" prevents the > ::CoInitializeEx(NULL, COINIT_MULTITHREADED); in the lib later? It is not only possible, it is explicitly stated. If the threading mode is different, the function fails with `RPC_E_CHANGED_MODE`. > But if that code requare com my expectation would be that they call > CoInitialize/CoUninitialize. Exactly! Microsoft docs don't state COM needs be initialised for enumerating devices but it looks like it needs to be. > This CoInitialize initially was added here > [JDK-6950553](https://bugs.openjdk.org/browse/JDK-6950553) (check the stack > trace) It somewhat confirms, you can't access COM without initialising it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14898#discussion_r1276530242