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#
  4. [SOS] about API

[SOS] about API

Scheduled Pinned Locked Moved C#
csharpcomjsonhelp
4 Posts 2 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.
  • C Offline
    C Offline
    cnet2008
    wrote on last edited by
    #1

    :doh:I'm using THE api(SendMessage or PostMessage) to send a custom message between 2 C# exe's. The called exe is subclassed to listen to the custom message. In the calling exe, I'm trying to pass a string in the 4th parameter. At this stage the 2nd exe is already running. The api call keeps crashing the 2nd exe. Can it be done across exe's or only within the same exe, thanks. help me ,please thanks contract me :enet2008@hotmail.com you are welcome to visit my blog

    C 1 Reply Last reply
    0
    • C cnet2008

      :doh:I'm using THE api(SendMessage or PostMessage) to send a custom message between 2 C# exe's. The called exe is subclassed to listen to the custom message. In the calling exe, I'm trying to pass a string in the 4th parameter. At this stage the 2nd exe is already running. The api call keeps crashing the 2nd exe. Can it be done across exe's or only within the same exe, thanks. help me ,please thanks contract me :enet2008@hotmail.com you are welcome to visit my blog

      C Offline
      C Offline
      cnet2008
      wrote on last edited by
      #2

      Using SendMessage API to control external app: have an external application that I need to be able to control. I've tried using SendKeys but due to the obvious limitations of this function the behavior is erratic. I know you can do this using the SendMessage API ( find the handle of the external application's window ,first ) ,but I'm not sure how to do it. can you provide the sameple code to me ,please? you are welcome to visit my blog

      D 1 Reply Last reply
      0
      • C cnet2008

        Using SendMessage API to control external app: have an external application that I need to be able to control. I've tried using SendKeys but due to the obvious limitations of this function the behavior is erratic. I know you can do this using the SendMessage API ( find the handle of the external application's window ,first ) ,but I'm not sure how to do it. can you provide the sameple code to me ,please? you are welcome to visit my blog

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        You'd be much better off using Remoting. You can't send a String in a message like this, only a pointer to where in memory it is. The problem is the memory from one application is not accessible to another without jumping through flaming hoops. But, here[^] is a thread that seems to have had some success at it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        C 1 Reply Last reply
        0
        • D Dave Kreskowiak

          You'd be much better off using Remoting. You can't send a String in a message like this, only a pointer to where in memory it is. The problem is the memory from one application is not accessible to another without jumping through flaming hoops. But, here[^] is a thread that seems to have had some success at it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          C Offline
          C Offline
          cnet2008
          wrote on last edited by
          #4

          I can do it now I can use FindWindow,GetWindow and SendMessage to send message to a notepad app,just like this: hWnd1 = FindWindow(null, "Untitled - Notepad"); hWnd2 = GetWindow(hWnd1, GW_CHILD); sText =this.textBox1.Text; SendMessage (hWnd2, WM_SETTEXT,sText.Length, sText); but I don't know how to excute a word app's dictate by another app,help me please ,thank you! you are welcome to visit my blog

          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