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
5674260b
Commit
5674260b
authored
Jul 29, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 31, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use CoInternetParseUrl in URLMonikerImpl_Construct.
parent
f114ba11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
umon.c
dlls/urlmon/umon.c
+15
-24
No files found.
dlls/urlmon/umon.c
View file @
5674260b
...
...
@@ -1060,43 +1060,34 @@ static const IMonikerVtbl VT_URLMonikerImpl =
static
HRESULT
URLMonikerImpl_Construct
(
URLMonikerImpl
*
This
,
LPCOLESTR
lpszLeftURLName
,
LPCOLESTR
lpszURLName
)
{
HRESULT
hres
;
DWORD
sizeStr
=
INTERNET_MAX_URL_LENGTH
;
DWORD
sizeStr
=
0
;
TRACE
(
"(%p,%s,%s)
\n
"
,
This
,
debugstr_w
(
lpszLeftURLName
),
debugstr_w
(
lpszURLName
));
This
->
lpvtbl
=
&
VT_URLMonikerImpl
;
This
->
ref
=
0
;
sizeStr
=
lstrlenW
(
lpszURLName
)
+
1
;
if
(
lpszLeftURLName
)
sizeStr
+=
strlenW
(
lpszLeftURLName
)
+
32
;
This
->
URLName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeStr
*
sizeof
(
WCHAR
));
This
->
URLName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
INTERNET_MAX_URL_LENGTH
*
sizeof
(
WCHAR
));
if
(
lpszLeftURLName
)
{
if
(
lpszLeftURLName
)
hres
=
CoInternetCombineUrl
(
lpszLeftURLName
,
lpszURLName
,
URL_FILE_USE_PATHURL
,
This
->
URLName
,
sizeStr
,
&
sizeStr
,
0
);
if
(
FAILED
(
hres
))
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
URLName
);
return
hres
;
}
}
else
{
/* FIXME:
* We probably should use CoInternetParseUrl or something similar here.
*/
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,};
This
->
URLName
,
INTERNET_MAX_URL_LENGTH
,
&
sizeStr
,
0
);
else
hres
=
CoInternetParseUrl
(
lpszURLName
,
PARSE_CANONICALIZE
,
URL_FILE_USE_PATHURL
,
This
->
URLName
,
INTERNET_MAX_URL_LENGTH
,
&
sizeStr
,
0
);
/* file protocol is a special case */
if
(
sizeStr
>
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
)
&&
!
memcmp
(
lpszURLName
,
wszFile
,
sizeof
(
wszFile
)))
UrlCanonicalizeW
(
lpszURLName
,
This
->
URLName
,
&
sizeStr
,
URL_FILE_USE_PATHURL
);
else
strcpyW
(
This
->
URLName
,
lpszURLName
);
if
(
FAILED
(
hres
))
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
URLName
);
return
hres
;
}
URLMON_LockModule
();
if
(
sizeStr
!=
INTERNET_MAX_URL_LENGTH
)
This
->
URLName
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
This
->
URLName
,
(
sizeStr
+
1
)
*
sizeof
(
WCHAR
));
TRACE
(
"URLName = %s
\n
"
,
debugstr_w
(
This
->
URLName
));
return
S_OK
;
}
...
...
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