Commit d26ad6db authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/clipboard: Use wide string constants.

parent 2693e666
...@@ -1743,35 +1743,19 @@ static snapshot *snapshot_construct(DWORD seq_no) ...@@ -1743,35 +1743,19 @@ static snapshot *snapshot_construct(DWORD seq_no)
*/ */
static void register_clipboard_formats(void) static void register_clipboard_formats(void)
{ {
static const WCHAR OwnerLink[] = {'O','w','n','e','r','L','i','n','k',0}; ownerlink_clipboard_format = RegisterClipboardFormatW(L"OwnerLink");
static const WCHAR FileName[] = {'F','i','l','e','N','a','m','e',0}; filename_clipboard_format = RegisterClipboardFormatW(L"FileName");
static const WCHAR FileNameW[] = {'F','i','l','e','N','a','m','e','W',0}; filenameW_clipboard_format = RegisterClipboardFormatW(L"FileNameW");
static const WCHAR DataObject[] = {'D','a','t','a','O','b','j','e','c','t',0}; dataobject_clipboard_format = RegisterClipboardFormatW(L"DataObject");
static const WCHAR EmbeddedObject[] = {'E','m','b','e','d','d','e','d',' ','O','b','j','e','c','t',0}; embedded_object_clipboard_format = RegisterClipboardFormatW(L"Embedded Object");
static const WCHAR EmbedSource[] = {'E','m','b','e','d',' ','S','o','u','r','c','e',0}; embed_source_clipboard_format = RegisterClipboardFormatW(L"Embed Source");
static const WCHAR CustomLinkSource[] = {'C','u','s','t','o','m',' ','L','i','n','k',' ','S','o','u','r','c','e',0}; custom_link_source_clipboard_format = RegisterClipboardFormatW(L"Custom Link Source");
static const WCHAR LinkSource[] = {'L','i','n','k',' ','S','o','u','r','c','e',0}; link_source_clipboard_format = RegisterClipboardFormatW(L"Link Source");
static const WCHAR ObjectDescriptor[] = {'O','b','j','e','c','t',' ','D','e','s','c','r','i','p','t','o','r',0}; object_descriptor_clipboard_format = RegisterClipboardFormatW(L"Object Descriptor");
static const WCHAR LinkSourceDescriptor[] = {'L','i','n','k',' ','S','o','u','r','c','e',' ', link_source_descriptor_clipboard_format = RegisterClipboardFormatW(L"Link Source Descriptor");
'D','e','s','c','r','i','p','t','o','r',0}; ole_private_data_clipboard_format = RegisterClipboardFormatW(L"Ole Private Data");
static const WCHAR OlePrivateData[] = {'O','l','e',' ','P','r','i','v','a','t','e',' ','D','a','t','a',0};
wine_marshal_clipboard_format = RegisterClipboardFormatW(L"Wine Marshalled DataObject");
static const WCHAR WineMarshalledDataObject[] = {'W','i','n','e',' ','M','a','r','s','h','a','l','l','e','d',' ',
'D','a','t','a','O','b','j','e','c','t',0};
ownerlink_clipboard_format = RegisterClipboardFormatW(OwnerLink);
filename_clipboard_format = RegisterClipboardFormatW(FileName);
filenameW_clipboard_format = RegisterClipboardFormatW(FileNameW);
dataobject_clipboard_format = RegisterClipboardFormatW(DataObject);
embedded_object_clipboard_format = RegisterClipboardFormatW(EmbeddedObject);
embed_source_clipboard_format = RegisterClipboardFormatW(EmbedSource);
custom_link_source_clipboard_format = RegisterClipboardFormatW(CustomLinkSource);
link_source_clipboard_format = RegisterClipboardFormatW(LinkSource);
object_descriptor_clipboard_format = RegisterClipboardFormatW(ObjectDescriptor);
link_source_descriptor_clipboard_format = RegisterClipboardFormatW(LinkSourceDescriptor);
ole_private_data_clipboard_format = RegisterClipboardFormatW(OlePrivateData);
wine_marshal_clipboard_format = RegisterClipboardFormatW(WineMarshalledDataObject);
} }
/*********************************************************************** /***********************************************************************
...@@ -2026,9 +2010,6 @@ void OLEClipbrd_UnInitialize(void) ...@@ -2026,9 +2010,6 @@ void OLEClipbrd_UnInitialize(void)
if ( clipbrd ) if ( clipbrd )
{ {
static const WCHAR ole32W[] = {'o','l','e','3','2',0};
HINSTANCE hinst = GetModuleHandleW(ole32W);
/* OleUninitialize() does not release the reference to the dataobject, so /* OleUninitialize() does not release the reference to the dataobject, so
take an additional reference here. This reference is then leaked. */ take an additional reference here. This reference is then leaked. */
if (clipbrd->src_data) if (clipbrd->src_data)
...@@ -2040,7 +2021,7 @@ void OLEClipbrd_UnInitialize(void) ...@@ -2040,7 +2021,7 @@ void OLEClipbrd_UnInitialize(void)
if ( clipbrd->window ) if ( clipbrd->window )
{ {
DestroyWindow(clipbrd->window); DestroyWindow(clipbrd->window);
UnregisterClassW( clipbrd_wndclass, hinst ); UnregisterClassW( clipbrd_wndclass, GetModuleHandleW(L"ole32") );
} }
IStream_Release(clipbrd->marshal_data); IStream_Release(clipbrd->marshal_data);
...@@ -2115,9 +2096,7 @@ static LRESULT CALLBACK clipbrd_wndproc(HWND hwnd, UINT message, WPARAM wparam, ...@@ -2115,9 +2096,7 @@ static LRESULT CALLBACK clipbrd_wndproc(HWND hwnd, UINT message, WPARAM wparam,
static HWND create_clipbrd_window(void) static HWND create_clipbrd_window(void)
{ {
WNDCLASSEXW class; WNDCLASSEXW class;
static const WCHAR ole32W[] = {'o','l','e','3','2',0}; HINSTANCE hinst = GetModuleHandleW(L"ole32");
static const WCHAR title[] = {'C','l','i','p','b','o','a','r','d','W','i','n','d','o','w',0};
HINSTANCE hinst = GetModuleHandleW(ole32W);
class.cbSize = sizeof(class); class.cbSize = sizeof(class);
class.style = 0; class.style = 0;
...@@ -2134,7 +2113,7 @@ static HWND create_clipbrd_window(void) ...@@ -2134,7 +2113,7 @@ static HWND create_clipbrd_window(void)
RegisterClassExW(&class); RegisterClassExW(&class);
return CreateWindowW(clipbrd_wndclass, title, WS_POPUP | WS_CLIPSIBLINGS | WS_OVERLAPPED, return CreateWindowW(clipbrd_wndclass, L"ClipboardWindow", WS_POPUP | WS_CLIPSIBLINGS | WS_OVERLAPPED,
0, 0, 0, 0, HWND_MESSAGE, NULL, hinst, 0); 0, 0, 0, 0, HWND_MESSAGE, NULL, hinst, 0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment