mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:55:41 +00:00
[User32] Fix Clipboard Meta Test Results
Fix meta data handle returns.
This commit is contained in:
parent
da264743e1
commit
73558e94df
1 changed files with 7 additions and 5 deletions
|
@ -303,7 +303,7 @@ SetClipboardData(UINT uFormat, HANDLE hMem)
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
HANDLE hGlobal;
|
HANDLE hGlobal;
|
||||||
LPVOID pMem;
|
LPVOID pMem;
|
||||||
HANDLE hRet = NULL;
|
HANDLE hRet = NULL, hTemp;
|
||||||
SETCLIPBDATA scd = {FALSE, FALSE};
|
SETCLIPBDATA scd = {FALSE, FALSE};
|
||||||
|
|
||||||
/* Check if this is a delayed rendering */
|
/* Check if this is a delayed rendering */
|
||||||
|
@ -318,13 +318,15 @@ SetClipboardData(UINT uFormat, HANDLE hMem)
|
||||||
/* Meta files are probably checked for validity */
|
/* Meta files are probably checked for validity */
|
||||||
else if (uFormat == CF_DSPMETAFILEPICT || uFormat == CF_METAFILEPICT )
|
else if (uFormat == CF_DSPMETAFILEPICT || uFormat == CF_METAFILEPICT )
|
||||||
{
|
{
|
||||||
hMem = GdiConvertMetaFilePict( hMem );
|
hTemp = GdiConvertMetaFilePict( hMem );
|
||||||
hRet = NtUserSetClipboardData(uFormat, hMem, &scd);
|
hRet = NtUserSetClipboardData(uFormat, hTemp, &scd); // Note : LOL, it returns a BOOL not a HANDLE!!!!
|
||||||
|
if (hRet == hTemp) hRet = hMem; // If successful "TRUE", return the original handle.
|
||||||
}
|
}
|
||||||
else if (uFormat == CF_DSPENHMETAFILE || uFormat == CF_ENHMETAFILE)
|
else if (uFormat == CF_DSPENHMETAFILE || uFormat == CF_ENHMETAFILE)
|
||||||
{
|
{
|
||||||
hMem = GdiConvertEnhMetaFile( hMem );
|
hTemp = GdiConvertEnhMetaFile( hMem );
|
||||||
hRet = NtUserSetClipboardData(uFormat, hMem, &scd);
|
hRet = NtUserSetClipboardData(uFormat, hTemp, &scd);
|
||||||
|
if (hRet == hTemp) hRet = hMem;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue