Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. A tricky one :o)

A tricky one :o)

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelptutoriallounge
9 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RaulGonzalez
    wrote on last edited by
    #1

    Hi: I'm a newbie Visual C ++ programmer, and I'm trying to do a Simple chat using winsock.ocx, I have already done one in VB5 but now I would like to do it in VC. Mainly, i'm having problems with .Connect metod, I don't understand what Const VARIANT &RemoteHost and Const VARIANT &RemotePort means. PD: I have a chat example but it uses API and i would like to do it just using winsock.ocx. Thanks and I hope you help.:D This is the strangest life I've ever known.

    N 1 Reply Last reply
    0
    • R RaulGonzalez

      Hi: I'm a newbie Visual C ++ programmer, and I'm trying to do a Simple chat using winsock.ocx, I have already done one in VB5 but now I would like to do it in VC. Mainly, i'm having problems with .Connect metod, I don't understand what Const VARIANT &RemoteHost and Const VARIANT &RemotePort means. PD: I have a chat example but it uses API and i would like to do it just using winsock.ocx. Thanks and I hope you help.:D This is the strangest life I've ever known.

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      RaulGonzalez wrote: Mainly, i'm having problems with .Connect metod, I don't understand what Const VARIANT &RemoteHost and Const VARIANT &RemotePort means. These parameters it is asking for is the "address-of" by the "&" sign for both the RemoteHost and the RemotePort variables being passed to the function. I would suggest that you read Andrew Peace's article on pointers. A Beginner's Guide to Pointers[^]


      Nick Parker

      You see the Standards change. - Fellow co-worker

      R 1 Reply Last reply
      0
      • N Nick Parker

        RaulGonzalez wrote: Mainly, i'm having problems with .Connect metod, I don't understand what Const VARIANT &RemoteHost and Const VARIANT &RemotePort means. These parameters it is asking for is the "address-of" by the "&" sign for both the RemoteHost and the RemotePort variables being passed to the function. I would suggest that you read Andrew Peace's article on pointers. A Beginner's Guide to Pointers[^]


        Nick Parker

        You see the Standards change. - Fellow co-worker

        R Offline
        R Offline
        RaulGonzalez
        wrote on last edited by
        #3

        ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) This is the strangest life I've ever known.

        M N 2 Replies Last reply
        0
        • R RaulGonzalez

          ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) This is the strangest life I've ever known.

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          Sample code in C++ is probably going to use the APIs, since That's How It's Done in C++. (I don't even have winsock.ocx on my system, either) --Mike-- When 900 years old you reach, look as good you will not. Hmm. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

          N 1 Reply Last reply
          0
          • R RaulGonzalez

            ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) This is the strangest life I've ever known.

            N Offline
            N Offline
            Nick Parker
            wrote on last edited by
            #5

            RaulGonzalez wrote: ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) Are you using MFC?


            Nick Parker

            You see the Standards change. - Fellow co-worker

            R 1 Reply Last reply
            0
            • M Michael Dunn

              Sample code in C++ is probably going to use the APIs, since That's How It's Done in C++. (I don't even have winsock.ocx on my system, either) --Mike-- When 900 years old you reach, look as good you will not. Hmm. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

              N Offline
              N Offline
              Nick Parker
              wrote on last edited by
              #6

              Michael Dunn wrote: (I don't even have winsock.ocx on my system, either) Mike, It should come with Visual Studio however the only place I have ever seen it used is with Visual Basic. :eek: It's in the Windows\System32 folder.


              Nick Parker

              You see the Standards change. - Fellow co-worker

              1 Reply Last reply
              0
              • N Nick Parker

                RaulGonzalez wrote: ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) Are you using MFC?


                Nick Parker

                You see the Standards change. - Fellow co-worker

                R Offline
                R Offline
                RaulGonzalez
                wrote on last edited by
                #7

                Yes, i'm using MFC AppWizard (exe)... This is the strangest life I've ever known.

                N 1 Reply Last reply
                0
                • R RaulGonzalez

                  Yes, i'm using MFC AppWizard (exe)... This is the strangest life I've ever known.

                  N Offline
                  N Offline
                  Nick Parker
                  wrote on last edited by
                  #8

                  RaulGonzalez wrote: Yes, i'm using MFC AppWizard (exe)... There is already a Socket class written, you might also want to read about this: Beginning Winsock Programming - Simple TCP server[^] Beginning Winsock Programming - Simple TCP client[^] Beginning Winsock Programming - Multithreaded TCP server with client[^]


                  Nick Parker

                  You see the Standards change. - Fellow co-worker

                  R 1 Reply Last reply
                  0
                  • N Nick Parker

                    RaulGonzalez wrote: Yes, i'm using MFC AppWizard (exe)... There is already a Socket class written, you might also want to read about this: Beginning Winsock Programming - Simple TCP server[^] Beginning Winsock Programming - Simple TCP client[^] Beginning Winsock Programming - Multithreaded TCP server with client[^]


                    Nick Parker

                    You see the Standards change. - Fellow co-worker

                    R Offline
                    R Offline
                    RaulGonzalez
                    wrote on last edited by
                    #9

                    Um, yeah, I had already seen these samples but Nish uses API :( thanks anyway :) This is the strangest life I've ever known.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups