Thread: How to make winsock.h for windows socket programming?

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    9

    How to make winsock.h for windows socket programming?

    Hi everybody,

    I am a C# ASP.NET programmer. I learned C for hobby programming. Google is my main resource. I am interested in network programming. As you know, in windows it is socket programming. I got few good tutorials from Google. But it required a socket.h header file. I am using turbo C and windows XP operating system. I couldn’t find the socket.h header file in my INCLUDE directory. Again I goggled. I found that in windows, it is winsock.h and this can make from the winsock.dll in the system32 folder using the MAKELIB utility. But I couldn’t find the MAKELIB utility anywhere in the internet. Is there any utility to convert Microsoft dlls to C header files? Am I in the correct way? Please guide me.

    Thanks and regards,
    Thomas

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Check out Beej's Guide to Network Programming. Among other things, it covers what you need to know to begin network programming on Windows.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    9
    Thanks for your reply. Yes I used to read this article. Sorry for my ignorance, I think this article mention about the programming in unix. It is a very good article for beginners. However it didn’t mention about how to get the required header files. From where I can find these header files? Once again thanks for your kind response.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    From where I can find these header files?
    If you are using Microsoft Visual Studio, you would need to install the Platform SDK, as far as I can tell. If you are using the MinGW port of GCC, it should come with the installation.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    9
    Thanks for your patience. Yes I am familiar with socket programming in VC++ 6.0 and .NET. let me ask one more question. Can I use the same header files in .NET with TURBO C?

  6. #6
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    > Can I use the same header files in .NET with TURBO C?
    Get rid of Turbo C, and get a modern compiler (Not VC++ 6.0 either).

  7. #7
    Registered User
    Join Date
    Jun 2008
    Posts
    9
    Can you suggest a compiler for me?

    Regards,
    Thomas

  8. #8
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by thomas_joyee View Post
    Can you suggest a compiler for me?

    Regards,
    Thomas
    gcc or Visual Studio 2008 Express Edition would be possible choices.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  9. #9
    Registered User
    Join Date
    Jun 2008
    Posts
    9
    Thanks you for your kind responses. I will try gcc

  10. #10
    Registered User
    Join Date
    Mar 2010
    Posts
    1
    hi thomas.......can u mail me the material u have on networking concepts in windows? My mail ID is [email protected]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple Socket Library Not so simple
    By jbully in forum C Programming
    Replies: 4
    Last Post: 12-23-2010, 09:23 AM
  2. Replies: 2
    Last Post: 06-04-2009, 01:57 PM
  3. socket programming question, closing sockets...
    By ursula in forum Networking/Device Communication
    Replies: 2
    Last Post: 05-31-2009, 05:17 PM
  4. Win32 Common Controls in C++, how do i make and use them?
    By C+noob in forum Windows Programming
    Replies: 6
    Last Post: 01-09-2006, 11:53 AM
  5. Socket code problems
    By Phan in forum Networking/Device Communication
    Replies: 10
    Last Post: 09-14-2005, 04:23 PM

Tags for this Thread