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
cc8adf7d
Commit
cc8adf7d
authored
Oct 05, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packager: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8bfdc84a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
14 deletions
+5
-14
packager_main.c
dlls/packager/packager_main.c
+3
-8
oleobj.c
dlls/packager/tests/oleobj.c
+2
-6
No files found.
dlls/packager/packager_main.c
View file @
cc8adf7d
...
...
@@ -181,8 +181,7 @@ static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwRese
static
HRESULT
do_activate_object
(
struct
Package
*
This
,
HWND
parent
)
{
static
const
WCHAR
openW
[]
=
{
'o'
,
'p'
,
'e'
,
'n'
,
0
};
ShellExecuteW
(
parent
,
openW
,
This
->
filename
,
NULL
,
NULL
,
SW_SHOW
);
ShellExecuteW
(
parent
,
L"open"
,
This
->
filename
,
NULL
,
NULL
,
SW_SHOW
);
return
S_OK
;
}
...
...
@@ -396,11 +395,9 @@ static HRESULT WINAPI PersistStorage_Load(IPersistStorage* iface,
WCHAR
*
stream_filename
;
WCHAR
*
base_end
,
extension
[
MAX_PATH
];
static
const
WCHAR
ole10nativeW
[]
=
{
0x0001
,
'O'
,
'l'
,
'e'
,
'1'
,
'0'
,
'N'
,
'a'
,
't'
,
'i'
,
'v'
,
'e'
,
0
};
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pStg
);
hr
=
IStorage_OpenStream
(
pStg
,
ole10nativeW
,
NULL
,
hr
=
IStorage_OpenStream
(
pStg
,
L"
\1
Ole10Native"
,
NULL
,
STGM_READ
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
stream
);
if
(
FAILED
(
hr
)){
TRACE
(
"OpenStream gave: %08x
\n
"
,
hr
);
...
...
@@ -489,8 +486,6 @@ static HRESULT WINAPI PersistStorage_Load(IPersistStorage* iface,
file
=
CreateFileW
(
This
->
filename
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
CREATE_NEW
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
while
(
file
==
INVALID_HANDLE_VALUE
){
static
const
WCHAR
fmtW
[]
=
{
' '
,
'('
,
'%'
,
'u'
,
')'
,
0
};
if
(
GetLastError
()
!=
ERROR_FILE_EXISTS
){
WARN
(
"CreateFile failed: %u
\n
"
,
GetLastError
());
hr
=
E_FAIL
;
...
...
@@ -499,7 +494,7 @@ static HRESULT WINAPI PersistStorage_Load(IPersistStorage* iface,
/* file exists, so increment file name and try again */
++
i
;
wsprintfW
(
base_end
,
fmtW
,
i
);
wsprintfW
(
base_end
,
L" (%u)"
,
i
);
lstrcatW
(
base_end
,
extension
);
file
=
CreateFileW
(
This
->
filename
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
...
...
dlls/packager/tests/oleobj.c
View file @
cc8adf7d
...
...
@@ -210,9 +210,7 @@ static HRESULT WINAPI stg_CreateStream(IStorage* This, LPCOLESTR pwcsName,
static
HRESULT
WINAPI
stg_OpenStream
(
IStorage
*
This
,
LPCOLESTR
pwcsName
,
void
*
reserved1
,
DWORD
grfMode
,
DWORD
reserved2
,
IStream
**
ppstm
)
{
static
const
WCHAR
ole10NativeW
[]
=
{
1
,
'O'
,
'l'
,
'e'
,
'1'
,
'0'
,
'N'
,
'a'
,
't'
,
'i'
,
'v'
,
'e'
,
0
};
if
(
lstrcmpW
(
pwcsName
,
ole10NativeW
))
if
(
lstrcmpW
(
pwcsName
,
L"
\1
Ole10Native"
))
return
STG_E_FILENOTFOUND
;
*
ppstm
=
&
ole10native_stream
;
...
...
@@ -417,8 +415,6 @@ static void test_packager(void)
char
contents
[
11
];
BOOL
br
,
extended
=
FALSE
;
static
const
WCHAR
filename3W
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
'n'
,
'a'
,
'm'
,
'e'
,
'3'
,
'.'
,
't'
,
'x'
,
't'
,
0
};
hr
=
CoCreateInstance
(
&
CLSID_Package
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IOleObject
,
(
void
**
)
&
oleobj
);
ok
(
hr
==
S_OK
||
...
...
@@ -458,7 +454,7 @@ static void test_packager(void)
if
(
extended
){
len
=
GetTempPathW
(
ARRAY_SIZE
(
filename
),
filename
);
lstrcpyW
(
filename
+
len
,
filename3W
);
lstrcpyW
(
filename
+
len
,
L"filename3.txt"
);
file
=
CreateFileW
(
filename
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
...
...
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