Your winsock registry might corrupted due to virus attack or computer software that use winsock to operate (i.e OpenVPN).
Corrupted or missing winsock registry will restricted your computer from getting Internet connection.
There are two cases involved in fixing the winsock problem.
Case 1: Corrupted winsock registry
In this case, the winsock registry is still there however it just corrupted and need to be reset back. For this case, you just need to download Winsock Fix.
Case 2: Winsock registry is missing.
This is the worst case. You/the software accidentally/purposely deleted the winsock registry in regedit. In this case, you need to restore back the registry. In order to do this, you need to copy similar registry from your friends computer and paste it into your computer.
Download the Winsock and Winsock2 registry here.
After download the registry, double click both files to run it. Then, follow case 1 (Winsock fix) to solve the problem.
Finally, make sure to restart your computer after finish resetting your Winsock.
This method work for me!