Just for the record, in the "Optional Header," under the category "MajorSubsystemVersion," the mingw created PE binary has NT version 4 (released 1996), whereas the Visual Studio 2015 PE binary has it set to NT version 6 (released 2008).

So, it's exactly as you said!

Regards,
...John Alway
On Tuesday, November 12, 2019, 03:18:29 PM CST, Stefan Dösinger <stefandoesinger@gmail.com> wrote:


Am 12.11.19 um 19:38 schrieb Thales:
> Hello,
>
> I've been stuck on this issue, where code compiled in Visual Studio
> (C++) and code compiled via the cross-compiler, MinGW, in a Wine test
> are behaving differently (I'm using Ubuntu 16.04).  It is surprising me,
> because these are a few virtually identical API level calls and I
> assumed that would result in the same behavior.
I ran into a similar issue in the dxgi tests, and what ultimately made
the difference is the subsystem version in the PE header. Mingw sets it
to NT 4.0 or 5.0, whereas Visual Studio 2017 (which I used at that time)
set it to NT 6.0.

I don't remember the exact name of the fields in question, but if you
compare the PE header with a tool like PE explorer you'll probably spot

them.