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
74b0897c
Commit
74b0897c
authored
Feb 18, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added TYMED_FILE support to CopyStgMedium.
parent
d2243989
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
misc.c
dlls/urlmon/tests/misc.c
+13
-0
urlmon_main.c
dlls/urlmon/urlmon_main.c
+7
-1
No files found.
dlls/urlmon/tests/misc.c
View file @
74b0897c
...
...
@@ -1183,6 +1183,8 @@ static void test_CopyStgMedium(void)
STGMEDIUM
src
,
dst
;
HRESULT
hres
;
static
WCHAR
fileW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
0
};
memset
(
&
src
,
0xf0
,
sizeof
(
src
));
memset
(
&
dst
,
0xe0
,
sizeof
(
dst
));
src
.
tymed
=
TYMED_NULL
;
...
...
@@ -1203,6 +1205,17 @@ static void test_CopyStgMedium(void)
ok
(
!
dst
.
u
.
pstm
,
"pstm=%p
\n
"
,
dst
.
u
.
pstm
);
ok
(
!
dst
.
pUnkForRelease
,
"pUnkForRelease=%p, expected NULL
\n
"
,
dst
.
pUnkForRelease
);
memset
(
&
dst
,
0xe0
,
sizeof
(
dst
));
src
.
tymed
=
TYMED_FILE
;
src
.
u
.
lpszFileName
=
fileW
;
src
.
pUnkForRelease
=
NULL
;
hres
=
CopyStgMedium
(
&
src
,
&
dst
);
ok
(
hres
==
S_OK
,
"CopyStgMedium failed: %08x
\n
"
,
hres
);
ok
(
dst
.
tymed
==
TYMED_FILE
,
"tymed=%d
\n
"
,
dst
.
tymed
);
ok
(
dst
.
u
.
lpszFileName
&&
dst
.
u
.
lpszFileName
!=
fileW
,
"lpszFileName=%p
\n
"
,
dst
.
u
.
lpszFileName
);
ok
(
!
lstrcmpW
(
dst
.
u
.
lpszFileName
,
fileW
),
"wrong file name
\n
"
);
ok
(
!
dst
.
pUnkForRelease
,
"pUnkForRelease=%p, expected NULL
\n
"
,
dst
.
pUnkForRelease
);
hres
=
CopyStgMedium
(
&
src
,
NULL
);
ok
(
hres
==
E_POINTER
,
"CopyStgMedium failed: %08x, expected E_POINTER
\n
"
,
hres
);
hres
=
CopyStgMedium
(
NULL
,
&
dst
);
...
...
dlls/urlmon/urlmon_main.c
View file @
74b0897c
...
...
@@ -398,7 +398,6 @@ void WINAPI ReleaseBindInfo(BINDINFO* pbindinfo)
if
(
offsetof
(
BINDINFO
,
szExtraInfo
)
<
size
)
CoTaskMemFree
(
pbindinfo
->
szCustomVerb
);
if
(
pbindinfo
->
pUnk
&&
offsetof
(
BINDINFO
,
pUnk
)
<
size
)
IUnknown_Release
(
pbindinfo
->
pUnk
);
...
...
@@ -421,6 +420,13 @@ HRESULT WINAPI CopyStgMedium(const STGMEDIUM *src, STGMEDIUM *dst)
switch
(
dst
->
tymed
)
{
case
TYMED_NULL
:
break
;
case
TYMED_FILE
:
if
(
src
->
u
.
lpszFileName
&&
!
src
->
pUnkForRelease
)
{
DWORD
size
=
(
strlenW
(
src
->
u
.
lpszFileName
)
+
1
)
*
sizeof
(
WCHAR
);
dst
->
u
.
lpszFileName
=
CoTaskMemAlloc
(
size
);
memcpy
(
dst
->
u
.
lpszFileName
,
src
->
u
.
lpszFileName
,
size
);
}
break
;
case
TYMED_ISTREAM
:
if
(
dst
->
u
.
pstm
)
IStream_AddRef
(
dst
->
u
.
pstm
);
...
...
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