Hard to say exactly, as you don't appear to have posted the complete compileable code that exhibits your problem.
> void main()
>{
>// Initialize WinSock
> int wsaret=WSAStartup(0x101,&wsaData);
You use wsaData in the line above. Where is it declared? Is it somewhere before main() is called, or does it exist in a header file somewhere that is (or is supposed to be) included by your program?
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.