[Win32utils-devel] Calling CreateFile on an instance of File
-possible?
win32utils-devel at rubyforge.org
win32utils-devel at rubyforge.org
Sat Nov 6 21:10:56 EST 2004
Hi,
> Hi Dan,
>
> First, thanks for all your great work on the win32-* libraries!
>
>> I don't know how to get a valid HANDLE to a instance of an
>> already opened file.
>
> I took a look at how to determine the HANDLE that corresponds to a
> given FILE* or a fileno. Not surprisingly, I couldn't find any way to
> recover that HANDLE.
>
>
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
> Take care,
>
> Wayne Vucenic
>
Regards,
Park Heesob
More information about the win32utils-devel
mailing list