Hi Thierry,
the error comes probably from
here. I don't know the win32ole library well enough to say what this error means.
Maybe the root cause is one of this:
1. A change in win32ole. Looking into the ruby git repository the changes within this library between ruby-2.3.1 and 2.4.1 seems to be manageable. There is at least nothing obviously that could cause you this error.
2. The library loading search paths have changed between rubyinstaller-2.3 and 2.4. You already tested to set RUBY_DLL_PATH to PATH in order to ensure that all DLLs can be found. However Windows specifies that the PATH is is processed from left to right, but this is not specified for RUBY_DLL_PATH. So you maybe should have a closer look at what the PATH contains and check what you program loads (per Sysinternals ProcessMonitor or so).
3. The compiler has changed from gcc-4.7 to 7.1 between rubyinstaller-2.3 and 2.4. You could use a gcc-7.1 compiled ruby-2.3.4 from
here to cross-check whether that makes a difference.
Hope this helps!
--
Kind Regards,
Lars