I wrote code in vc++ 6.0 to ping a server which works well but the same doesnt work in vc.net .

i tried with the following lib files
#pragma comment(linker,ws2_32)
ws2_32.lib
#pragma comment( linker, "/defaultlib:ws2_32.lib")

and i aslo included the winsock2.h

Could any one suggest me a solution