Results 1 to 7 of 7

Thread: Using winsock or only API calls

  1. #1

    Thread Starter
    Lively Member CADman's Avatar
    Join Date
    Aug 2007
    Posts
    92

    Using winsock or only API calls

    I have a couple of two-player games that I would like to have communicate between the computers on my home network. I use the learning edition of VB6 so it will not register winsock and some other controls. I think I found a freebee winsock replacement on the net that I could use. My question is: can I use only API calls instead of winsock or is that not possible or a more complicated approach.
    As of now I write files to a directory and poll them on a timer every xx seconds which works but is kind of a clunky (inelegant) way.
    I thought I would start with a client/server chat program to learn how it works and then apply it to the games.

    Cadman

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Using winsock or only API calls

    Rather than restricting yourself to the very limited Learning Edition of VB6, why not get the latest version of VB which is free (and has more features)?

    You can get it from www.microsoft.com/express

  3. #3

    Thread Starter
    Lively Member CADman's Avatar
    Join Date
    Aug 2007
    Posts
    92

    Re: Using winsock or only API calls

    I had downloaded the 2005 VB express but never used it. Will the newest release allow using all of the controls?

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Using winsock or only API calls

    I'm not sure which features are limited in the Express editions (I've got a higher one), but I would assume that there are features which allow this kind of thing - from what I've heard, the limits of the Express editions make some of the paid-for VB6 editions look bad.

  5. #5

    Thread Starter
    Lively Member CADman's Avatar
    Join Date
    Aug 2007
    Posts
    92

    Re: Using winsock or only API calls

    I have found a winsock replacement by James Vincent Carnicelli that I hope my version of VB will allow to be registered.
    I plan to try UDP and handle the acknowledgement of packet arrival myself.

    How do you get the computer's xxx.xxx.xxx.xxx number?

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Using winsock or only API calls

    That is an IP Address, and a forum search (particularly in the relevant CodeBank) should find code to detect it.

  7. #7

    Thread Starter
    Lively Member CADman's Avatar
    Join Date
    Aug 2007
    Posts
    92

    Re: Using winsock or only API calls

    Since I was able to register the socket.ocx replacement, I was also able to do the same for winsock and it works too. Network programming seems like a different animal than regular code. Thanks for pointing out where I can look for more help on this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width