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
8c6c7f6b
Commit
8c6c7f6b
authored
Apr 28, 2015
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmloader: Add and use a generic IPersistStream_GetClassID.
parent
d9e0c9fb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
14 deletions
+37
-14
container.c
dlls/dmloader/container.c
+1
-14
dmobject.c
dlls/dmloader/dmobject.c
+15
-0
dmobject.h
dlls/dmloader/dmobject.h
+2
-0
loader.c
dlls/dmloader/tests/loader.c
+2
-0
dmobject.c
dlls/dmusic/dmobject.c
+15
-0
dmobject.h
dlls/dmusic/dmobject.h
+2
-0
No files found.
dlls/dmloader/container.c
View file @
8c6c7f6b
...
...
@@ -368,19 +368,6 @@ static inline IDirectMusicContainerImpl *impl_from_IPersistStream(IPersistStream
return
CONTAINING_RECORD
(
iface
,
IDirectMusicContainerImpl
,
dmobj
.
IPersistStream_iface
);
}
static
HRESULT
WINAPI
IDirectMusicContainerImpl_IPersistStream_GetClassID
(
LPPERSISTSTREAM
iface
,
CLSID
*
pClassID
)
{
IDirectMusicContainerImpl
*
This
=
impl_from_IPersistStream
(
iface
);
TRACE
(
"(%p, %p)
\n
"
,
This
,
pClassID
);
if
(
IsBadWritePtr
(
pClassID
,
sizeof
(
CLSID
)))
{
ERR
(
": pClassID bad write pointer
\n
"
);
return
E_POINTER
;
}
*
pClassID
=
CLSID_DirectMusicContainer
;
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicContainerImpl_IPersistStream_Load
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
)
{
IDirectMusicContainerImpl
*
This
=
impl_from_IPersistStream
(
iface
);
WINE_CHUNK
Chunk
;
...
...
@@ -803,7 +790,7 @@ static const IPersistStreamVtbl persiststream_vtbl = {
dmobj_IPersistStream_QueryInterface
,
dmobj_IPersistStream_AddRef
,
dmobj_IPersistStream_Release
,
IDirectMusicContainerImpl
_IPersistStream_GetClassID
,
dmobj
_IPersistStream_GetClassID
,
unimpl_IPersistStream_IsDirty
,
IDirectMusicContainerImpl_IPersistStream_Load
,
unimpl_IPersistStream_Save
,
...
...
dlls/dmloader/dmobject.c
View file @
8c6c7f6b
/*
* Base IDirectMusicObject Implementation
* Keep in sync with the master in dlls/dmusic/dmobject.c
*
* Copyright (C) 2003-2004 Rok Mandeljc
* Copyright (C) 2014 Michael Stefaniuc
...
...
@@ -134,6 +135,20 @@ ULONG WINAPI dmobj_IPersistStream_Release(IPersistStream *iface)
return
IUnknown_Release
(
This
->
outer_unk
);
}
HRESULT
WINAPI
dmobj_IPersistStream_GetClassID
(
IPersistStream
*
iface
,
CLSID
*
class
)
{
struct
dmobject
*
This
=
impl_from_IPersistStream
(
iface
);
TRACE
(
"(%p, %p)
\n
"
,
This
,
class
);
if
(
!
class
)
return
E_POINTER
;
*
class
=
This
->
desc
.
guidClass
;
return
S_OK
;
}
/* IPersistStream methods not implemented in native */
HRESULT
WINAPI
unimpl_IPersistStream_GetClassID
(
IPersistStream
*
iface
,
CLSID
*
class
)
{
...
...
dlls/dmloader/dmobject.h
View file @
8c6c7f6b
/*
* Base IDirectMusicObject Implementation
* Keep in sync with the master in dlls/dmusic/dmobject.h
*
* Copyright (C) 2014 Michael Stefaniuc
*
...
...
@@ -42,6 +43,7 @@ HRESULT WINAPI dmobj_IPersistStream_QueryInterface(IPersistStream *iface, REFIID
void
**
ret_iface
)
DECLSPEC_HIDDEN
;
ULONG
WINAPI
dmobj_IPersistStream_AddRef
(
IPersistStream
*
iface
)
DECLSPEC_HIDDEN
;
ULONG
WINAPI
dmobj_IPersistStream_Release
(
IPersistStream
*
iface
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
dmobj_IPersistStream_GetClassID
(
IPersistStream
*
iface
,
CLSID
*
class
)
DECLSPEC_HIDDEN
;
/* IPersistStream methods not implemented in native */
HRESULT
WINAPI
unimpl_IPersistStream_GetClassID
(
IPersistStream
*
iface
,
...
...
dlls/dmloader/tests/loader.c
View file @
8c6c7f6b
...
...
@@ -267,6 +267,8 @@ static void test_container(void)
/* IPersistStream */
hr
=
IDirectMusicContainer_QueryInterface
(
dmc
,
&
IID_IPersistStream
,
(
void
**
)
&
ps
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IPersistStream failed: %08x
\n
"
,
hr
);
hr
=
IPersistStream_GetClassID
(
ps
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IPersistStream_GetClassID failed: %08x
\n
"
,
hr
);
hr
=
IPersistStream_GetClassID
(
ps
,
&
class
);
ok
(
hr
==
S_OK
,
"IPersistStream_GetClassID failed: %08x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
class
,
&
CLSID_DirectMusicContainer
),
...
...
dlls/dmusic/dmobject.c
View file @
8c6c7f6b
/*
* Base IDirectMusicObject Implementation
* Keep in sync with the master in dlls/dmusic/dmobject.c
*
* Copyright (C) 2003-2004 Rok Mandeljc
* Copyright (C) 2014 Michael Stefaniuc
...
...
@@ -134,6 +135,20 @@ ULONG WINAPI dmobj_IPersistStream_Release(IPersistStream *iface)
return
IUnknown_Release
(
This
->
outer_unk
);
}
HRESULT
WINAPI
dmobj_IPersistStream_GetClassID
(
IPersistStream
*
iface
,
CLSID
*
class
)
{
struct
dmobject
*
This
=
impl_from_IPersistStream
(
iface
);
TRACE
(
"(%p, %p)
\n
"
,
This
,
class
);
if
(
!
class
)
return
E_POINTER
;
*
class
=
This
->
desc
.
guidClass
;
return
S_OK
;
}
/* IPersistStream methods not implemented in native */
HRESULT
WINAPI
unimpl_IPersistStream_GetClassID
(
IPersistStream
*
iface
,
CLSID
*
class
)
{
...
...
dlls/dmusic/dmobject.h
View file @
8c6c7f6b
/*
* Base IDirectMusicObject Implementation
* Keep in sync with the master in dlls/dmusic/dmobject.h
*
* Copyright (C) 2014 Michael Stefaniuc
*
...
...
@@ -42,6 +43,7 @@ HRESULT WINAPI dmobj_IPersistStream_QueryInterface(IPersistStream *iface, REFIID
void
**
ret_iface
)
DECLSPEC_HIDDEN
;
ULONG
WINAPI
dmobj_IPersistStream_AddRef
(
IPersistStream
*
iface
)
DECLSPEC_HIDDEN
;
ULONG
WINAPI
dmobj_IPersistStream_Release
(
IPersistStream
*
iface
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
dmobj_IPersistStream_GetClassID
(
IPersistStream
*
iface
,
CLSID
*
class
)
DECLSPEC_HIDDEN
;
/* IPersistStream methods not implemented in native */
HRESULT
WINAPI
unimpl_IPersistStream_GetClassID
(
IPersistStream
*
iface
,
...
...
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