PDA

Click to See Complete Forum and Search --> : A api conundrum worthy of you...


Lord Orwell
Mar 6th, 2001, 06:23 AM
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

crispin
Mar 6th, 2001, 09:34 AM
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....

Lord Orwell
Mar 6th, 2001, 04:30 PM
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.

Lord Orwell
Mar 6th, 2001, 11:02 PM
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?