Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bfab815a
Commit
bfab815a
authored
Dec 01, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sti: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b3e68482
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
14 deletions
+5
-14
sti.c
dlls/sti/sti.c
+4
-13
sti.c
dlls/sti/tests/sti.c
+1
-1
No files found.
dlls/sti/sti.c
View file @
bfab815a
...
@@ -32,14 +32,8 @@
...
@@ -32,14 +32,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
sti
);
WINE_DEFAULT_DEBUG_CHANNEL
(
sti
);
static
const
WCHAR
registeredAppsLaunchPath
[]
=
{
static
const
WCHAR
registeredAppsLaunchPath
[]
=
'S'
,
'O'
,
'F'
,
'T'
,
'W'
,
'A'
,
'R'
,
'E'
,
'\\'
,
L"SOFTWARE
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
StillImage
\\
Registered Applications"
;
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'S'
,
't'
,
'i'
,
'l'
,
'l'
,
'I'
,
'm'
,
'a'
,
'g'
,
'e'
,
'\\'
,
'R'
,
'e'
,
'g'
,
'i'
,
's'
,
't'
,
'e'
,
'r'
,
'e'
,
'd'
,
' '
,
'A'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
's'
,
0
};
typedef
struct
_stillimage
typedef
struct
_stillimage
{
{
...
@@ -134,10 +128,7 @@ static HRESULT WINAPI stillimagew_GetSTILaunchInformation(IStillImageW *iface, L
...
@@ -134,10 +128,7 @@ static HRESULT WINAPI stillimagew_GetSTILaunchInformation(IStillImageW *iface, L
static
HRESULT
WINAPI
stillimagew_RegisterLaunchApplication
(
IStillImageW
*
iface
,
LPWSTR
pwszAppName
,
static
HRESULT
WINAPI
stillimagew_RegisterLaunchApplication
(
IStillImageW
*
iface
,
LPWSTR
pwszAppName
,
LPWSTR
pwszCommandLine
)
LPWSTR
pwszCommandLine
)
{
{
static
const
WCHAR
format
[]
=
{
'%'
,
's'
,
' '
,
'%'
,
's'
,
0
};
static
const
WCHAR
commandLineSuffix
[]
=
L"/StiDevice:%1 /StiEvent:%2"
;
static
const
WCHAR
commandLineSuffix
[]
=
{
'/'
,
'S'
,
't'
,
'i'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
':'
,
'%'
,
'1'
,
' '
,
'/'
,
'S'
,
't'
,
'i'
,
'E'
,
'v'
,
'e'
,
'n'
,
't'
,
':'
,
'%'
,
'2'
,
0
};
HKEY
registeredAppsKey
=
NULL
;
HKEY
registeredAppsKey
=
NULL
;
DWORD
ret
;
DWORD
ret
;
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
...
@@ -152,7 +143,7 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface,
...
@@ -152,7 +143,7 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface,
WCHAR
*
value
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
WCHAR
*
value
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
value
)
if
(
value
)
{
{
swprintf
(
value
,
len
,
format
,
pwszCommandLine
,
commandLineSuffix
);
swprintf
(
value
,
len
,
L"%s %s"
,
pwszCommandLine
,
commandLineSuffix
);
ret
=
RegSetValueExW
(
registeredAppsKey
,
pwszAppName
,
0
,
ret
=
RegSetValueExW
(
registeredAppsKey
,
pwszAppName
,
0
,
REG_SZ
,
(
BYTE
*
)
value
,
(
lstrlenW
(
value
)
+
1
)
*
sizeof
(
WCHAR
));
REG_SZ
,
(
BYTE
*
)
value
,
(
lstrlenW
(
value
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
ret
!=
ERROR_SUCCESS
)
if
(
ret
!=
ERROR_SUCCESS
)
...
...
dlls/sti/tests/sti.c
View file @
bfab815a
...
@@ -230,7 +230,7 @@ static void test_stillimage_aggregation(void)
...
@@ -230,7 +230,7 @@ static void test_stillimage_aggregation(void)
static
void
test_launch_app_registry
(
void
)
static
void
test_launch_app_registry
(
void
)
{
{
static
WCHAR
appName
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
's'
,
't'
,
'i'
,
't'
,
'e'
,
's'
,
't'
,
'a'
,
'p'
,
'p'
,
0
}
;
static
WCHAR
appName
[]
=
L"winestitestapp"
;
IStillImageW
*
pStiW
=
NULL
;
IStillImageW
*
pStiW
=
NULL
;
HRESULT
hr
;
HRESULT
hr
;
...
...
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