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. Send data to a service

Send data to a service

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 Posts 4 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.
  • N Offline
    N Offline
    nitin3
    wrote on last edited by
    #1

    i have project which contains a service application and window based application, When the window receive a message i need to pass some information regarding message ( a structure ) to the service. How to do that ? Thanks

    M R 2 Replies Last reply
    0
    • N nitin3

      i have project which contains a service application and window based application, When the window receive a message i need to pass some information regarding message ( a structure ) to the service. How to do that ? Thanks

      M Offline
      M Offline
      Matthew Faithfull
      wrote on last edited by
      #2

      I once did that using COM connection points, it was hard but very fast. A Windows Sockets loopback would probably have been easier, any form of IPC (InterProcess Communication) would do the trick but stay away from DDE (Devilish Data Exchange). Some people get on with memory mapped files and other don't. Rumours of COM runtime shared memory implementations persist despite the horror of such a thing and there are all sorts of off the shelf bits of middle ware and messaging frameworks gathering dust and waiting for someone to turn them into applications. :)

      Nothing is exactly what it seems but everything with seems can be unpicked.

      1 Reply Last reply
      0
      • N nitin3

        i have project which contains a service application and window based application, When the window receive a message i need to pass some information regarding message ( a structure ) to the service. How to do that ? Thanks

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

        have a look at ControlService() API and make of user-defined control code. if not suitable, i think IPC is the option as mathew already said.

        M 1 Reply Last reply
        0
        • R Rajkumar R

          have a look at ControlService() API and make of user-defined control code. if not suitable, i think IPC is the option as mathew already said.

          M Offline
          M Offline
          Maxwell Chen
          wrote on last edited by
          #4

          Rajkumar R wrote:

          have a look at ControlService() API and make of user-defined control code.

          It looks like that ControlService can only send code but can not take additional data with the code?! (Something like wParam and lParam stuff)

          Maxwell Chen

          R 1 Reply Last reply
          0
          • M Maxwell Chen

            Rajkumar R wrote:

            have a look at ControlService() API and make of user-defined control code.

            It looks like that ControlService can only send code but can not take additional data with the code?! (Something like wParam and lParam stuff)

            Maxwell Chen

            R Offline
            R Offline
            Rajkumar R
            wrote on last edited by
            #5

            Maxwell Chen wrote:

            It looks like that ControlService can only send code

            yes.

            Maxwell Chen wrote:

            but can not take additional data with the code?! (Something like wParam and lParam stuff)

            he doesnot want to pass the Window message as it

            nitin3 wrote:

            When the window receive a message i need to pass some information regarding message ( a structure ) to the service.

            he want to pass some info regarding the message. if he can do it as unique code, much of work to implement IPC is avoided. otherwise IPC, that already i meantioned in my reply.

            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