samik
July 27th, 2003, 04:03 PM
Hi,
I am new to Windows API.
Here's what I need to do.
I have created 2 TCP sockets in a process. I want to create a new process which will inherit one of them as stdin and the other as stdout.
My first question is that as sockets are being used in the new process for stdin and stdout, I do need to call WSAStartup, don't I ? The problem here is I will not have the source to the new process in a production environment.
I actually wrote some code to do this. I wrote the code for the new process and did not do a WSA_Startup. When I did a scanf in the new process,
it returned an EOF. GetLastError returned 87 - ERROR_INVALID_PARAMETER. Does this confirm that WSAStartup was needed in the new process ?
Hoping for a quick response as I need the info urgently.
Thanks a lot,
Samik
I am new to Windows API.
Here's what I need to do.
I have created 2 TCP sockets in a process. I want to create a new process which will inherit one of them as stdin and the other as stdout.
My first question is that as sockets are being used in the new process for stdin and stdout, I do need to call WSAStartup, don't I ? The problem here is I will not have the source to the new process in a production environment.
I actually wrote some code to do this. I wrote the code for the new process and did not do a WSA_Startup. When I did a scanf in the new process,
it returned an EOF. GetLastError returned 87 - ERROR_INVALID_PARAMETER. Does this confirm that WSAStartup was needed in the new process ?
Hoping for a quick response as I need the info urgently.
Thanks a lot,
Samik