[PATCH] user32: Move a comment about HLOCAL16 to user.exe

Detlef Riekenberg wine.dev at web.de
Tue Jan 5 07:12:03 CST 2010


---
=C2=A0dlls/user.exe16/message.c |=C2=A0=C2=A0 11 +++++++++++
=C2=A0dlls/user32/edit.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=
=C2=A0 14 +-------------
=C2=A02 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c
index 011e5c4..1ff58a7 100644
--- a/dlls/user.exe16/message.c
+++ b/dlls/user.exe16/message.c
@@ -2094,6 +2094,17 @@ static LRESULT combo_proc16( HWND hwnd, UINT msg, WP=
ARAM wParam, LPARAM lParam,
=C2=A0=C2=A0=C2=A0=C2=A0 return wow_handlers32.combo_proc( hwnd, msg, wPara=
m, lParam, FALSE );
=C2=A0}
=C2=A0
+/*********************************************************************
+ * edit_lock_buffer (internal)
+ *
+ * A 16 bit application might send an EM_GETHANDLE message and expect a HL=
OCAL16
+ * (16 bit SEG:OFF handler). From that moment on we have to keep using thi=
s
+ * 16 bit memory handler, because it is supposed to be valid at all times =
after
+ * EM_GETHANDLE.
+ * We create a HLOCAL16 buffer in edit_get_handle and copy the text from t=
he
+ * HLOCAL buffer, when needed
+ *
+ */
=C2=A0
=C2=A0#define GWW_HANDLE16 sizeof(void*)
=C2=A0
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index d7ab5b4..20a853e 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -1088,19 +1088,7 @@ static inline void text_buffer_changed(EDITSTATE *es=
)
=C2=A0}
=C2=A0
=C2=A0/********************************************************************=
*
- *
- *=C2=A0=C2=A0 =C2=A0EDIT_LockBuffer
- *
- *=C2=A0=C2=A0 =C2=A0This acts as a LocalLock16(), but it locks only once.=
=C2=A0 This way
- *=C2=A0=C2=A0 =C2=A0you can call it whenever you like, without unlocking.
- *
- *=C2=A0=C2=A0 =C2=A0Initially the edit control allocates a HLOCAL32 buffe=
r
- *=C2=A0=C2=A0 =C2=A0(32 bit linear memory handler).=C2=A0 However, 16 bit=
 application
- *=C2=A0=C2=A0 =C2=A0might send an EM_GETHANDLE message and expect a HLOCA=
L16 (16 bit SEG:OFF
- *=C2=A0=C2=A0 =C2=A0handler).=C2=A0 From that moment on we have to keep u=
sing this 16 bit memory
- *=C2=A0=C2=A0 =C2=A0handler, because it is supposed to be valid at all ti=
mes after EM_GETHANDLE.
- *=C2=A0=C2=A0 =C2=A0What we do is create a HLOCAL16 buffer, copy the text=
, and do pointer
- *=C2=A0=C2=A0 =C2=A0conversion.
+ * EDIT_LockBuffer
=C2=A0 *
=C2=A0 */
=C2=A0static void EDIT_LockBuffer(EDITSTATE *es)
--
1.6.5
___________________________________________________________
Preisknaller: WEB.DE DSL Flatrate f=C3=BCr nur 16,99 Euro/mtl.!=20
http://produkte.web.de/go/02/



More information about the wine-patches mailing list