http://www.perlmonks.org?node_id=589755

syphilis has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
On Win32, I have some perl code as follows:
$fd = fileno($sock); $fd = Win32API::File::FdGetOsFHandle($fd);
I would like to do the same thing in C. I already have the C equivalent of $sock ... I just need to do the fileno() and FdGetOsFHandle() bits, but I haven't yet found out how to do that. If someone knows, or has some hints on where I should be looking, that would be great.

In the meantime I'll keep digging through the perl source ... the needle is somewhere in that haystack ...

(This is just an attempt to determine whether a problem with Net-SSH2-0.09 lies with the perl implementation, or with the C library it uses. I have a simple perl script that demonstrates the problem - all I need to do now is to run the same program as a C app and see if the same problem persists. So the question is definitely OT, but the overall aim is not :-)

Cheers,
Rob