At a guess it happens because you try to pass parameters intended for an x86 process to an x64 API
(remember that IDA is x64 now so you're calling an x64 API). Possibly without an explicit prototype ctypes
passes arguments in wrong locations. I don't know why it succeeds on win7, however.
Perhaps it's missing some of the checks present in later versions. In any case, it's not an issue in IDA itself.
He also recommended me to use Appcall  in order to achieve my original task.
: https://hex-rays.com/products/ida/suppo ... ppcall.pdf