Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d26ad6db
Commit
d26ad6db
authored
Sep 17, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/clipboard: Use wide string constants.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2693e666
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
37 deletions
+16
-37
clipboard.c
dlls/ole32/clipboard.c
+16
-37
No files found.
dlls/ole32/clipboard.c
View file @
d26ad6db
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment