mirror of
https://github.com/reactos/reactos.git
synced 2024-08-08 04:08:29 +00:00
[SHELL32]
* Partial sync of clipboard.c with Wine 1.7.27. CORE-8540 svn path=/branches/shell-experiments/; revision=65293
This commit is contained in:
parent
4a6b43ac42
commit
98ab989c82
|
@ -42,6 +42,7 @@
|
||||||
#include <winbase.h>
|
#include <winbase.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <wine/debug.h>
|
#include <wine/debug.h>
|
||||||
|
#include <wine/unicode.h>
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||||
|
|
||||||
|
@ -90,6 +91,7 @@ HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
|
||||||
|
|
||||||
for (i=0; i<cidl;i++)
|
for (i=0; i<cidl;i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
SHGetPathFromIDListW(pidls[i], wszFileName);
|
SHGetPathFromIDListW(pidls[i], wszFileName);
|
||||||
wcscpy(((WCHAR*)pDropFiles)+offset, wszFileName);
|
wcscpy(((WCHAR*)pDropFiles)+offset, wszFileName);
|
||||||
offset += wcslen(wszFileName) + 1;
|
offset += wcslen(wszFileName) + 1;
|
||||||
|
@ -126,7 +128,7 @@ HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cid
|
||||||
/* fill the structure */
|
/* fill the structure */
|
||||||
hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size);
|
hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size);
|
||||||
if(!hGlobal) return hGlobal;
|
if(!hGlobal) return hGlobal;
|
||||||
pcida = (LPIDA)GlobalLock (hGlobal);
|
pcida = GlobalLock (hGlobal);
|
||||||
pcida->cidl = cidl;
|
pcida->cidl = cidl;
|
||||||
|
|
||||||
/* root pidl */
|
/* root pidl */
|
||||||
|
@ -191,7 +193,7 @@ HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
|
||||||
/* fill the structure */
|
/* fill the structure */
|
||||||
hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size);
|
hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size);
|
||||||
if(!hGlobal) return hGlobal;
|
if(!hGlobal) return hGlobal;
|
||||||
szFileName = (char *)GlobalLock(hGlobal);
|
szFileName = GlobalLock(hGlobal);
|
||||||
memcpy(szFileName, szTemp, size);
|
memcpy(szFileName, szTemp, size);
|
||||||
GlobalUnlock(hGlobal);
|
GlobalUnlock(hGlobal);
|
||||||
|
|
||||||
|
@ -218,12 +220,12 @@ HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
|
||||||
if (!bSuccess)
|
if (!bSuccess)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
size = (wcslen(szTemp)+1) * sizeof(WCHAR);
|
size = (strlenW(szTemp)+1) * sizeof(WCHAR);
|
||||||
|
|
||||||
/* fill the structure */
|
/* fill the structure */
|
||||||
hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size);
|
hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size);
|
||||||
if(!hGlobal) return hGlobal;
|
if(!hGlobal) return hGlobal;
|
||||||
szFileName = (WCHAR *)GlobalLock(hGlobal);
|
szFileName = GlobalLock(hGlobal);
|
||||||
memcpy(szFileName, szTemp, size);
|
memcpy(szFileName, szTemp, size);
|
||||||
GlobalUnlock(hGlobal);
|
GlobalUnlock(hGlobal);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue