Huw Davies : ole32: Register DataObject clipboard format.
Alexandre Julliard
julliard at winehq.org
Mon Mar 23 12:34:56 CDT 2009
Module: wine
Branch: master
Commit: e77ab142e4914b53adb42d1b8b7fd463a6d2605a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e77ab142e4914b53adb42d1b8b7fd463a6d2605a
Author: Huw Davies <huw at codeweavers.com>
Date: Tue Mar 17 15:34:31 2009 +0000
ole32: Register DataObject clipboard format.
---
dlls/ole32/clipboard.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 8e997ec..8a7bdd2 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -150,6 +150,8 @@ static ole_clipbrd* theOleClipboard;
*/
static const CHAR OLEClipbrd_WNDCLASS[] = "CLIPBRDWNDCLASS";
+static UINT dataobject_clipboard_format;
+
/*
* If we need to store state info we can store it here.
* For now we don't need this functionality.
@@ -1175,15 +1177,22 @@ static ole_clipbrd* OLEClipbrd_Construct(void)
return This;
}
+static void register_clipboard_formats(void)
+{
+ static const WCHAR DataObjectW[] = { 'D','a','t','a','O','b','j','e','c','t',0 };
+
+ if(!dataobject_clipboard_format)
+ dataobject_clipboard_format = RegisterClipboardFormatW(DataObjectW);
+}
+
/***********************************************************************
* OLEClipbrd_Initialize()
* Initializes the OLE clipboard.
*/
void OLEClipbrd_Initialize(void)
{
- /*
- * Create the clipboard if necessary
- */
+ register_clipboard_formats();
+
if ( !theOleClipboard )
{
TRACE("()\n");
More information about the wine-cvs
mailing list