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
aaecaf51
Commit
aaecaf51
authored
Jan 12, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmscript: COM cleanup for IDirectMusicScript.
parent
75b2ce77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
25 deletions
+34
-25
dmscript_private.h
dlls/dmscript/dmscript_private.h
+1
-1
script.c
dlls/dmscript/script.c
+33
-24
No files found.
dlls/dmscript/dmscript_private.h
View file @
aaecaf51
...
...
@@ -62,7 +62,7 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicScriptTrack (LPCGUID lpcGUID, LPVO
struct
IDirectMusicScriptImpl
{
/* IUnknown fields */
const
IUnknownVtbl
*
UnknownVtbl
;
const
IDirectMusicScriptVtbl
*
ScriptVtbl
;
IDirectMusicScript
IDirectMusicScript_iface
;
const
IDirectMusicObjectVtbl
*
ObjectVtbl
;
const
IPersistStreamVtbl
*
PersistStreamVtbl
;
LONG
ref
;
...
...
dlls/dmscript/script.c
View file @
aaecaf51
...
...
@@ -44,8 +44,8 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IUnknown_QueryInterface (LPUNKNOWN
IUnknown_AddRef
((
LPUNKNOWN
)
&
This
->
UnknownVtbl
);
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDirectMusicScript
))
{
*
ppobj
=
&
This
->
ScriptVtbl
;
IDirectMusicScript_AddRef
((
LPDIRECTMUSICSCRIPT
)
&
This
->
ScriptVtbl
);
*
ppobj
=
&
This
->
IDirectMusicScript_iface
;
IDirectMusicScript_AddRef
(
&
This
->
IDirectMusicScript_iface
);
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDirectMusicObject
))
{
*
ppobj
=
&
This
->
ObjectVtbl
;
...
...
@@ -97,30 +97,34 @@ static const IUnknownVtbl DirectMusicScript_Unknown_Vtbl = {
IDirectMusicScriptImpl_IUnknown_Release
};
/* IDirectMusicScriptImpl IDirectMusicScript part: */
static
inline
IDirectMusicScriptImpl
*
impl_from_IDirectMusicScript
(
IDirectMusicScript
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectMusicScriptImpl
,
IDirectMusicScript_iface
);
}
static
HRESULT
WINAPI
IDirectMusicScriptImpl_QueryInterface
(
IDirectMusicScript
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
return
IDirectMusicScriptImpl_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
This
->
UnknownVtbl
,
riid
,
ppobj
);
}
static
ULONG
WINAPI
IDirectMusicScriptImpl_AddRef
(
IDirectMusicScript
*
iface
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
return
IDirectMusicScriptImpl_IUnknown_AddRef
((
LPUNKNOWN
)
&
This
->
UnknownVtbl
);
}
static
ULONG
WINAPI
IDirectMusicScriptImpl_Release
(
IDirectMusicScript
*
iface
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
return
IDirectMusicScriptImpl_IUnknown_Release
((
LPUNKNOWN
)
&
This
->
UnknownVtbl
);
}
static
HRESULT
WINAPI
IDirectMusicScriptImpl_Init
(
IDirectMusicScript
*
iface
,
IDirectMusicPerformance
*
pPerformance
,
DMUS_SCRIPT_ERRORINFO
*
pErrorInfo
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %p, %p): stub
\n
"
,
This
,
pPerformance
,
pErrorInfo
);
This
->
pPerformance
=
pPerformance
;
return
S_OK
;
...
...
@@ -129,7 +133,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_Init(IDirectMusicScript *iface,
static
HRESULT
WINAPI
IDirectMusicScriptImpl_CallRoutine
(
IDirectMusicScript
*
iface
,
WCHAR
*
pwszRoutineName
,
DMUS_SCRIPT_ERRORINFO
*
pErrorInfo
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszRoutineName
),
pErrorInfo
);
/*return E_NOTIMPL;*/
return
S_OK
;
...
...
@@ -139,7 +143,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_CallRoutine(IDirectMusicScript *ifa
static
HRESULT
WINAPI
IDirectMusicScriptImpl_SetVariableVariant
(
IDirectMusicScript
*
iface
,
WCHAR
*
pwszVariableName
,
VARIANT
varValue
,
BOOL
fSetRef
,
DMUS_SCRIPT_ERRORINFO
*
pErrorInfo
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %s, FIXME, %d, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszVariableName
),
/* varValue,*/
fSetRef
,
pErrorInfo
);
return
S_OK
;
}
...
...
@@ -147,7 +151,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_SetVariableVariant(IDirectMusicScri
static
HRESULT
WINAPI
IDirectMusicScriptImpl_GetVariableVariant
(
IDirectMusicScript
*
iface
,
WCHAR
*
pwszVariableName
,
VARIANT
*
pvarValue
,
DMUS_SCRIPT_ERRORINFO
*
pErrorInfo
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %s, %p, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszVariableName
),
pvarValue
,
pErrorInfo
);
return
S_OK
;
}
...
...
@@ -155,7 +159,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_GetVariableVariant(IDirectMusicScri
static
HRESULT
WINAPI
IDirectMusicScriptImpl_SetVariableNumber
(
IDirectMusicScript
*
iface
,
WCHAR
*
pwszVariableName
,
LONG
lValue
,
DMUS_SCRIPT_ERRORINFO
*
pErrorInfo
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %s, %i, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszVariableName
),
lValue
,
pErrorInfo
);
return
S_OK
;
}
...
...
@@ -163,7 +167,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_SetVariableNumber(IDirectMusicScrip
static
HRESULT
WINAPI
IDirectMusicScriptImpl_GetVariableNumber
(
IDirectMusicScript
*
iface
,
WCHAR
*
pwszVariableName
,
LONG
*
plValue
,
DMUS_SCRIPT_ERRORINFO
*
pErrorInfo
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %s, %p, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszVariableName
),
plValue
,
pErrorInfo
);
return
S_OK
;
}
...
...
@@ -171,7 +175,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_GetVariableNumber(IDirectMusicScrip
static
HRESULT
WINAPI
IDirectMusicScriptImpl_SetVariableObject
(
IDirectMusicScript
*
iface
,
WCHAR
*
pwszVariableName
,
IUnknown
*
punkValue
,
DMUS_SCRIPT_ERRORINFO
*
pErrorInfo
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %s, %p, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszVariableName
),
punkValue
,
pErrorInfo
);
return
S_OK
;
}
...
...
@@ -179,7 +183,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_SetVariableObject(IDirectMusicScrip
static
HRESULT
WINAPI
IDirectMusicScriptImpl_GetVariableObject
(
IDirectMusicScript
*
iface
,
WCHAR
*
pwszVariableName
,
REFIID
riid
,
void
**
ppv
,
DMUS_SCRIPT_ERRORINFO
*
pErrorInfo
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %s, %s, %p, %p): stub
\n
"
,
This
,
debugstr_w
(
pwszVariableName
),
debugstr_dmguid
(
riid
),
ppv
,
pErrorInfo
);
return
S_OK
;
}
...
...
@@ -187,7 +191,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_GetVariableObject(IDirectMusicScrip
static
HRESULT
WINAPI
IDirectMusicScriptImpl_EnumRoutine
(
IDirectMusicScript
*
iface
,
DWORD
dwIndex
,
WCHAR
*
pwszName
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %d, %p): stub
\n
"
,
This
,
dwIndex
,
pwszName
);
return
S_OK
;
}
...
...
@@ -195,12 +199,12 @@ static HRESULT WINAPI IDirectMusicScriptImpl_EnumRoutine(IDirectMusicScript *ifa
static
HRESULT
WINAPI
IDirectMusicScriptImpl_EnumVariable
(
IDirectMusicScript
*
iface
,
DWORD
dwIndex
,
WCHAR
*
pwszName
)
{
I
COM_THIS_MULTI
(
IDirectMusicScriptImpl
,
ScriptVtbl
,
iface
);
I
DirectMusicScriptImpl
*
This
=
impl_from_IDirectMusicScript
(
iface
);
FIXME
(
"(%p, %d, %p): stub
\n
"
,
This
,
dwIndex
,
pwszName
);
return
S_OK
;
}
static
const
IDirectMusicScriptVtbl
DirectMusicScript_Script_V
tbl
=
{
static
const
IDirectMusicScriptVtbl
dmscript_v
tbl
=
{
IDirectMusicScriptImpl_QueryInterface
,
IDirectMusicScriptImpl_AddRef
,
IDirectMusicScriptImpl_Release
,
...
...
@@ -708,16 +712,21 @@ static const IPersistStreamVtbl DirectMusicScript_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT
WINAPI
DMUSIC_CreateDirectMusicScriptImpl
(
LPCGUID
lpcGUID
,
LPVOID
*
ppobj
,
LPUNKNOWN
pUnkOuter
)
{
IDirectMusicScriptImpl
*
obj
;
HRESULT
WINAPI
DMUSIC_CreateDirectMusicScriptImpl
(
REFIID
lpcGUID
,
void
**
ppobj
,
IUnknown
*
pUnkOuter
)
{
IDirectMusicScriptImpl
*
obj
;
*
ppobj
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectMusicScriptImpl
));
if
(
NULL
==
obj
)
{
*
ppobj
=
NULL
;
if
(
!
obj
)
return
E_OUTOFMEMORY
;
}
obj
->
UnknownVtbl
=
&
DirectMusicScript_Unknown_Vtbl
;
obj
->
ScriptVtbl
=
&
DirectMusicScript_Script_V
tbl
;
obj
->
IDirectMusicScript_iface
.
lpVtbl
=
&
dmscript_v
tbl
;
obj
->
ObjectVtbl
=
&
DirectMusicScript_Object_Vtbl
;
obj
->
PersistStreamVtbl
=
&
DirectMusicScript_PersistStream_Vtbl
;
obj
->
pDesc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DMUS_OBJECTDESC
));
...
...
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