Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   sockets-winsock inclusion (http://www.go4expert.com/forums/sockets-winsock-inclusion-t1973/)

altafahmed2k4 23Nov2006 13:01

sockets-winsock inclusion

I am using microsoft visual c++ 2005 express edition

Now i want to do socket programming in windows

for which i require winsock API which i do have as a dll file in my system file

but i dont have winsock.h in library files of my compiler

which is necessary for the purpose

can any one tell me

how to create a header file named winsock.h from that api or else .......

shabbir 23Nov2006 16:07

Re: sockets-winsock inclusion
You have posted it as an Article under the Article / Source code section. I have moved it to the Queries and Discussion forum.

altafahmed2k4 23Nov2006 22:45

Re: sockets-winsock inclusion
Thank you very much shabbir

pradeep 24Nov2006 11:19

Re: sockets-winsock inclusion
Download the file from http://www.sockets.com/devfiles.htm

altafahmed2k4 24Nov2006 23:50

Re: sockets-winsock inclusion

Can anyone give me a hint of writing a

SOCKET program for client and server which should run both in windows as well as Linux

with no change in the code i welcome as many possible solutions to this as possible.

pradeep 25Nov2006 10:54

Re: sockets-winsock inclusion
Try using #ifdef to check for the OS type and include the appropriate header file.Also, do the same thing where the function name differs. I hope the idea is clear to you.

altafahmed2k4 26Nov2006 00:04

Re: sockets-winsock inclusion
pradeep can you still stress it how using #ifdef to identify os

All times are GMT +5.5. The time now is 07:02.