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
7f0b7c5c
Commit
7f0b7c5c
authored
Mar 08, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added CopyBindInfo implementation.
parent
3d5db7a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
1 deletion
+66
-1
urlmon.spec
dlls/urlmon/urlmon.spec
+1
-1
urlmon_main.c
dlls/urlmon/urlmon_main.c
+65
-0
No files found.
dlls/urlmon/urlmon.spec
View file @
7f0b7c5c
...
...
@@ -28,7 +28,7 @@
@ stdcall CoInternetQueryInfo(ptr long long ptr long ptr long)
@ stdcall CoInternetSetFeatureEnabled(long long long)
@ stdcall CompareSecurityIds(ptr long ptr long long)
@ st
ub CopyBindInfo
@ st
dcall CopyBindInfo(ptr ptr)
@ stdcall CopyStgMedium(ptr ptr)
@ stdcall CreateAsyncBindCtx(long ptr ptr ptr)
@ stdcall CreateAsyncBindCtxEx(ptr long ptr ptr ptr long)
...
...
dlls/urlmon/urlmon_main.c
View file @
7f0b7c5c
...
...
@@ -533,6 +533,8 @@ HRESULT WINAPI CopyStgMedium(const STGMEDIUM *src, STGMEDIUM *dst)
if
(
src
->
u
.
lpszFileName
&&
!
src
->
pUnkForRelease
)
{
DWORD
size
=
(
strlenW
(
src
->
u
.
lpszFileName
)
+
1
)
*
sizeof
(
WCHAR
);
dst
->
u
.
lpszFileName
=
CoTaskMemAlloc
(
size
);
if
(
!
dst
->
u
.
lpszFileName
)
return
E_OUTOFMEMORY
;
memcpy
(
dst
->
u
.
lpszFileName
,
src
->
u
.
lpszFileName
,
size
);
}
break
;
...
...
@@ -554,6 +556,69 @@ HRESULT WINAPI CopyStgMedium(const STGMEDIUM *src, STGMEDIUM *dst)
return
S_OK
;
}
/***********************************************************************
* CopyBindInfo (URLMON.@)
*/
HRESULT
WINAPI
CopyBindInfo
(
const
BINDINFO
*
pcbiSrc
,
BINDINFO
*
pcbiDest
)
{
DWORD
size
;
HRESULT
hres
;
TRACE
(
"(%p %p)
\n
"
,
pcbiSrc
,
pcbiDest
);
if
(
!
pcbiSrc
||
!
pcbiDest
)
return
E_POINTER
;
if
(
!
pcbiSrc
->
cbSize
||
!
pcbiDest
->
cbSize
)
return
E_INVALIDARG
;
size
=
pcbiDest
->
cbSize
;
if
(
size
>
pcbiSrc
->
cbSize
)
{
memcpy
(
pcbiDest
,
pcbiSrc
,
pcbiSrc
->
cbSize
);
memset
((
char
*
)
pcbiDest
+
pcbiSrc
->
cbSize
,
0
,
size
-
pcbiSrc
->
cbSize
);
}
else
{
memcpy
(
pcbiDest
,
pcbiSrc
,
size
);
}
pcbiDest
->
cbSize
=
size
;
size
=
FIELD_OFFSET
(
BINDINFO
,
szExtraInfo
)
+
sizeof
(
void
*
);
if
(
pcbiSrc
->
cbSize
>=
size
&&
pcbiDest
->
cbSize
>=
size
&&
pcbiSrc
->
szExtraInfo
)
{
size
=
(
strlenW
(
pcbiSrc
->
szExtraInfo
)
+
1
)
*
sizeof
(
WCHAR
);
pcbiDest
->
szExtraInfo
=
CoTaskMemAlloc
(
size
);
if
(
!
pcbiDest
->
szExtraInfo
)
return
E_OUTOFMEMORY
;
memcpy
(
pcbiDest
->
szExtraInfo
,
pcbiSrc
->
szExtraInfo
,
size
);
}
size
=
FIELD_OFFSET
(
BINDINFO
,
stgmedData
)
+
sizeof
(
STGMEDIUM
);
if
(
pcbiSrc
->
cbSize
>=
size
&&
pcbiDest
->
cbSize
>=
size
)
{
hres
=
CopyStgMedium
(
&
pcbiSrc
->
stgmedData
,
&
pcbiDest
->
stgmedData
);
if
(
FAILED
(
hres
))
{
CoTaskMemFree
(
pcbiDest
->
szExtraInfo
);
return
hres
;
}
}
size
=
FIELD_OFFSET
(
BINDINFO
,
szCustomVerb
)
+
sizeof
(
void
*
);
if
(
pcbiSrc
->
cbSize
>=
size
&&
pcbiDest
->
cbSize
>=
size
&&
pcbiSrc
->
szCustomVerb
)
{
size
=
(
strlenW
(
pcbiSrc
->
szCustomVerb
)
+
1
)
*
sizeof
(
WCHAR
);
pcbiDest
->
szCustomVerb
=
CoTaskMemAlloc
(
size
);
if
(
!
pcbiDest
->
szCustomVerb
)
{
CoTaskMemFree
(
pcbiDest
->
szExtraInfo
);
ReleaseStgMedium
(
&
pcbiDest
->
stgmedData
);
return
E_OUTOFMEMORY
;
}
}
size
=
FIELD_OFFSET
(
BINDINFO
,
securityAttributes
)
+
sizeof
(
SECURITY_ATTRIBUTES
);
if
(
pcbiDest
->
cbSize
>=
size
)
memset
(
&
pcbiDest
->
securityAttributes
,
0
,
sizeof
(
SECURITY_ATTRIBUTES
));
if
(
pcbiSrc
->
pUnk
)
IUnknown_AddRef
(
pcbiDest
->
pUnk
);
return
S_OK
;
}
static
BOOL
text_richtext_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
5
&&
!
memcmp
(
b
,
"{
\\
rtf"
,
5
);
...
...
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