Results 1 to 4 of 4

Thread: A api conundrum worthy of you...

  1. #1

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    Can anyone post or link to a demonstration of the EM_GETHANDLE and EM_SETHANDLE? I am trying to read the memory address of a text box's buffer, and can't seem to do it. I am aware that sethandle is supposed to use wparam to pass the memory handle.

    This is the code i used:
    MsgBox SendMessage(rtHwnd, EM_GETHANDLE, wp, lp)
    Debug.Print wp; lp
    where rthwnd is text1.hwnd.
    the debug.print returns two zeros.
    the msgbox shows a zero, indicating failure.
    i have the declaration of em_gethandle like this:
    Const EM_GETHANDLE = &HBD
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  2. #2
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    EM_GETHANDLE and EM_SETHANDLE apply only to MULTILINE edit controls.......

    Set the property of your textbox to multiline and try it again - watch the results - v. annoying. The question for you now I guess is can you poke an AOL edit control with a multiline property so you can get the text out of its buffer, I dont know, but I wish you luck....
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  3. #3

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    heh i already tried it on aol edit control The problem is that win32 isolates individual program's memory in such a way that it is (as far as i have been able to tell so far) impossible to read data from it.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #4

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    Ok, i am able to read the memory handle of a standard edit box when i set it to multi-line, but it doesn't work on richtextbox when i set it to multiline. Any solution?
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

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