On 18 March 2017 at 14:13, Andrej Georgi via Boost-users <boost-users@lists.boost.org> wrote:
The problem seems to be the compiler which complained about typecasting
from "long" to "DWORD". The result was an incorrect choice for an
overloaded function. Yes MSYS2 header include overloaded 32 Bit windows
functions which use _int64 in contrast to original windows.

The compiler prefered __int64 over DWORD for long. There are different
solutions to this problem.

It sais on this page, that a DWORD is a A 32-bit unsigned integer. However, this is only true on windows, as DWORD is a typedef for "unsigned long" (a 32 bit unsigned integer on windows). This is a problematic choice (the typedef) as long is defined as 64 bit on all 'nix systems. Here you'll find some info on the different data models. I deduce that MSYS2 or BOOST (on this platform) mixes them (the data models) up, maybe you can roll your own data-type:

typedef std::uint32_t MY_DWORD;

and use MY_DWORD to use the windows API.

As you can see from the last link 'long long' is always a 64 bit integer, and not any cause of trouble ever. (notice on SPARC64 and int is 64 bit, must be a lot of fun using 3rd party libraries).

degski