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
28a1eaed
Commit
28a1eaed
authored
Feb 06, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmp: Added IPersistStreamInit stub implementation.
parent
3a914b92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
0 deletions
+106
-0
oleobj.c
dlls/wmp/oleobj.c
+89
-0
oleobj.c
dlls/wmp/tests/oleobj.c
+17
-0
No files found.
dlls/wmp/oleobj.c
View file @
28a1eaed
...
...
@@ -25,6 +25,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmp);
struct
WindowsMediaPlayer
{
IOleObject
IOleObject_iface
;
IProvideClassInfo2
IProvideClassInfo2_iface
;
IPersistStreamInit
IPersistStreamInit_iface
;
LONG
ref
;
};
...
...
@@ -49,6 +51,12 @@ static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, v
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IProvideClassInfo2
))
{
TRACE
(
"(%p)->(IID_IProvideClassInfo2 %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IProvideClassInfo2_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IPersist
))
{
TRACE
(
"(%p)->(IID_IPersist %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IPersistStreamInit_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IPersistStreamInit
))
{
TRACE
(
"(%p)->(IID_IPersistStreamInit %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IPersistStreamInit_iface
;
}
else
{
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
...
...
@@ -311,6 +319,86 @@ static const IProvideClassInfo2Vtbl ProvideClassInfo2Vtbl = {
ProvideClassInfo2_GetGUID
};
static
inline
WindowsMediaPlayer
*
impl_from_IPersistStreamInit
(
IPersistStreamInit
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
WindowsMediaPlayer
,
IPersistStreamInit_iface
);
}
static
HRESULT
WINAPI
PersistStreamInit_QueryInterface
(
IPersistStreamInit
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
WindowsMediaPlayer
*
This
=
impl_from_IPersistStreamInit
(
iface
);
return
IOleObject_QueryInterface
(
&
This
->
IOleObject_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
PersistStreamInit_AddRef
(
IPersistStreamInit
*
iface
)
{
WindowsMediaPlayer
*
This
=
impl_from_IPersistStreamInit
(
iface
);
return
IOleObject_AddRef
(
&
This
->
IOleObject_iface
);
}
static
ULONG
WINAPI
PersistStreamInit_Release
(
IPersistStreamInit
*
iface
)
{
WindowsMediaPlayer
*
This
=
impl_from_IPersistStreamInit
(
iface
);
return
IOleObject_Release
(
&
This
->
IOleObject_iface
);
}
static
HRESULT
WINAPI
PersistStreamInit_GetClassID
(
IPersistStreamInit
*
iface
,
CLSID
*
pClassID
)
{
WindowsMediaPlayer
*
This
=
impl_from_IPersistStreamInit
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pClassID
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistStreamInit_IsDirty
(
IPersistStreamInit
*
iface
)
{
WindowsMediaPlayer
*
This
=
impl_from_IPersistStreamInit
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistStreamInit_Load
(
IPersistStreamInit
*
iface
,
LPSTREAM
pStm
)
{
WindowsMediaPlayer
*
This
=
impl_from_IPersistStreamInit
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pStm
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistStreamInit_Save
(
IPersistStreamInit
*
iface
,
LPSTREAM
pStm
,
BOOL
fClearDirty
)
{
WindowsMediaPlayer
*
This
=
impl_from_IPersistStreamInit
(
iface
);
FIXME
(
"(%p)->(%p %x)
\n
"
,
This
,
pStm
,
fClearDirty
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistStreamInit_GetSizeMax
(
IPersistStreamInit
*
iface
,
ULARGE_INTEGER
*
pcbSize
)
{
WindowsMediaPlayer
*
This
=
impl_from_IPersistStreamInit
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pcbSize
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistStreamInit_InitNew
(
IPersistStreamInit
*
iface
)
{
WindowsMediaPlayer
*
This
=
impl_from_IPersistStreamInit
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
IPersistStreamInitVtbl
PersistStreamInitVtbl
=
{
PersistStreamInit_QueryInterface
,
PersistStreamInit_AddRef
,
PersistStreamInit_Release
,
PersistStreamInit_GetClassID
,
PersistStreamInit_IsDirty
,
PersistStreamInit_Load
,
PersistStreamInit_Save
,
PersistStreamInit_GetSizeMax
,
PersistStreamInit_InitNew
};
HRESULT
WINAPI
WMPFactory_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
void
**
ppv
)
{
...
...
@@ -325,6 +413,7 @@ HRESULT WINAPI WMPFactory_CreateInstance(IClassFactory *iface, IUnknown *outer,
wmp
->
IOleObject_iface
.
lpVtbl
=
&
OleObjectVtbl
;
wmp
->
IProvideClassInfo2_iface
.
lpVtbl
=
&
ProvideClassInfo2Vtbl
;
wmp
->
IPersistStreamInit_iface
.
lpVtbl
=
&
PersistStreamInitVtbl
;
wmp
->
ref
=
1
;
...
...
dlls/wmp/tests/oleobj.c
View file @
28a1eaed
...
...
@@ -24,9 +24,19 @@
#include "wine/test.h"
static
void
test_QI
(
IUnknown
*
unk
)
{
IUnknown
*
tmp
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IQuickActivate
,
(
void
**
)
&
tmp
);
ok
(
hres
==
E_NOINTERFACE
,
"Got IQuickActivate iface when no expected
\n
"
);
}
static
void
test_wmp
(
void
)
{
IProvideClassInfo2
*
class_info
;
IPersistStreamInit
*
psi
;
IOleObject
*
oleobj
;
GUID
guid
;
LONG
ref
;
...
...
@@ -48,6 +58,13 @@ static void test_wmp(void)
IProvideClassInfo2_Release
(
class_info
);
test_QI
((
IUnknown
*
)
oleobj
);
hres
=
IOleObject_QueryInterface
(
oleobj
,
&
IID_IPersistStreamInit
,
(
void
**
)
&
psi
);
ok
(
hres
==
S_OK
,
"Could not get IPersistStreamInit iface: %08x
\n
"
,
hres
);
IPersistStreamInit_Release
(
psi
);
ref
=
IOleObject_Release
(
oleobj
);
ok
(
!
ref
,
"ref = %d
\n
"
,
ref
);
}
...
...
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