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. concerning PostMessage.....

concerning PostMessage.....

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 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
    namaskaaram
    wrote on last edited by
    #1

    hello everyone!..... i am facing a prob!.....:confused::confused::confused::confused::confused: i want to sent a CString (in the WPARAM) by SendMessage() to an another running application..... i am able to send the message to the other application,but when i try to get back the CString from the WPARAM i am getting a junk value! why is that so?.....is it becoz the pointer address that i am sending to the other application cannot access it?.....is there anyway where by which i can send the CString and get it on the other application?:confused: thanx for ur time!;) cheerz..... "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

    M R 2 Replies Last reply
    0
    • N namaskaaram

      hello everyone!..... i am facing a prob!.....:confused::confused::confused::confused::confused: i want to sent a CString (in the WPARAM) by SendMessage() to an another running application..... i am able to send the message to the other application,but when i try to get back the CString from the WPARAM i am getting a junk value! why is that so?.....is it becoz the pointer address that i am sending to the other application cannot access it?.....is there anyway where by which i can send the CString and get it on the other application?:confused: thanx for ur time!;) cheerz..... "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

      M Offline
      M Offline
      MailtoGops
      wrote on last edited by
      #2

      You May need to use PIPE, MailSlot, Socket, DDE for interprocess communications.. Try this also. 1. Create a Private clipboard and place the message 2. Send a message to the another application 3. In the another app, Read the data from the clipboard and clear the clipboard Might have problem!!! in compatiblity or security reason.. " Action without vision is only passing time, Vision without action is merely day dreaming, But vision with action can change the world " - Words from Nelson Mandela Thanks & Regards, Gopalakrishnan

      1 Reply Last reply
      0
      • N namaskaaram

        hello everyone!..... i am facing a prob!.....:confused::confused::confused::confused::confused: i want to sent a CString (in the WPARAM) by SendMessage() to an another running application..... i am able to send the message to the other application,but when i try to get back the CString from the WPARAM i am getting a junk value! why is that so?.....is it becoz the pointer address that i am sending to the other application cannot access it?.....is there anyway where by which i can send the CString and get it on the other application?:confused: thanx for ur time!;) cheerz..... "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

        R Offline
        R Offline
        Ravi Bhavnani
        wrote on last edited by
        #3

        See WM_COPYDATA. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

        N 1 Reply Last reply
        0
        • R Ravi Bhavnani

          See WM_COPYDATA. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

          N Offline
          N Offline
          namaskaaram
          wrote on last edited by
          #4

          thanx all for the replies!..... but still i cant seem to get it right!..... by the way sir!.....i have my own user defined message,i would like to send the CString data in the WPARAM!.....do u seem to have an idea? is it becoz i am sending this to an another executable taht i am getting junk values? "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

          R T 2 Replies Last reply
          0
          • N namaskaaram

            thanx all for the replies!..... but still i cant seem to get it right!..... by the way sir!.....i have my own user defined message,i would like to send the CString data in the WPARAM!.....do u seem to have an idea? is it becoz i am sending this to an another executable taht i am getting junk values? "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

            R Offline
            R Offline
            Ravi Bhavnani
            wrote on last edited by
            #5

            As I mentioned in my earlier reply, you may want to take a look at the WM_COPYDATA[^] message. It seems like it will meet your needs. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

            1 Reply Last reply
            0
            • N namaskaaram

              thanx all for the replies!..... but still i cant seem to get it right!..... by the way sir!.....i have my own user defined message,i would like to send the CString data in the WPARAM!.....do u seem to have an idea? is it becoz i am sending this to an another executable taht i am getting junk values? "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              rateep wrote: .i have my own user defined message,i would like to send the CString data in the WPARAM!.....do u seem to have an idea? You can't send the CString data through PostMessage/SendMessage to some other application.. because CString Memory/Data is local to that application. Now Better way TO SEND String data across the process boundry would be WM_COPYDATA as told by Mr. Ravi..., now you still insist to send data string data using Message you have to allocate global memory for same send the address through message api..

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta VC Forum Q&A :- I/ IV

              N 1 Reply Last reply
              0
              • T ThatsAlok

                rateep wrote: .i have my own user defined message,i would like to send the CString data in the WPARAM!.....do u seem to have an idea? You can't send the CString data through PostMessage/SendMessage to some other application.. because CString Memory/Data is local to that application. Now Better way TO SEND String data across the process boundry would be WM_COPYDATA as told by Mr. Ravi..., now you still insist to send data string data using Message you have to allocate global memory for same send the address through message api..

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                cheers, Alok Gupta VC Forum Q&A :- I/ IV

                N Offline
                N Offline
                namaskaaram
                wrote on last edited by
                #7

                tahnk u all!!!!:-D cheerz!:-D "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

                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