Author: gadamopoulos
Date: Tue Aug 22 08:02:30 2017
New Revision: 75637
URL:
http://svn.reactos.org/svn/reactos?rev=75637&view=rev
Log:
[OLE32] -Recreate the clipboard window if it isn't a valid window handle. Can happen
if the thread that first used the ole clipboard exists which also leads to the clipboard
window being destroyed.
Modified:
trunk/reactos/dll/win32/ole32/clipboard.c
Modified: trunk/reactos/dll/win32/ole32/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/clipboard.…
==============================================================================
--- trunk/reactos/dll/win32/ole32/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/clipboard.c [iso-8859-1] Tue Aug 22 08:02:30 2017
@@ -1869,6 +1869,12 @@
*/
static inline HRESULT get_clipbrd_window(ole_clipbrd *clipbrd, HWND *wnd)
{
+#ifdef __REACTOS__
+ /* The clipboard window can get destroyed if the thread that created it dies so we
may need to create it again */
+ if (!IsWindow(clipbrd->window))
+ clipbrd->window = create_clipbrd_window();
+#endif
+
if ( !clipbrd->window )
clipbrd->window = create_clipbrd_window();