I am after anyone who has used Winsock before.

I have have 3 applications :

1. Standalone Exe for the client machine
2. Exe that runs as an NT Service on the server
3. Standalone Exe for the server machine

App 2 when the service starts kicks off App 3 and connects via WinSock to be able to "remote control" it.

App 1 connects via WinSock to App2 allowing you to remote control App 3 using App 2 as a buffer. It is done this way so that if App 3 freezes, App 2 can forcefully close it down, kick it off again and re-establish a connection.

Anyone had any problems with using WinSock and any "pitfalls" I should know about?

At the moment I am getting an 10049 "Address is not available from the local machine" but I cannot find any documentation which states the range allowable for the port number. I set the Local port number to 0 so it will automatically choose its own.

Suggestions?