[Win32utils-devel] Calling CreateFile on an instance of File -possible?

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Sat Nov 6 21:41:26 EST 2004


Hi Park,

> You can use _get_osfhandle function to get the HANDLE from a fileno.

> Refer to
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__get_osfhandle.asp

That's a great piece of information!

Since the _fileno function will get the fileno from a FILE*:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__fileno.asp

we can now convert

   FILE* ==> fileno ==> HANDLE

I think this might do what Dan needs.

Take care,

Wayne Vucenic



More information about the win32utils-devel mailing list