Issue #12371 has been updated by Masaki Suketa.


Ethan, It's not easy for me to use CoInitializeEx instead of OleInitialize.
I had tried to use CoInitializeEx(NULL, MULTITHREADED) before, but I encountered SEGV about thread issue 
and could not fix it.
To make Ruby's thread and win32ole's thread work well, I use OleInitialize and CoRegisterMessagefilter.
Unfortunately, CoRegisterMessagefilter works with OleInitialize.
I'll try to investigate this issue again, but I'm not sure to fix it.
Do you have any good idea to fix this issue?


----------------------------------------
Bug #12371: Windows Nano Server WIN32OLE compatibility
https://bugs.ruby-lang.org/issues/12371#change-60335

* Author: Alessandro Pilotti
* Status: Assigned
* Priority: Normal
* Assignee: Masaki Suketa
* ruby -v: 
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
The `OleInitialize()` call used in WIN32OLE is not supported on Nano Server due to the fact that the STA COM model is not available:

https://github.com/ruby/ruby/blob/32674b167bddc0d737c38f84722986b0f228b44b/ext/win32ole/win32ole.c#L820

As an alternative, `CoInitializeEx(NULL, COINIT_MULTITHREADED)` can be called when running on Nano Server, thus ensuring both compatibility with the preexisting behaviour and support for Nano Server.




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>