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
fd0d1d07
Commit
fd0d1d07
authored
Jan 31, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added CopyStgMedium implementation.
parent
53c6cdf9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
1 deletion
+68
-1
misc.c
dlls/urlmon/tests/misc.c
+33
-0
urlmon.spec
dlls/urlmon/urlmon.spec
+1
-1
urlmon_main.c
dlls/urlmon/urlmon_main.c
+33
-0
urlmon.idl
include/urlmon.idl
+1
-0
No files found.
dlls/urlmon/tests/misc.c
View file @
fd0d1d07
...
...
@@ -18,6 +18,7 @@
#define COBJMACROS
#define CONST_VTABLE
#define NONAMELESSUNION
#include <wine/test.h>
#include <stdarg.h>
...
...
@@ -1177,6 +1178,37 @@ static void test_ReleaseBindInfo(void)
ok
(
bi
.
pUnk
==
&
unk
,
"bi.pUnk=%p, expected %p
\n
"
,
bi
.
pUnk
,
&
unk
);
}
static
void
test_CopyStgMedium
(
void
)
{
STGMEDIUM
src
,
dst
;
HRESULT
hres
;
memset
(
&
src
,
0xf0
,
sizeof
(
src
));
memset
(
&
dst
,
0xe0
,
sizeof
(
dst
));
src
.
tymed
=
TYMED_NULL
;
src
.
pUnkForRelease
=
NULL
;
hres
=
CopyStgMedium
(
&
src
,
&
dst
);
ok
(
hres
==
S_OK
,
"CopyStgMedium failed: %08x
\n
"
,
hres
);
ok
(
dst
.
tymed
==
TYMED_NULL
,
"tymed=%d
\n
"
,
dst
.
tymed
);
ok
(
dst
.
u
.
hGlobal
==
(
void
*
)
0xf0f0f0f0
,
"u=%p
\n
"
,
dst
.
u
.
hGlobal
);
ok
(
!
dst
.
pUnkForRelease
,
"pUnkForRelease=%p, expected NULL
\n
"
,
dst
.
pUnkForRelease
);
memset
(
&
dst
,
0xe0
,
sizeof
(
dst
));
src
.
tymed
=
TYMED_ISTREAM
;
src
.
u
.
pstm
=
NULL
;
src
.
pUnkForRelease
=
NULL
;
hres
=
CopyStgMedium
(
&
src
,
&
dst
);
ok
(
hres
==
S_OK
,
"CopyStgMedium failed: %08x
\n
"
,
hres
);
ok
(
dst
.
tymed
==
TYMED_ISTREAM
,
"tymed=%d
\n
"
,
dst
.
tymed
);
ok
(
!
dst
.
u
.
pstm
,
"pstm=%p
\n
"
,
dst
.
u
.
pstm
);
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
);
ok
(
hres
==
E_POINTER
,
"CopyStgMedium failed: %08x, expected E_POINTER
\n
"
,
hres
);
}
static
void
test_UrlMkGetSessionOption
(
void
)
{
DWORD
encoding
,
size
;
...
...
@@ -1339,6 +1371,7 @@ START_TEST(misc)
test_NameSpace
();
test_MimeFilter
();
test_ReleaseBindInfo
();
test_CopyStgMedium
();
test_UrlMkGetSessionOption
();
test_ObtainUserAgentString
();
test_MkParseDisplayNameEx
();
...
...
dlls/urlmon/urlmon.spec
View file @
fd0d1d07
...
...
@@ -21,7 +21,7 @@
@ stdcall CoInternetQueryInfo(ptr long long ptr long ptr long)
@ stub CompareSecurityIds
@ stub CopyBindInfo
@ st
ub CopyStgMedium
@ st
dcall CopyStgMedium(ptr ptr)
@ stdcall CreateAsyncBindCtx(long ptr ptr ptr)
@ stdcall CreateAsyncBindCtxEx(ptr long ptr ptr ptr long)
@ stdcall CreateFormatEnumerator(long ptr ptr)
...
...
dlls/urlmon/urlmon_main.c
View file @
fd0d1d07
...
...
@@ -406,6 +406,39 @@ void WINAPI ReleaseBindInfo(BINDINFO* pbindinfo)
pbindinfo
->
cbSize
=
size
;
}
/***********************************************************************
* CopyStgMedium (URLMON.@)
*/
HRESULT
WINAPI
CopyStgMedium
(
const
STGMEDIUM
*
src
,
STGMEDIUM
*
dst
)
{
TRACE
(
"(%p %p)
\n
"
,
src
,
dst
);
if
(
!
src
||
!
dst
)
return
E_POINTER
;
memcpy
(
dst
,
src
,
sizeof
(
STGMEDIUM
));
switch
(
dst
->
tymed
)
{
case
TYMED_NULL
:
break
;
case
TYMED_ISTREAM
:
if
(
dst
->
u
.
pstm
)
IStream_AddRef
(
dst
->
u
.
pstm
);
break
;
case
TYMED_ISTORAGE
:
if
(
dst
->
u
.
pstg
)
IStorage_AddRef
(
dst
->
u
.
pstg
);
break
;
default:
FIXME
(
"Unimplemented tymed %d
\n
"
,
src
->
tymed
);
}
if
(
dst
->
pUnkForRelease
)
IUnknown_AddRef
(
dst
->
pUnkForRelease
);
return
S_OK
;
}
static
BOOL
text_richtext_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
5
&&
!
memcmp
(
b
,
"{
\\
rtf"
,
5
);
...
...
include/urlmon.idl
View file @
fd0d1d07
...
...
@@ -1279,6 +1279,7 @@ cpp_quote("HRESULT WINAPI ObtainUserAgentString(DWORD,LPSTR,DWORD*);")
cpp_quote
(
"HRESULT WINAPI RegisterFormatEnumerator(LPBC,IEnumFORMATETC*,DWORD);"
)
cpp_quote
(
"HRESULT WINAPI RevokeFormatEnumerator(LPBC,IEnumFORMATETC*);"
)
cpp_quote
(
"HRESULT WINAPI RevokeBindStatusCallback(LPBC,IBindStatusCallback*);"
)
cpp_quote
(
"HRESULT WINAPI CopyStgMedium(const STGMEDIUM*,STGMEDIUM*);"
)
cpp_quote
(
"void WINAPI ReleaseBindInfo(BINDINFO*);"
)
cpp_quote
(
"HRESULT WINAPI UrlMkGetSessionOption(DWORD,LPVOID,DWORD,DWORD*,DWORD);"
)
cpp_quote
(
"HRESULT WINAPI UrlMkSetSessionOption(DWORD,LPVOID,DWORD,DWORD);"
)
...
...
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