shell32: Pass number of wide chars, not bytes as last argument to MBtoWC().

This commit is contained in:
Marcus Meissner 2006-11-21 20:29:06 +01:00 committed by Alexandre Julliard
parent 06dd3efe2f
commit 267e660bd6
1 changed files with 3 additions and 3 deletions

View File

@ -54,18 +54,18 @@ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid)
nidW.hIcon = pnid->hIcon; nidW.hIcon = pnid->hIcon;
/* szTip */ /* szTip */
MultiByteToWideChar(CP_ACP, 0, pnid->szTip, sizeof(pnid->szTip), nidW.szTip, sizeof(nidW.szTip)); MultiByteToWideChar(CP_ACP, 0, pnid->szTip, -1, nidW.szTip, sizeof(nidW.szTip)/sizeof(WCHAR));
nidW.dwState = pnid->dwState; nidW.dwState = pnid->dwState;
nidW.dwStateMask = pnid->dwStateMask; nidW.dwStateMask = pnid->dwStateMask;
/* szInfo */ /* szInfo */
MultiByteToWideChar(CP_ACP, 0, pnid->szInfo, sizeof(pnid->szInfo), nidW.szInfo, sizeof(nidW.szInfo)); MultiByteToWideChar(CP_ACP, 0, pnid->szInfo, -1, nidW.szInfo, sizeof(nidW.szInfo)/sizeof(WCHAR));
nidW.u.uTimeout = pnid->u.uTimeout; nidW.u.uTimeout = pnid->u.uTimeout;
/* szInfoTitle */ /* szInfoTitle */
MultiByteToWideChar(CP_ACP, 0, pnid->szInfoTitle, sizeof(pnid->szInfoTitle), nidW.szInfoTitle, sizeof(nidW.szInfoTitle)); MultiByteToWideChar(CP_ACP, 0, pnid->szInfoTitle, -1, nidW.szInfoTitle, sizeof(nidW.szInfoTitle)/sizeof(WCHAR));
nidW.dwInfoFlags = pnid->dwInfoFlags; nidW.dwInfoFlags = pnid->dwInfoFlags;