Seems this is a problem of WinInetd. It should not redirect files to sockets, it should copy between file handle and socket - just like any web-server does when running CGI application. It should not depend of ability of console app to operate with sockets and even know something about sockets. (sorry for my poor English)