<div dir="ltr"><div>Thanks a lot!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 22, 2022 at 12:08 AM Michael Stefaniuc <<a href="mailto:mstefani@winehq.org">mstefani@winehq.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 1/21/22 11:20, David Kahurani wrote:<br>
> Just a question. Why is it preferable to get rid of the typedef?<br>
It is an internal object and not some opaque type to be used by applications or <br>
even other parts of Wine. So no point to obfuscate the fact that it is a struct, <br>
especially as the code needs to access the struct fields.<br>
<br>
This is the reason to not add more of those typedefs but for me not necessary a <br>
reason to remove it(*). But there were more:<br>
<br>
- I wanted to get rid of the "_SynthPortImpl_" from the function names as stuff <br>
like impl_from_SynthPortImpl_IDirectMusicPort is uneededly long.<br>
Changing those changed the majority of the lines with the SynthPortImpl type <br>
usage. Yes, I have introduced that specific function name but I was young and <br>
needed the money and followed the existing naming scheme<br>
<br>
- The impl_from_IFace helpers needed to be standardized too as we have 2-3 <br>
IDirectMusicPort implementations in the same C file.<br>
<br>
- The camel case notation is frowned upon in Wine. While naming the COM object <br>
type IMainInterfaceImpl is common, SynthPortImpl isn't following that standard. <br>
So it evades my visual pattern matching.<br>
<br>
<br>
(*) Other maintainers will accept such patches but I'll reject those that just <br>
remove the typedef, e.g. IDirectMusic8Impl, even with a rename to not use camel <br>
case. That would be just noise and there are bigger fish to fry in DirectMusic.<br>
<br>
<br>
bye<br>
        michael<br>
