I'm sure this is documented somewhere but i can't find it...
My code is getting a python object from another library (that i can't modify), and i need to call some win32 api functions on it.
Python returns something that isn't the os-level handle from file.fileno(), my guess is that it gives MSVCRT's fileno.
>>> ctypes.windll.kernel32.CreateFileA('test',0x80000000L,1,None,3,0,0)
1948 # <- HANDLE
>>> file('test','r').fileno()
4 # <- not a HANDLE
How do i convert it into a real win32 handle?