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
468da8e2
Commit
468da8e2
authored
Dec 23, 2008
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Dec 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Implement ParseURLFromOutsideSource.
parent
1a0f1f5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
2 deletions
+103
-2
shdocvw.spec
dlls/shdocvw/shdocvw.spec
+2
-2
shdocvw_main.c
dlls/shdocvw/shdocvw_main.c
+101
-0
No files found.
dlls/shdocvw/shdocvw.spec
View file @
468da8e2
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
164 stub -noname ResetProfileSharing
164 stub -noname ResetProfileSharing
165 stub -noname URLSubstitution
165 stub -noname URLSubstitution
167 stub -noname IsIEDefaultBrowser
167 stub -noname IsIEDefaultBrowser
169 st
ub -noname ParseURLFromOutsideSourceA
169 st
dcall -noname ParseURLFromOutsideSourceA(str ptr ptr ptr)
170 st
ub -noname ParseURLFromOutsideSourceW
170 st
dcall -noname ParseURLFromOutsideSourceW(wstr ptr ptr ptr)
171 stub -noname _DeletePidlDPA
171 stub -noname _DeletePidlDPA
172 stub -noname IURLQualify
172 stub -noname IURLQualify
173 stub -noname SHIsRestricted
173 stub -noname SHIsRestricted
...
...
dlls/shdocvw/shdocvw_main.c
View file @
468da8e2
...
@@ -295,3 +295,104 @@ HRESULT WINAPI URLSubRegQueryA(LPCSTR regpath, LPCSTR name, DWORD type,
...
@@ -295,3 +295,104 @@ HRESULT WINAPI URLSubRegQueryA(LPCSTR regpath, LPCSTR name, DWORD type,
return
E_FAIL
;
return
E_FAIL
;
}
}
/******************************************************************
* ParseURLFromOutsideSourceW (SHDOCVW.170)
*/
DWORD
WINAPI
ParseURLFromOutsideSourceW
(
LPCWSTR
url
,
LPWSTR
out
,
LPDWORD
plen
,
LPDWORD
unknown
)
{
WCHAR
buffer_in
[
INTERNET_MAX_URL_LENGTH
];
WCHAR
buffer_out
[
INTERNET_MAX_URL_LENGTH
];
LPCWSTR
ptr
=
url
;
HRESULT
hr
;
DWORD
needed
;
DWORD
len
;
DWORD
res
=
0
;
TRACE
(
"(%s, %p, %p, %p) len: %d, unknown: 0x%x
\n
"
,
debugstr_w
(
url
),
out
,
plen
,
unknown
,
plen
?
*
plen
:
0
,
unknown
?
*
unknown
:
0
);
if
(
!
PathIsURLW
(
ptr
))
{
len
=
sizeof
(
buffer_in
)
/
sizeof
(
buffer_in
[
0
]);
buffer_in
[
0
]
=
0
;
hr
=
UrlApplySchemeW
(
ptr
,
buffer_in
,
&
len
,
URL_APPLY_GUESSSCHEME
);
TRACE
(
"got 0x%x with %s
\n
"
,
hr
,
debugstr_w
(
buffer_in
));
if
(
hr
!=
S_OK
)
{
/* when we can't guess the scheme, use the default scheme */
len
=
sizeof
(
buffer_in
)
/
sizeof
(
buffer_in
[
0
]);
hr
=
UrlApplySchemeW
(
ptr
,
buffer_in
,
&
len
,
URL_APPLY_DEFAULT
);
}
if
(
hr
==
S_OK
)
{
/* we parsed the url to buffer_in */
ptr
=
buffer_in
;
}
else
{
FIXME
(
"call search hook for %s
\n
"
,
debugstr_w
(
ptr
));
}
}
len
=
sizeof
(
buffer_out
)
/
sizeof
(
buffer_out
[
0
]);
buffer_out
[
0
]
=
'\0'
;
hr
=
UrlCanonicalizeW
(
ptr
,
buffer_out
,
&
len
,
URL_ESCAPE_SPACES_ONLY
);
needed
=
lstrlenW
(
buffer_out
)
+
1
;
TRACE
(
"got 0x%x with %s (need %d)
\n
"
,
hr
,
debugstr_w
(
buffer_out
),
needed
);
if
(
*
plen
>=
needed
)
{
if
(
out
!=
NULL
)
{
lstrcpyW
(
out
,
buffer_out
);
res
++
;
}
needed
--
;
}
*
plen
=
needed
;
TRACE
(
"=> %d
\n
"
,
res
);
return
res
;
}
/******************************************************************
* ParseURLFromOutsideSourceA (SHDOCVW.169)
*
* See ParseURLFromOutsideSourceW
*/
DWORD
WINAPI
ParseURLFromOutsideSourceA
(
LPCSTR
url
,
LPSTR
out
,
LPDWORD
plen
,
LPDWORD
unknown
)
{
WCHAR
buffer
[
INTERNET_MAX_URL_LENGTH
];
LPWSTR
urlW
=
NULL
;
DWORD
needed
;
DWORD
res
;
DWORD
len
;
TRACE
(
"(%s, %p, %p, %p) len: %d, unknown: 0x%x
\n
"
,
debugstr_a
(
url
),
out
,
plen
,
unknown
,
plen
?
*
plen
:
0
,
unknown
?
*
unknown
:
0
);
if
(
url
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
url
,
-
1
,
NULL
,
0
);
urlW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
url
,
-
1
,
urlW
,
len
);
}
len
=
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]);
res
=
ParseURLFromOutsideSourceW
(
urlW
,
buffer
,
&
len
,
unknown
);
HeapFree
(
GetProcessHeap
(),
0
,
urlW
);
needed
=
WideCharToMultiByte
(
CP_ACP
,
0
,
buffer
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
res
=
0
;
if
(
*
plen
>=
needed
)
{
if
(
out
!=
NULL
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
buffer
,
-
1
,
out
,
*
plen
,
NULL
,
NULL
);
res
=
needed
;
}
needed
--
;
}
*
plen
=
needed
;
TRACE
(
"=> %d
\n
"
,
res
);
return
res
;
}
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