<br>
<br>
<br>
> <br>
> On Thu, Jan 20, 2022 at 11:20 PM Michael Stefaniuc <<a href="mailto:mstefani@winehq.org" target="_blank">mstefani@winehq.org</a> <br>
> <mailto:<a href="mailto:mstefani@winehq.org" target="_blank">mstefani@winehq.org</a>>> wrote:<br>
> <br>
>     and rename the iface to obj helpers.<br>
> <br>
>     Signed-off-by: Michael Stefaniuc <<a href="mailto:mstefani@winehq.org" target="_blank">mstefani@winehq.org</a><br>
>     <mailto:<a href="mailto:mstefani@winehq.org" target="_blank">mstefani@winehq.org</a>>><br>
>     ---<br>
>       dlls/dmusic/port.c | 96 +++++++++++++++++++++++-----------------------<br>
>       1 file changed, 48 insertions(+), 48 deletions(-)<br>
> <br>
>     diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c<br>
>     index 88c7c60a50d..c51b33ce9c3 100644<br>
>     --- a/dlls/dmusic/port.c<br>
>     +++ b/dlls/dmusic/port.c<br>
>     @@ -26,7 +26,7 @@<br>
> <br>
>       WINE_DEFAULT_DEBUG_CHANNEL(dmusic);<br>
> <br>
>     -typedef struct SynthPortImpl {<br>
>     +struct synth_port {<br>
>           IDirectMusicPort IDirectMusicPort_iface;<br>
>           IDirectMusicPortDownload IDirectMusicPortDownload_iface;<br>
>           IDirectMusicThru IDirectMusicThru_iface;<br>
>     @@ -43,31 +43,31 @@ typedef struct SynthPortImpl {<br>
>           DMUS_PORTPARAMS params;<br>
>           int nrofgroups;<br>
>           DMUSIC_PRIVATE_CHANNEL_GROUP group[1];<br>
>     -} SynthPortImpl;<br>
>     +};<br>
> <br>
>       static inline IDirectMusicDownloadedInstrumentImpl*<br>
>     impl_from_IDirectMusicDownloadedInstrument(IDirectMusicDownloadedInstrument<br>
>     *iface)<br>
>       {<br>
>           return CONTAINING_RECORD(iface, IDirectMusicDownloadedInstrumentImpl,<br>
>     IDirectMusicDownloadedInstrument_iface);<br>
>       }<br>
> <br>
>     -static inline SynthPortImpl<br>
>     *impl_from_SynthPortImpl_IDirectMusicPort(IDirectMusicPort *iface)<br>
>     +static inline struct synth_port<br>
>     *synth_from_IDirectMusicPort(IDirectMusicPort *iface)<br>
>       {<br>
>     -    return CONTAINING_RECORD(iface, SynthPortImpl, IDirectMusicPort_iface);<br>
>     +    return CONTAINING_RECORD(iface, struct synth_port, IDirectMusicPort_iface);<br>
>       }<br>
> <br>
>     -static inline SynthPortImpl<br>
>     *impl_from_SynthPortImpl_IDirectMusicPortDownload(IDirectMusicPortDownload<br>
>     *iface)<br>
>     +static inline struct synth_port<br>
>     *synth_from_IDirectMusicPortDownload(IDirectMusicPortDownload *iface)<br>
>       {<br>
>     -    return CONTAINING_RECORD(iface, SynthPortImpl,<br>
>     IDirectMusicPortDownload_iface);<br>
>     +    return CONTAINING_RECORD(iface, struct synth_port,<br>
>     IDirectMusicPortDownload_iface);<br>
>       }<br>
> <br>
>     -static inline SynthPortImpl<br>
>     *impl_from_SynthPortImpl_IDirectMusicThru(IDirectMusicThru *iface)<br>
>     +static inline struct synth_port<br>
>     *synth_from_IDirectMusicThru(IDirectMusicThru *iface)<br>
>       {<br>
>     -    return CONTAINING_RECORD(iface, SynthPortImpl, IDirectMusicThru_iface);<br>
>     +    return CONTAINING_RECORD(iface, struct synth_port, IDirectMusicThru_iface);<br>
>       }<br>
> <br>
>     -static inline SynthPortImpl *impl_from_IKsControl(IKsControl *iface)<br>
>     +static inline struct synth_port *synth_from_IKsControl(IKsControl *iface)<br>
>       {<br>
>     -    return CONTAINING_RECORD(iface, SynthPortImpl, IKsControl_iface);<br>
>     +    return CONTAINING_RECORD(iface, struct synth_port, IKsControl_iface);<br>
>       }<br>
> <br>
>       /* IDirectMusicDownloadedInstrument IUnknown part follows: */<br>
>     @@ -152,7 +152,7 @@ static HRESULT<br>
>     DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(IDirectMusicDown<br>
>       /* SynthPortImpl IDirectMusicPort IUnknown part follows: */<br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_QueryInterface(LPDIRECTMUSICPORT iface,<br>
>     REFIID riid, LPVOID *ret_iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid),<br>
>     ret_iface);<br>
> <br>
>     @@ -177,7 +177,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_QueryInterface(LPDIRECTMUSI<br>
> <br>
>       static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_AddRef(LPDIRECTMUSICPORT iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
>           ULONG ref = InterlockedIncrement(&This->ref);<br>
> <br>
>           TRACE("(%p)->(): new ref = %u\n", This, ref);<br>
>     @@ -189,7 +189,7 @@ static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_AddRef(LPDIRECTMUSICPORT ifac<br>
> <br>
>       static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_Release(LPDIRECTMUSICPORT iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
>           ULONG ref = InterlockedDecrement(&This->ref);<br>
> <br>
>           TRACE("(%p)->(): new ref = %u\n", This, ref);<br>
>     @@ -217,7 +217,7 @@ static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_Release(LPDIRECTMUSICPORT ifa<br>
>       /* SynthPortImpl IDirectMusicPort interface follows: */<br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_PlayBuffer(LPDIRECTMUSICPORT iface,<br>
>     LPDIRECTMUSICBUFFER buffer)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
>           HRESULT hr;<br>
>           REFERENCE_TIME time;<br>
>           LPBYTE data;<br>
>     @@ -244,7 +244,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_PlayBuffer(LPDIRECTMUSICPOR<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle(LPDIRECTMUSICPORT<br>
>     iface, HANDLE event)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%p): stub\n", iface, This, event);<br>
> <br>
>     @@ -253,7 +253,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle(L<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_Read(LPDIRECTMUSICPORT iface,<br>
>     LPDIRECTMUSICBUFFER buffer)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%p): stub\n", iface, This, buffer);<br>
> <br>
>     @@ -262,7 +262,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_Read(LPDIRECTMUSICPORT ifac<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_DownloadInstrument(LPDIRECTMUSICPORT iface,<br>
>     IDirectMusicInstrument* instrument, IDirectMusicDownloadedInstrument**<br>
>     downloaded_instrument, DMUS_NOTERANGE* note_ranges, DWORD num_note_ranges)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
>           IDirectMusicInstrumentImpl *instrument_object;<br>
>           HRESULT ret;<br>
>           BOOL free;<br>
>     @@ -348,7 +348,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_DownloadInstrument(LPDIRECT<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_UnloadInstrument(LPDIRECTMUSICPORT iface,<br>
>     IDirectMusicDownloadedInstrument *downloaded_instrument)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
>           IDirectMusicDownloadedInstrumentImpl *downloaded_object =<br>
>     unsafe_impl_from_IDirectMusicDownloadedInstrument(downloaded_instrument);<br>
> <br>
>           TRACE("(%p/%p)->(%p)\n", iface, This, downloaded_instrument);<br>
>     @@ -368,7 +368,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_UnloadInstrument(LPDIRECTMU<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetLatencyClock(LPDIRECTMUSICPORT iface,<br>
>     IReferenceClock** clock)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           TRACE("(%p/%p)->(%p)\n", iface, This, clock);<br>
> <br>
>     @@ -380,7 +380,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetLatencyClock(LPDIRECTMUS<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetRunningStats(LPDIRECTMUSICPORT iface,<br>
>     LPDMUS_SYNTHSTATS stats)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%p): stub\n", iface, This, stats);<br>
> <br>
>     @@ -389,7 +389,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetRunningStats(LPDIRECTMUS<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_Compact(LPDIRECTMUSICPORT iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           FIXME("(%p/%p)->(): stub\n", iface, This);<br>
> <br>
>     @@ -398,7 +398,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_Compact(LPDIRECTMUSICPORT i<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetCaps(LPDIRECTMUSICPORT iface,<br>
>     LPDMUS_PORTCAPS port_caps)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           TRACE("(%p/%p)->(%p)\n", iface, This, port_caps);<br>
> <br>
>     @@ -410,7 +410,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetCaps(LPDIRECTMUSICPORT i<br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_DeviceIoControl(LPDIRECTMUSICPORT iface,<br>
>     DWORD io_control_code, LPVOID in_buffer, DWORD in_buffer_size,<br>
>                                                                  LPVOID<br>
>     out_buffer, DWORD out_buffer_size, LPDWORD bytes_returned, LPOVERLAPPED<br>
>     overlapped)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%d, %p, %d, %p, %d, %p, %p): stub\n", iface, This,<br>
>     io_control_code, in_buffer, in_buffer_size, out_buffer, out_buffer_size,<br>
>     bytes_returned, overlapped);<br>
> <br>
>     @@ -419,7 +419,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_DeviceIoControl(LPDIRECTMUS<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_SetNumChannelGroups(LPDIRECTMUSICPORT iface,<br>
>     DWORD channel_groups)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%d): semi-stub\n", iface, This, channel_groups);<br>
> <br>
>     @@ -430,7 +430,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_SetNumChannelGroups(LPDIREC<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetNumChannelGroups(LPDIRECTMUSICPORT iface,<br>
>     LPDWORD channel_groups)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           TRACE("(%p/%p)->(%p)\n", iface, This, channel_groups);<br>
> <br>
>     @@ -441,7 +441,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetNumChannelGroups(LPDIREC<br>
> <br>
>       static HRESULT WINAPI synth_dmport_Activate(IDirectMusicPort *iface, BOOL<br>
>     active)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%d): semi-stub\n", iface, This, active);<br>
> <br>
>     @@ -470,7 +470,7 @@ static HRESULT WINAPI<br>
>     synth_dmport_Activate(IDirectMusicPort *iface, BOOL active<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_SetChannelPriority(LPDIRECTMUSICPORT iface,<br>
>     DWORD channel_group, DWORD channel, DWORD priority)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%d, %d, %d): semi-stub\n", iface, This,<br>
>     channel_group, channel, priority);<br>
> <br>
>     @@ -485,7 +485,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_SetChannelPriority(LPDIRECT<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetChannelPriority(LPDIRECTMUSICPORT iface,<br>
>     DWORD channel_group, DWORD channel, LPDWORD priority)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           TRACE("(%p/%p)->(%u, %u, %p)\n", iface, This, channel_group, channel,<br>
>     priority);<br>
> <br>
>     @@ -497,7 +497,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetChannelPriority(LPDIRECT<br>
>       static HRESULT WINAPI synth_dmport_SetDirectSound(IDirectMusicPort *iface,<br>
>     IDirectSound *dsound,<br>
>               IDirectSoundBuffer *dsbuffer)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%p, %p): semi-stub\n", iface, This, dsound, dsbuffer);<br>
> <br>
>     @@ -527,7 +527,7 @@ static HRESULT WINAPI<br>
>     synth_dmport_SetDirectSound(IDirectMusicPort *iface, IDire<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPort_GetFormat(LPDIRECTMUSICPORT iface,<br>
>     LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD<br>
>     pdwBufferSize)<br>
>       {<br>
>     -       SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);<br>
>     +       struct synth_port *This = synth_from_IDirectMusicPort(iface);<br>
>              WAVEFORMATEX format;<br>
>              FIXME("(%p, %p, %p, %p): stub\n", This, pWaveFormatEx,<br>
>     pdwWaveFormatExSize, pdwBufferSize);<br>
> <br>
>     @@ -598,7 +598,7 @@ static const IDirectMusicPortVtbl<br>
>     SynthPortImpl_DirectMusicPort_Vtbl = {<br>
>       /* SynthPortImpl IDirectMusicPortDownload IUnknown part follows: */<br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_QueryInterface(LPDIRECTMUSICPORTDOWNLOAD<br>
>     iface, REFIID riid, LPVOID *ret_iface)<br>
>       {<br>
>     -    SynthPortImpl *This =<br>
>     impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPortDownload(iface);<br>
> <br>
>           TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid),<br>
>     ret_iface);<br>
> <br>
>     @@ -607,7 +607,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_QueryInterface(LPDI<br>
> <br>
>       static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_AddRef<br>
>     (LPDIRECTMUSICPORTDOWNLOAD iface)<br>
>       {<br>
>     -    SynthPortImpl *This =<br>
>     impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPortDownload(iface);<br>
> <br>
>           TRACE("(%p/%p)->()\n", iface, This);<br>
> <br>
>     @@ -616,7 +616,7 @@ static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_AddRef (LPDIRECTMUSIC<br>
> <br>
>       static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_Release(LPDIRECTMUSICPORTDOWNLOAD iface)<br>
>       {<br>
>     -    SynthPortImpl *This =<br>
>     impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPortDownload(iface);<br>
> <br>
>           TRACE("(%p/%p)->()\n", iface, This);<br>
> <br>
>     @@ -626,7 +626,7 @@ static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_Release(LPDIRECTMUSIC<br>
>       /* SynthPortImpl IDirectMusicPortDownload Interface follows: */<br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_GetBuffer(LPDIRECTMUSICPORTDOWNLOAD<br>
>     iface, DWORD DLId, IDirectMusicDownload** IDMDownload)<br>
>       {<br>
>     -    SynthPortImpl *This =<br>
>     impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPortDownload(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%u, %p): stub\n", iface, This, DLId, IDMDownload);<br>
> <br>
>     @@ -638,7 +638,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_GetBuffer(LPDIRECTM<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer(LPDIRECTMUSICPORTDOWNLOAD<br>
>     iface, DWORD size, IDirectMusicDownload** IDMDownload)<br>
>       {<br>
>     -    SynthPortImpl *This =<br>
>     impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPortDownload(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%u, %p): stub\n", iface, This, size, IDMDownload);<br>
> <br>
>     @@ -647,7 +647,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer(LPDI<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_GetDLId(LPDIRECTMUSICPORTDOWNLOAD<br>
>     iface, DWORD* start_DLId, DWORD count)<br>
>       {<br>
>     -    SynthPortImpl *This =<br>
>     impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPortDownload(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%p, %u): stub\n", iface, This, start_DLId, count);<br>
> <br>
>     @@ -656,7 +656,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_GetDLId(LPDIRECTMUS<br>
> <br>
>       static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetAppend<br>
>     (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* append)<br>
>       {<br>
>     -    SynthPortImpl *This =<br>
>     impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPortDownload(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%p): stub\n", iface, This, append);<br>
> <br>
>     @@ -665,7 +665,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_GetAppend (LPDIRECT<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_Download(LPDIRECTMUSICPORTDOWNLOAD<br>
>     iface, IDirectMusicDownload* IDMDownload)<br>
>       {<br>
>     -    SynthPortImpl *This =<br>
>     impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPortDownload(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload);<br>
> <br>
>     @@ -674,7 +674,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_Download(LPDIRECTMU<br>
> <br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicPortDownload_Unload(LPDIRECTMUSICPORTDOWNLOAD<br>
>     iface, IDirectMusicDownload* IDMDownload)<br>
>       {<br>
>     -    SynthPortImpl *This =<br>
>     impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicPortDownload(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload);<br>
> <br>
>     @@ -698,7 +698,7 @@ static const IDirectMusicPortDownloadVtbl<br>
>     SynthPortImpl_DirectMusicPortDownload_<br>
>       /* SynthPortImpl IDirectMusicThru IUnknown part follows: */<br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicThru_QueryInterface(LPDIRECTMUSICTHRU iface,<br>
>     REFIID riid, LPVOID *ret_iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicThru(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicThru(iface);<br>
> <br>
>           TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid),<br>
>     ret_iface);<br>
> <br>
>     @@ -707,7 +707,7 @@ static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicThru_QueryInterface(LPDIRECTMUSI<br>
> <br>
>       static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicThru_AddRef(LPDIRECTMUSICTHRU iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicThru(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicThru(iface);<br>
> <br>
>           TRACE("(%p/%p)->()\n", iface, This);<br>
> <br>
>     @@ -716,7 +716,7 @@ static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicThru_AddRef(LPDIRECTMUSICTHRU ifac<br>
> <br>
>       static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicThru_Release(LPDIRECTMUSICTHRU iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicThru(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicThru(iface);<br>
> <br>
>           TRACE("(%p/%p)->()\n", iface, This);<br>
> <br>
>     @@ -727,7 +727,7 @@ static ULONG WINAPI<br>
>     SynthPortImpl_IDirectMusicThru_Release(LPDIRECTMUSICTHRU ifa<br>
>       static HRESULT WINAPI<br>
>     SynthPortImpl_IDirectMusicThru_ThruChannel(LPDIRECTMUSICTHRU iface, DWORD<br>
>     source_channel_group, DWORD source_channel, DWORD destination_channel_group,<br>
>                                                              DWORD<br>
>     destination_channel, LPDIRECTMUSICPORT destination_port)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicThru(iface);<br>
>     +    struct synth_port *This = synth_from_IDirectMusicThru(iface);<br>
> <br>
>           FIXME("(%p/%p)->(%d, %d, %d, %d, %p): stub\n", iface, This,<br>
>     source_channel_group, source_channel, destination_channel_group,<br>
>     destination_channel, destination_port);<br>
> <br>
>     @@ -746,21 +746,21 @@ static const IDirectMusicThruVtbl<br>
>     SynthPortImpl_DirectMusicThru_Vtbl = {<br>
>       static HRESULT WINAPI IKsControlImpl_QueryInterface(IKsControl *iface,<br>
>     REFIID riid,<br>
>               void **ret_iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_IKsControl(iface);<br>
>     +    struct synth_port *This = synth_from_IKsControl(iface);<br>
> <br>
>           return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface,<br>
>     riid, ret_iface);<br>
>       }<br>
> <br>
>       static ULONG WINAPI IKsControlImpl_AddRef(IKsControl *iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_IKsControl(iface);<br>
>     +    struct synth_port *This = synth_from_IKsControl(iface);<br>
> <br>
>           return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);<br>
>       }<br>
> <br>
>       static ULONG WINAPI IKsControlImpl_Release(IKsControl *iface)<br>
>       {<br>
>     -    SynthPortImpl *This = impl_from_IKsControl(iface);<br>
>     +    struct synth_port *This = synth_from_IKsControl(iface);<br>
> <br>
>           return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);<br>
>       }<br>
>     @@ -815,7 +815,7 @@ static const IKsControlVtbl ikscontrol_vtbl = {<br>
>       HRESULT synth_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS<br>
>     *port_params,<br>
>               DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)<br>
>       {<br>
>     -    SynthPortImpl *obj;<br>
>     +    struct synth_port *obj;<br>
>           HRESULT hr = E_FAIL;<br>
>           int i;<br>
> <br>
>     @@ -823,7 +823,7 @@ HRESULT synth_port_create(IDirectMusic8Impl *parent,<br>
>     DMUS_PORTPARAMS *port_param<br>
> <br>
>           *port = NULL;<br>
> <br>
>     -    obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SynthPortImpl));<br>
>     +    obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*obj));<br>
>           if (!obj)<br>
>               return E_OUTOFMEMORY;<br>
> <br>
>     -- <br>
>     2.31.1<br>
> <br>
> <br>
<br>
</blockquote></div></div>