diff --git a/dlls/shell32/clipboard.c b/dlls/shell32/clipboard.c index 6972caf208b..7e8c920b8fb 100644 --- a/dlls/shell32/clipboard.c +++ b/dlls/shell32/clipboard.c @@ -60,9 +60,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) { UINT i; - int rootsize = 0,size = 0; - char szRootPath[MAX_PATH]; - char szFileName[MAX_PATH]; + int rootlen = 0,size = 0; + WCHAR wszRootPath[MAX_PATH]; + WCHAR wszFileName[MAX_PATH]; HGLOBAL hGlobal; DROPFILES *pDropFiles; int offset; @@ -72,39 +72,38 @@ HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) /* get the size needed */ size = sizeof(DROPFILES); - SHGetPathFromIDListA(pidlRoot, szRootPath); - PathAddBackslashA(szRootPath); - rootsize = strlen(szRootPath); + SHGetPathFromIDListW(pidlRoot, wszRootPath); + PathAddBackslashW(wszRootPath); + rootlen = strlenW(wszRootPath); for (i=0; ipFiles = sizeof(DROPFILES); - pDropFiles->fWide = FALSE; + offset = (sizeof(DROPFILES) + sizeof(WCHAR) - 1) / sizeof(WCHAR); + pDropFiles->pFiles = offset * sizeof(WCHAR); + pDropFiles->fWide = TRUE; - offset = pDropFiles->pFiles; - strcpy(szFileName, szRootPath); + strcpyW(wszFileName, wszRootPath); for (i=0; i