From 6b18ea44749a16b78f26274ee712616405d2af90 Mon Sep 17 00:00:00 2001 From: markus Date: Thu, 18 May 2023 14:30:29 +0200 Subject: [PATCH] Using CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) to be compatible with Java 17. --- CMakeLists.txt | 2 +- win/platformcontext.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5dd0b5b..622f60b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ cmake_minimum_required(VERSION 3.1) project (openpnp-capture) -set(OPENPNP_CAPTURE_LIB_VERSION "0.0.26" CACHE STRING "openpnp-capture library version") +set(OPENPNP_CAPTURE_LIB_VERSION "0.0.28" CACHE STRING "openpnp-capture library version") set(OPENPNP_CAPTURE_LIB_SOVERSION "0" CACHE STRING "openpnp-capture library soversion") # make sure the libjpegturbo is compiled with the diff --git a/win/platformcontext.cpp b/win/platformcontext.cpp index 8c9a25a..b5475c3 100644 --- a/win/platformcontext.cpp +++ b/win/platformcontext.cpp @@ -50,7 +50,7 @@ Context* createPlatformContext() PlatformContext::PlatformContext() : Context() { HRESULT hr; - hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); + hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); if (hr != S_OK) { // This might happen when another part of the program