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
d18ec193
Commit
d18ec193
authored
Sep 09, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmstyle: Use CRT allocation functions.
parent
994bcb48
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
78 deletions
+31
-78
auditiontrack.c
dlls/dmstyle/auditiontrack.c
+3
-8
chordtrack.c
dlls/dmstyle/chordtrack.c
+3
-8
commandtrack.c
dlls/dmstyle/commandtrack.c
+4
-9
dmobject.c
dlls/dmstyle/dmobject.c
+3
-4
motiftrack.c
dlls/dmstyle/motiftrack.c
+3
-8
mutetrack.c
dlls/dmstyle/mutetrack.c
+3
-8
style.c
dlls/dmstyle/style.c
+9
-25
styletrack.c
dlls/dmstyle/styletrack.c
+3
-8
No files found.
dlls/dmstyle/auditiontrack.c
View file @
d18ec193
...
@@ -77,9 +77,7 @@ static ULONG WINAPI audition_track_Release(IDirectMusicTrack8 *iface)
...
@@ -77,9 +77,7 @@ static ULONG WINAPI audition_track_Release(IDirectMusicTrack8 *iface)
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
!
ref
)
free
(
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
;
}
}
...
@@ -320,11 +318,8 @@ HRESULT create_dmauditiontrack(REFIID lpcGUID, void **ppobj)
...
@@ -320,11 +318,8 @@ HRESULT create_dmauditiontrack(REFIID lpcGUID, void **ppobj)
IDirectMusicAuditionTrack
*
track
;
IDirectMusicAuditionTrack
*
track
;
HRESULT
hr
;
HRESULT
hr
;
track
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
track
));
*
ppobj
=
NULL
;
if
(
!
track
)
{
if
(
!
(
track
=
calloc
(
1
,
sizeof
(
*
track
))))
return
E_OUTOFMEMORY
;
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
ref
=
1
;
track
->
ref
=
1
;
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicAuditionTrack
,
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicAuditionTrack
,
...
...
dlls/dmstyle/chordtrack.c
View file @
d18ec193
...
@@ -80,9 +80,7 @@ static ULONG WINAPI chord_track_Release(IDirectMusicTrack8 *iface)
...
@@ -80,9 +80,7 @@ static ULONG WINAPI chord_track_Release(IDirectMusicTrack8 *iface)
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
!
ref
)
free
(
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
;
}
}
...
@@ -419,11 +417,8 @@ HRESULT create_dmchordtrack(REFIID lpcGUID, void **ppobj)
...
@@ -419,11 +417,8 @@ HRESULT create_dmchordtrack(REFIID lpcGUID, void **ppobj)
IDirectMusicChordTrack
*
track
;
IDirectMusicChordTrack
*
track
;
HRESULT
hr
;
HRESULT
hr
;
track
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
track
));
*
ppobj
=
NULL
;
if
(
!
track
)
{
if
(
!
(
track
=
calloc
(
1
,
sizeof
(
*
track
))))
return
E_OUTOFMEMORY
;
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
ref
=
1
;
track
->
ref
=
1
;
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicChordTrack
,
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicChordTrack
,
...
...
dlls/dmstyle/commandtrack.c
View file @
d18ec193
...
@@ -79,9 +79,7 @@ static ULONG WINAPI command_track_Release(IDirectMusicTrack8 *iface)
...
@@ -79,9 +79,7 @@ static ULONG WINAPI command_track_Release(IDirectMusicTrack8 *iface)
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
!
ref
)
free
(
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
;
}
}
...
@@ -302,7 +300,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
...
@@ -302,7 +300,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
nrCommands
=
chunkSize
/
dwSizeOfStruct
;
/* and this is the number of commands */
nrCommands
=
chunkSize
/
dwSizeOfStruct
;
/* and this is the number of commands */
/* load each command separately in new entry */
/* load each command separately in new entry */
for
(
count
=
0
;
count
<
nrCommands
;
count
++
)
{
for
(
count
=
0
;
count
<
nrCommands
;
count
++
)
{
LPDMUS_PRIVATE_COMMAND
pNewCommand
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DMUS_PRIVATE_COMMAND
));
LPDMUS_PRIVATE_COMMAND
pNewCommand
=
calloc
(
1
,
sizeof
(
*
pNewCommand
));
IStream_Read
(
pStm
,
&
pNewCommand
->
pCommand
,
dwSizeOfStruct
,
NULL
);
IStream_Read
(
pStm
,
&
pNewCommand
->
pCommand
,
dwSizeOfStruct
,
NULL
);
list_add_tail
(
&
This
->
Commands
,
&
pNewCommand
->
entry
);
list_add_tail
(
&
This
->
Commands
,
&
pNewCommand
->
entry
);
}
}
...
@@ -372,11 +370,8 @@ HRESULT create_dmcommandtrack(REFIID lpcGUID, void **ppobj)
...
@@ -372,11 +370,8 @@ HRESULT create_dmcommandtrack(REFIID lpcGUID, void **ppobj)
IDirectMusicCommandTrack
*
track
;
IDirectMusicCommandTrack
*
track
;
HRESULT
hr
;
HRESULT
hr
;
track
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
track
));
*
ppobj
=
NULL
;
if
(
!
track
)
{
if
(
!
(
track
=
calloc
(
1
,
sizeof
(
*
track
))))
return
E_OUTOFMEMORY
;
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
ref
=
1
;
track
->
ref
=
1
;
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicCommandTrack
,
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicCommandTrack
,
...
...
dlls/dmstyle/dmobject.c
View file @
d18ec193
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
#include "dmusics.h"
#include "dmusics.h"
#include "dmobject.h"
#include "dmobject.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmobj
);
WINE_DEFAULT_DEBUG_CHANNEL
(
dmobj
);
WINE_DECLARE_DEBUG_CHANNEL
(
dmfile
);
WINE_DECLARE_DEBUG_CHANNEL
(
dmfile
);
...
@@ -375,7 +374,7 @@ HRESULT stream_next_chunk(IStream *stream, struct chunk_entry *chunk)
...
@@ -375,7 +374,7 @@ HRESULT stream_next_chunk(IStream *stream, struct chunk_entry *chunk)
/* Reads chunk data of the form:
/* Reads chunk data of the form:
DWORD - size of array element
DWORD - size of array element
element[] - Array of elements
element[] - Array of elements
The caller needs to
heap_
free() the array.
The caller needs to free() the array.
*/
*/
HRESULT
stream_chunk_get_array
(
IStream
*
stream
,
const
struct
chunk_entry
*
chunk
,
void
**
array
,
HRESULT
stream_chunk_get_array
(
IStream
*
stream
,
const
struct
chunk_entry
*
chunk
,
void
**
array
,
unsigned
int
*
count
,
DWORD
elem_size
)
unsigned
int
*
count
,
DWORD
elem_size
)
...
@@ -400,10 +399,10 @@ HRESULT stream_chunk_get_array(IStream *stream, const struct chunk_entry *chunk,
...
@@ -400,10 +399,10 @@ HRESULT stream_chunk_get_array(IStream *stream, const struct chunk_entry *chunk,
*
count
=
(
chunk
->
size
-
sizeof
(
DWORD
))
/
elem_size
;
*
count
=
(
chunk
->
size
-
sizeof
(
DWORD
))
/
elem_size
;
size
=
*
count
*
elem_size
;
size
=
*
count
*
elem_size
;
if
(
!
(
*
array
=
heap_
alloc
(
size
)))
if
(
!
(
*
array
=
m
alloc
(
size
)))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
stream_read
(
stream
,
*
array
,
size
)))
{
if
(
FAILED
(
hr
=
stream_read
(
stream
,
*
array
,
size
)))
{
heap_
free
(
*
array
);
free
(
*
array
);
*
array
=
NULL
;
*
array
=
NULL
;
return
hr
;
return
hr
;
}
}
...
...
dlls/dmstyle/motiftrack.c
View file @
d18ec193
...
@@ -77,9 +77,7 @@ static ULONG WINAPI motif_track_Release(IDirectMusicTrack8 *iface)
...
@@ -77,9 +77,7 @@ static ULONG WINAPI motif_track_Release(IDirectMusicTrack8 *iface)
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
!
ref
)
free
(
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
;
}
}
...
@@ -292,11 +290,8 @@ HRESULT create_dmmotiftrack(REFIID lpcGUID, void **ppobj)
...
@@ -292,11 +290,8 @@ HRESULT create_dmmotiftrack(REFIID lpcGUID, void **ppobj)
IDirectMusicMotifTrack
*
track
;
IDirectMusicMotifTrack
*
track
;
HRESULT
hr
;
HRESULT
hr
;
track
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
track
));
*
ppobj
=
NULL
;
if
(
!
track
)
{
if
(
!
(
track
=
calloc
(
1
,
sizeof
(
*
track
))))
return
E_OUTOFMEMORY
;
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
ref
=
1
;
track
->
ref
=
1
;
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicMotifTrack
,
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicMotifTrack
,
...
...
dlls/dmstyle/mutetrack.c
View file @
d18ec193
...
@@ -77,9 +77,7 @@ static ULONG WINAPI mute_track_Release(IDirectMusicTrack8 *iface)
...
@@ -77,9 +77,7 @@ static ULONG WINAPI mute_track_Release(IDirectMusicTrack8 *iface)
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
!
ref
)
free
(
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
;
}
}
...
@@ -301,11 +299,8 @@ HRESULT create_dmmutetrack(REFIID lpcGUID, void **ppobj)
...
@@ -301,11 +299,8 @@ HRESULT create_dmmutetrack(REFIID lpcGUID, void **ppobj)
IDirectMusicMuteTrack
*
track
;
IDirectMusicMuteTrack
*
track
;
HRESULT
hr
;
HRESULT
hr
;
track
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
track
));
*
ppobj
=
NULL
;
if
(
!
track
)
{
if
(
!
(
track
=
calloc
(
1
,
sizeof
(
*
track
))))
return
E_OUTOFMEMORY
;
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
ref
=
1
;
track
->
ref
=
1
;
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicMuteTrack
,
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicMuteTrack
,
...
...
dlls/dmstyle/style.c
View file @
d18ec193
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#include "dmstyle_private.h"
#include "dmstyle_private.h"
#include "dmobject.h"
#include "dmobject.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmstyle
);
WINE_DEFAULT_DEBUG_CHANNEL
(
dmstyle
);
WINE_DECLARE_DEBUG_CHANNEL
(
dmfile
);
WINE_DECLARE_DEBUG_CHANNEL
(
dmfile
);
...
@@ -116,17 +115,17 @@ static ULONG WINAPI IDirectMusicStyle8Impl_Release(IDirectMusicStyle8 *iface)
...
@@ -116,17 +115,17 @@ static ULONG WINAPI IDirectMusicStyle8Impl_Release(IDirectMusicStyle8 *iface)
list_remove
(
&
band
->
entry
);
list_remove
(
&
band
->
entry
);
if
(
band
->
pBand
)
if
(
band
->
pBand
)
IDirectMusicBand_Release
(
band
->
pBand
);
IDirectMusicBand_Release
(
band
->
pBand
);
heap_
free
(
band
);
free
(
band
);
}
}
LIST_FOR_EACH_ENTRY_SAFE
(
motif
,
motif2
,
&
This
->
motifs
,
struct
style_motif
,
entry
)
{
LIST_FOR_EACH_ENTRY_SAFE
(
motif
,
motif2
,
&
This
->
motifs
,
struct
style_motif
,
entry
)
{
list_remove
(
&
motif
->
entry
);
list_remove
(
&
motif
->
entry
);
LIST_FOR_EACH_ENTRY_SAFE
(
item
,
item2
,
&
motif
->
Items
,
struct
style_partref_item
,
entry
)
{
LIST_FOR_EACH_ENTRY_SAFE
(
item
,
item2
,
&
motif
->
Items
,
struct
style_partref_item
,
entry
)
{
list_remove
(
&
item
->
entry
);
list_remove
(
&
item
->
entry
);
heap_
free
(
item
);
free
(
item
);
}
}
heap_
free
(
motif
);
free
(
motif
);
}
}
heap_
free
(
This
);
free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -405,11 +404,7 @@ static HRESULT parse_part_ref_list(DMUS_PRIVATE_CHUNK *pChunk, IStream *pStm,
...
@@ -405,11 +404,7 @@ static HRESULT parse_part_ref_list(DMUS_PRIVATE_CHUNK *pChunk, IStream *pStm,
switch
(
Chunk
.
fccID
)
{
switch
(
Chunk
.
fccID
)
{
case
DMUS_FOURCC_PARTREF_CHUNK
:
{
case
DMUS_FOURCC_PARTREF_CHUNK
:
{
TRACE_
(
dmfile
)(
": PartRef chunk
\n
"
);
TRACE_
(
dmfile
)(
": PartRef chunk
\n
"
);
pNewItem
=
heap_alloc_zero
(
sizeof
(
*
pNewItem
));
if
(
!
(
pNewItem
=
calloc
(
1
,
sizeof
(
*
pNewItem
))))
return
E_OUTOFMEMORY
;
if
(
!
pNewItem
)
{
ERR
(
": no more memory
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
IStream_Read
(
pStm
,
&
pNewItem
->
part_ref
,
sizeof
(
DMUS_IO_PARTREF
),
NULL
);
hr
=
IStream_Read
(
pStm
,
&
pNewItem
->
part_ref
,
sizeof
(
DMUS_IO_PARTREF
),
NULL
);
/*TRACE_(dmfile)(" - sizeof %lu\n", sizeof(DMUS_IO_PARTREF));*/
/*TRACE_(dmfile)(" - sizeof %lu\n", sizeof(DMUS_IO_PARTREF));*/
list_add_tail
(
&
pNewMotif
->
Items
,
&
pNewItem
->
entry
);
list_add_tail
(
&
pNewMotif
->
Items
,
&
pNewItem
->
entry
);
...
@@ -630,11 +625,7 @@ static HRESULT parse_pattern_list(IDirectMusicStyle8Impl *This, DMUS_PRIVATE_CHU
...
@@ -630,11 +625,7 @@ static HRESULT parse_pattern_list(IDirectMusicStyle8Impl *This, DMUS_PRIVATE_CHU
case
DMUS_FOURCC_PATTERN_CHUNK
:
{
case
DMUS_FOURCC_PATTERN_CHUNK
:
{
TRACE_
(
dmfile
)(
": Pattern chunk
\n
"
);
TRACE_
(
dmfile
)(
": Pattern chunk
\n
"
);
/** alloc new motif entry */
/** alloc new motif entry */
pNewMotif
=
heap_alloc_zero
(
sizeof
(
*
pNewMotif
));
if
(
!
(
pNewMotif
=
calloc
(
1
,
sizeof
(
*
pNewMotif
))))
return
E_OUTOFMEMORY
;
if
(
NULL
==
pNewMotif
)
{
ERR
(
": no more memory
\n
"
);
return
E_OUTOFMEMORY
;
}
list_add_tail
(
&
This
->
motifs
,
&
pNewMotif
->
entry
);
list_add_tail
(
&
This
->
motifs
,
&
pNewMotif
->
entry
);
IStream_Read
(
pStm
,
&
pNewMotif
->
pattern
,
Chunk
.
dwSize
,
NULL
);
IStream_Read
(
pStm
,
&
pNewMotif
->
pattern
,
Chunk
.
dwSize
,
NULL
);
...
@@ -826,11 +817,7 @@ static HRESULT parse_style_form(IDirectMusicStyle8Impl *This, DMUS_PRIVATE_CHUNK
...
@@ -826,11 +817,7 @@ static HRESULT parse_style_form(IDirectMusicStyle8Impl *This, DMUS_PRIVATE_CHUNK
return
hr
;
return
hr
;
}
}
pNewBand
=
heap_alloc_zero
(
sizeof
(
*
pNewBand
));
if
(
!
(
pNewBand
=
calloc
(
1
,
sizeof
(
*
pNewBand
))))
return
E_OUTOFMEMORY
;
if
(
NULL
==
pNewBand
)
{
ERR
(
": no more memory
\n
"
);
return
E_OUTOFMEMORY
;
}
pNewBand
->
pBand
=
pBand
;
pNewBand
->
pBand
=
pBand
;
IDirectMusicBand_AddRef
(
pBand
);
IDirectMusicBand_AddRef
(
pBand
);
list_add_tail
(
&
This
->
bands
,
&
pNewBand
->
entry
);
list_add_tail
(
&
This
->
bands
,
&
pNewBand
->
entry
);
...
@@ -977,11 +964,8 @@ HRESULT create_dmstyle(REFIID lpcGUID, void **ppobj)
...
@@ -977,11 +964,8 @@ HRESULT create_dmstyle(REFIID lpcGUID, void **ppobj)
IDirectMusicStyle8Impl
*
obj
;
IDirectMusicStyle8Impl
*
obj
;
HRESULT
hr
;
HRESULT
hr
;
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectMusicStyle8Impl
));
*
ppobj
=
NULL
;
if
(
NULL
==
obj
)
{
if
(
!
(
obj
=
calloc
(
1
,
sizeof
(
*
obj
))))
return
E_OUTOFMEMORY
;
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
obj
->
IDirectMusicStyle8_iface
.
lpVtbl
=
&
dmstyle8_vtbl
;
obj
->
IDirectMusicStyle8_iface
.
lpVtbl
=
&
dmstyle8_vtbl
;
obj
->
ref
=
1
;
obj
->
ref
=
1
;
dmobject_init
(
&
obj
->
dmobj
,
&
CLSID_DirectMusicStyle
,
(
IUnknown
*
)
&
obj
->
IDirectMusicStyle8_iface
);
dmobject_init
(
&
obj
->
dmobj
,
&
CLSID_DirectMusicStyle
,
(
IUnknown
*
)
&
obj
->
IDirectMusicStyle8_iface
);
...
...
dlls/dmstyle/styletrack.c
View file @
d18ec193
...
@@ -20,8 +20,6 @@
...
@@ -20,8 +20,6 @@
#include "dmstyle_private.h"
#include "dmstyle_private.h"
#include "dmobject.h"
#include "dmobject.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmstyle
);
WINE_DEFAULT_DEBUG_CHANNEL
(
dmstyle
);
/*****************************************************************************
/*****************************************************************************
...
@@ -95,7 +93,7 @@ static ULONG WINAPI style_track_Release(IDirectMusicTrack8 *iface)
...
@@ -95,7 +93,7 @@ static ULONG WINAPI style_track_Release(IDirectMusicTrack8 *iface)
free
(
item
);
free
(
item
);
}
}
heap_
free
(
This
);
free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -390,11 +388,8 @@ HRESULT create_dmstyletrack(REFIID lpcGUID, void **ppobj)
...
@@ -390,11 +388,8 @@ HRESULT create_dmstyletrack(REFIID lpcGUID, void **ppobj)
IDirectMusicStyleTrack
*
track
;
IDirectMusicStyleTrack
*
track
;
HRESULT
hr
;
HRESULT
hr
;
track
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
track
));
*
ppobj
=
NULL
;
if
(
!
track
)
{
if
(
!
(
track
=
calloc
(
1
,
sizeof
(
*
track
))))
return
E_OUTOFMEMORY
;
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
ref
=
1
;
track
->
ref
=
1
;
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicStyleTrack
,
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicStyleTrack
,
...
...
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