I have python script that loads windows .dll file:
import ctypes
exDll = ctypes.CDLL('example.dll')
That dll library has code inside, that checks system version using MS interface. The windows version check (inside the dll, C++ code) looks like below:
if (IsWindows10OrGreater()){
... //some code
}
The problem is, that when I run the script on Windows Redstone 1 or 2, IsWindows10OrGreater()
return false!
I've tried it with python 2.7.10 and 2.7.14. Both have the same problem.
I'm pretty sure that this is caused by python not being Windows 10 aware (it's described here: https://msdn.microsoft.com/pl-pl/library/windows/desktop/dn481241%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396).
I've took manifest file that contains GUIDs for all OSes (including Win 10) and then using mt.exe tool I've run it on my python.exe file. After that operation my dll loaded by python script was recognizing correctly Windows 10 system.
That solution is not nice because I need to modify python.exe and I need to do it on all client's machines.
So the question is:
is there some other, better and more scallable way to make windows 10 detection correct when dll is loaded by python?