You got this WSAEOPNOTSUPP (10045) trying to call function listen, so the error description in this case is much shorter:
The referenced socket is not of a type that supports the listen operation.
It means that you did something was wrong between socket creation and calling listen.
The easiest way to find out what is wrong is to compare your code with some working example (from MSDN or other sites) for listening socket.