gethostname method fails

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Greetings!
I am using the following method to get the host name of my computer in an
application. But it does not do so and ends up giving me error 10093
(WSAGetLastError()). I have no clue as to what is happening. Can anyone
please help. Many thanks in advance.
Best regards,


gethostname(name, sizeof(name));
.



Relevant Pages