Merge branch 'mr/roshade-hack' into 'master'

ole32: Disable other-process support in RevokeDragDrop().

See merge request wine/wine!4511
This commit is contained in:
Aida Jonikienė 2024-11-19 04:15:37 +00:00
commit 7c838733d4

View file

@ -618,6 +618,7 @@ HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
*/
HRESULT WINAPI RevokeDragDrop(HWND hwnd)
{
DWORD pid = 0;
HANDLE map;
IStream *stream;
IDropTarget *drop_target;
@ -631,6 +632,14 @@ HRESULT WINAPI RevokeDragDrop(HWND hwnd)
return DRAGDROP_E_INVALIDHWND;
}
/* block revoke for other processes windows */
GetWindowThreadProcessId(hwnd, &pid);
if (pid != GetCurrentProcessId())
{
FIXME("revoke for another process windows is disabled\n");
return DRAGDROP_E_INVALIDHWND;
}
/* no registration data */
if (!(map = get_droptarget_handle(hwnd)))
return DRAGDROP_E_NOTREGISTERED;