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
d9e109fd
Commit
d9e109fd
authored
Oct 03, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
69e612c5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
29 deletions
+14
-29
browse_ctx.c
dlls/hlink/browse_ctx.c
+2
-4
extserv.c
dlls/hlink/extserv.c
+2
-3
hlink_main.c
dlls/hlink/hlink_main.c
+9
-20
link.c
dlls/hlink/link.c
+1
-2
No files found.
dlls/hlink/browse_ctx.c
View file @
d9e109fd
...
...
@@ -98,8 +98,6 @@ static ULONG WINAPI IHlinkBC_fnRelease (IHlinkBrowseContext* iface)
return
ref
;
}
static
const
WCHAR
szIdent
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'H'
,
'L'
,
'I'
,
'N'
,
'K'
,
0
};
static
HRESULT
WINAPI
IHlinkBC_Register
(
IHlinkBrowseContext
*
iface
,
DWORD
dwReserved
,
IUnknown
*
piunk
,
IMoniker
*
pimk
,
DWORD
*
pdwRegister
)
{
...
...
@@ -111,7 +109,7 @@ static HRESULT WINAPI IHlinkBC_Register(IHlinkBrowseContext* iface,
FIXME
(
"(%p)->(%i %p %p %p)
\n
"
,
This
,
dwReserved
,
piunk
,
pimk
,
pdwRegister
);
hr
=
CreateItemMoniker
(
NULL
,
szIdent
,
&
mon
);
hr
=
CreateItemMoniker
(
NULL
,
L"WINEHLINK"
,
&
mon
);
if
(
FAILED
(
hr
))
return
hr
;
CreateGenericComposite
(
mon
,
pimk
,
&
composite
);
...
...
@@ -137,7 +135,7 @@ static HRESULT WINAPI IHlinkBC_GetObject(IHlinkBrowseContext* iface,
TRACE
(
"(%p)->(%p, %d, %p)
\n
"
,
This
,
pimk
,
fBindifRootRegistered
,
ppiunk
);
hr
=
CreateItemMoniker
(
NULL
,
szIdent
,
&
mon
);
hr
=
CreateItemMoniker
(
NULL
,
L"WINEHLINK"
,
&
mon
);
if
(
FAILED
(
hr
))
return
hr
;
CreateGenericComposite
(
mon
,
pimk
,
&
composite
);
...
...
dlls/hlink/extserv.c
View file @
d9e109fd
...
...
@@ -245,10 +245,9 @@ static HRESULT ExtServ_ImplSetAdditionalHeaders(ExtensionService* This, LPCWSTR
len
=
lstrlenW
(
pwzAdditionalHeaders
);
if
(
len
&&
pwzAdditionalHeaders
[
len
-
1
]
!=
'\n'
&&
pwzAdditionalHeaders
[
len
-
1
]
!=
'\r'
)
{
static
const
WCHAR
endlW
[]
=
{
'\r'
,
'\n'
,
0
};
This
->
headers
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
+
sizeof
(
endlW
));
This
->
headers
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
+
sizeof
(
L"
\r\n
"
));
memcpy
(
This
->
headers
,
pwzAdditionalHeaders
,
len
*
sizeof
(
WCHAR
));
memcpy
(
This
->
headers
+
len
,
endlW
,
sizeof
(
endlW
));
memcpy
(
This
->
headers
+
len
,
L"
\r\n
"
,
sizeof
(
L"
\r\n
"
));
}
else
{
This
->
headers
=
hlink_strdupW
(
pwzAdditionalHeaders
);
}
...
...
dlls/hlink/hlink_main.c
View file @
d9e109fd
...
...
@@ -273,8 +273,6 @@ HRESULT WINAPI HlinkIsShortcut(LPCWSTR pwzFileName)
{
int
len
;
static
const
WCHAR
url_ext
[]
=
{
'.'
,
'u'
,
'r'
,
'l'
,
0
};
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
pwzFileName
));
if
(
!
pwzFileName
)
...
...
@@ -284,7 +282,7 @@ HRESULT WINAPI HlinkIsShortcut(LPCWSTR pwzFileName)
if
(
len
<
0
)
return
S_FALSE
;
return
wcsicmp
(
pwzFileName
+
len
,
url_ext
)
?
S_FALSE
:
S_OK
;
return
wcsicmp
(
pwzFileName
+
len
,
L".url"
)
?
S_FALSE
:
S_OK
;
}
/***********************************************************************
...
...
@@ -297,25 +295,16 @@ HRESULT WINAPI HlinkGetSpecialReference(ULONG uReference, LPWSTR *ppwzReference)
WCHAR
*
buf
;
HKEY
hkey
;
static
const
WCHAR
start_pageW
[]
=
{
'S'
,
't'
,
'a'
,
'r'
,
't'
,
' '
,
'P'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
search_pageW
[]
=
{
'S'
,
'e'
,
'a'
,
'r'
,
'c'
,
'h'
,
' '
,
'P'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
ie_main_keyW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'n'
,
'e'
,
't'
,
' '
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'\\'
,
'M'
,
'a'
,
'i'
,
'n'
,
0
};
TRACE
(
"(%u %p)
\n
"
,
uReference
,
ppwzReference
);
*
ppwzReference
=
NULL
;
switch
(
uReference
)
{
case
HLSR_HOME
:
value_name
=
start_pageW
;
value_name
=
L"Start Page"
;
break
;
case
HLSR_SEARCHPAGE
:
value_name
=
search_pageW
;
value_name
=
L"Search Page"
;
break
;
case
HLSR_HISTORYFOLDER
:
return
E_NOTIMPL
;
...
...
@@ -323,7 +312,7 @@ HRESULT WINAPI HlinkGetSpecialReference(ULONG uReference, LPWSTR *ppwzReference)
return
E_INVALIDARG
;
}
res
=
RegOpenKeyW
(
HKEY_CURRENT_USER
,
ie_main_keyW
,
&
hkey
);
res
=
RegOpenKeyW
(
HKEY_CURRENT_USER
,
L"Software
\\
Microsoft
\\
Internet Explorer
\\
Main"
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
{
WARN
(
"Could not open key: %u
\n
"
,
res
);
return
HRESULT_FROM_WIN32
(
res
);
...
...
@@ -380,8 +369,7 @@ HRESULT WINAPI HlinkUpdateStackItem(IHlinkFrame *frame, IHlinkBrowseContext *bc,
HRESULT
WINAPI
HlinkParseDisplayName
(
LPBC
pibc
,
LPCWSTR
pwzDisplayName
,
BOOL
fNoForceAbs
,
ULONG
*
pcchEaten
,
IMoniker
**
ppimk
)
{
static
const
WCHAR
file_colonW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
};
ULONG
eaten
=
0
;
ULONG
eaten
=
0
,
len
;
HRESULT
hres
;
TRACE
(
"(%p %s %x %p %p)
\n
"
,
pibc
,
debugstr_w
(
pwzDisplayName
),
fNoForceAbs
,
pcchEaten
,
ppimk
);
...
...
@@ -389,9 +377,10 @@ HRESULT WINAPI HlinkParseDisplayName(LPBC pibc, LPCWSTR pwzDisplayName, BOOL fNo
if
(
fNoForceAbs
)
FIXME
(
"Unsupported fNoForceAbs
\n
"
);
if
(
!
wcsnicmp
(
pwzDisplayName
,
file_colonW
,
ARRAY_SIZE
(
file_colonW
)))
{
pwzDisplayName
+=
ARRAY_SIZE
(
file_colonW
);
eaten
+=
ARRAY_SIZE
(
file_colonW
);
len
=
ARRAY_SIZE
(
L"file:"
)
-
1
;
if
(
!
wcsnicmp
(
pwzDisplayName
,
L"file:"
,
len
))
{
pwzDisplayName
+=
len
;
eaten
+=
len
;
while
(
*
pwzDisplayName
==
'/'
)
{
pwzDisplayName
++
;
...
...
dlls/hlink/link.c
View file @
d9e109fd
...
...
@@ -537,13 +537,12 @@ static HRESULT WINAPI IHlink_fnNavigate(IHlink *iface, DWORD flags, IBindCtx *us
}
else
{
static
const
WCHAR
szOpen
[]
=
{
'o'
,
'p'
,
'e'
,
'n'
,
0
};
LPWSTR
target
=
NULL
;
r
=
IHlink_GetStringReference
(
iface
,
HLINKGETREF_DEFAULT
,
&
target
,
NULL
);
if
(
SUCCEEDED
(
r
)
&&
target
)
{
ShellExecuteW
(
NULL
,
szOpen
,
target
,
NULL
,
NULL
,
SW_SHOW
);
ShellExecuteW
(
NULL
,
L"open"
,
target
,
NULL
,
NULL
,
SW_SHOW
);
CoTaskMemFree
(
target
);
r
=
DRAGDROP_S_DROP
;
}
...
...
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