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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to communicate with server in vc++?

How to communicate with server in vc++?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++sysadminhelptutorial
7 Posts 5 Posters 0 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.
  • L Offline
    L Offline
    Le rner
    wrote on last edited by
    #1

    Hi all, i want to send info to my server and on server side server processed on received information and get back some result on my side i receive the result and display a message what is returned by server. so please tell me how can i do this processing? what function or methods are use for this. please help me for this and provide info and guidance for this. thanks in advance.

    R T A D 4 Replies Last reply
    0
    • L Le rner

      Hi all, i want to send info to my server and on server side server processed on received information and get back some result on my side i receive the result and display a message what is returned by server. so please tell me how can i do this processing? what function or methods are use for this. please help me for this and provide info and guidance for this. thanks in advance.

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      There are many ways to do this (TCP/IP for instance), and most of them can be found with a simple Google search. CodeProject also has many articles on the subject.

      "Real men drive manual transmission" - Rajesh.

      1 Reply Last reply
      0
      • L Le rner

        Hi all, i want to send info to my server and on server side server processed on received information and get back some result on my side i receive the result and display a message what is returned by server. so please tell me how can i do this processing? what function or methods are use for this. please help me for this and provide info and guidance for this. thanks in advance.

        T Offline
        T Offline
        T RATHA KRISHNAN
        wrote on last edited by
        #3

        Hi! It depends on how you want to send the info to your server(whether it's in XML format or some other format). If it's XML use IXMLHTTPRequestPtr::open() to connect with the server and IXMLHTTPRequestPtr::send() to send ur XML content to the server. IXMLHTTPRequestPtr::responseText; to get the response from server. Some body has already posted the whole code for this at the XML/XSL forum. See the reply of pix_programmer.Link below: http://www.codeproject.com/Messages/427887/Failed-to-CreateInstance-while-using-IXMLHttpReque.aspx[^]

        L 1 Reply Last reply
        0
        • T T RATHA KRISHNAN

          Hi! It depends on how you want to send the info to your server(whether it's in XML format or some other format). If it's XML use IXMLHTTPRequestPtr::open() to connect with the server and IXMLHTTPRequestPtr::send() to send ur XML content to the server. IXMLHTTPRequestPtr::responseText; to get the response from server. Some body has already posted the whole code for this at the XML/XSL forum. See the reply of pix_programmer.Link below: http://www.codeproject.com/Messages/427887/Failed-to-CreateInstance-while-using-IXMLHttpReque.aspx[^]

          L Offline
          L Offline
          Le rner
          wrote on last edited by
          #4

          can i use POST method for this operation and function?

          T 1 Reply Last reply
          0
          • L Le rner

            can i use POST method for this operation and function?

            T Offline
            T Offline
            T RATHA KRISHNAN
            wrote on last edited by
            #5

            Le@rner wrote:

            can i use POST method for this operation and function?

            I didn't fully understand your question. You can call open() function with "POST" as first parameter and the url or IP address of ur server as second parameter. Please go through the link I've given. It contains code that can be used as such if you are working with a VC++/MFC or a Win32 project.

            1 Reply Last reply
            0
            • L Le rner

              Hi all, i want to send info to my server and on server side server processed on received information and get back some result on my side i receive the result and display a message what is returned by server. so please tell me how can i do this processing? what function or methods are use for this. please help me for this and provide info and guidance for this. thanks in advance.

              A Offline
              A Offline
              Albert Holguin
              wrote on last edited by
              #6

              I would almost venture to say raw sockets over your own API is the best method for a learner... everything else, including HTML/XML/Web Services is based on the socket foundation. So understanding sockets can be a great foundation.

              1 Reply Last reply
              0
              • L Le rner

                Hi all, i want to send info to my server and on server side server processed on received information and get back some result on my side i receive the result and display a message what is returned by server. so please tell me how can i do this processing? what function or methods are use for this. please help me for this and provide info and guidance for this. thanks in advance.

                D Offline
                D Offline
                David W Young
                wrote on last edited by
                #7

                Either use MFC wrapper classes or Windows API (try sockets, unless you want to write a totally custom driver). Use the Linux API sets for programs that you want to run on Linux. Alternatively you could use a third party networking solution (library), but I recommend coding a front end networking class that will load up different definition files based on the values of a set of macros (ex. #define OS WINDOWS). If your object oriented skills are up to par, then it should be no problem to write it once and port it to future programs, occasionally modifying the definitions based on the API updates/changes for each respective operating system you want to support.

                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