mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
We can't use RtlCreateUnicodeStringFromAsciiz for WM_SETTEXT as the
resulting unicode string may be greater than 0xffff bytes.
This commit is contained in:
parent
83d92d3e0f
commit
b367a6e628
1 changed files with 7 additions and 7 deletions
|
@ -594,13 +594,13 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
|
||||||
case LB_DIR:
|
case LB_DIR:
|
||||||
case LB_ADDFILE:
|
case LB_ADDFILE:
|
||||||
case EM_REPLACESEL:
|
case EM_REPLACESEL:
|
||||||
{
|
{
|
||||||
UNICODE_STRING usBuffer;
|
DWORD len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*plparam, -1, NULL, 0);
|
||||||
if(!*plparam) return 0;
|
WCHAR *buf = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||||
RtlCreateUnicodeStringFromAsciiz(&usBuffer,(LPCSTR)*plparam);
|
len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*plparam, -1, buf, len);
|
||||||
*plparam = (LPARAM)usBuffer.Buffer;
|
*plparam = (LPARAM)buf;
|
||||||
return (*plparam ? 1 : -1);
|
return (*plparam ? 1 : -1);
|
||||||
}
|
}
|
||||||
case WM_GETTEXTLENGTH:
|
case WM_GETTEXTLENGTH:
|
||||||
case CB_GETLBTEXTLEN:
|
case CB_GETLBTEXTLEN:
|
||||||
case LB_GETTEXTLEN:
|
case LB_GETTEXTLEN:
|
||||||
|
|
Loading…
Reference in a new issue