Results 1 to 4 of 4

Thread: CopyMemory - Reading from another Application

  1. #1
    Guest
    Hi, I have a need to read the text from another application, and as it turns out, WM_GETTEXT doesn't work!! I need to perform some CopyMemory functions and physically locate the text in the memory but I don't fully understand those API calls. Any ideas?

    -Jordan

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    WM_GETTEXT works for me.
    Code:
    Dim tlen As Long, text As String
    tlen = SendMessage(hWndofthewindowwhichtextyouwant, WM_GETTEXTLENGTH, 0, 0)
    tlen = tlen + 1
    text = Space(tlen)
    SendMessage hWndofthewindowwhichtextyouwant, WM_GETTEXT, tlen, ByVal text
    The text is stored in the text variable.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    Guest
    I know that this works for your average window, but I'm not dealing with an average window. I need some info on getting the cross-process text via CopyMemory because this appears to be the only way to get the text of this window.

    I've read that I first need to create a buffer in the external app and copy the text to that, and then get it from that memory pointer.

    -Jordan

  4. #4
    Guest
    Any Ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width