<div dir="ltr">Hello,<div><br></div><div>Just a question. Why is it preferable to get rid of the typedef?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 20, 2022 at 11:20 PM 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">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>
---<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* impl_from_IDirectMusicDownloadedInstrument(IDirectMusicDownloadedInstrument *iface)<br>
 {<br>
     return CONTAINING_RECORD(iface, IDirectMusicDownloadedInstrumentImpl, IDirectMusicDownloadedInstrument_iface);<br>
 }<br>
<br>
-static inline SynthPortImpl *impl_from_SynthPortImpl_IDirectMusicPort(IDirectMusicPort *iface)<br>
+static inline struct synth_port *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 *impl_from_SynthPortImpl_IDirectMusicPortDownload(IDirectMusicPortDownload *iface)<br>
+static inline struct synth_port *synth_from_IDirectMusicPortDownload(IDirectMusicPortDownload *iface)<br>
 {<br>
-    return CONTAINING_RECORD(iface, SynthPortImpl, IDirectMusicPortDownload_iface);<br>
+    return CONTAINING_RECORD(iface, struct synth_port, IDirectMusicPortDownload_iface);<br>
 }<br>
<br>
-static inline SynthPortImpl *impl_from_SynthPortImpl_IDirectMusicThru(IDirectMusicThru *iface)<br>
+static inline struct synth_port *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 DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(IDirectMusicDown<br>
 /* SynthPortImpl IDirectMusicPort IUnknown part follows: */<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_QueryInterface(LPDIRECTMUSICPORT iface, 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), ret_iface);<br>
<br>
@@ -177,7 +177,7 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_QueryInterface(LPDIRECTMUSI<br>
<br>
 static ULONG WINAPI 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 SynthPortImpl_IDirectMusicPort_AddRef(LPDIRECTMUSICPORT ifac<br>
<br>
 static ULONG WINAPI 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 SynthPortImpl_IDirectMusicPort_Release(LPDIRECTMUSICPORT ifa<br>
 /* SynthPortImpl IDirectMusicPort interface follows: */<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_PlayBuffer(LPDIRECTMUSICPORT iface, 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 SynthPortImpl_IDirectMusicPort_PlayBuffer(LPDIRECTMUSICPOR<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle(LPDIRECTMUSICPORT 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 SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle(L<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Read(LPDIRECTMUSICPORT iface, 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 SynthPortImpl_IDirectMusicPort_Read(LPDIRECTMUSICPORT ifac<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DownloadInstrument(LPDIRECTMUSICPORT iface, IDirectMusicInstrument* instrument, IDirectMusicDownloadedInstrument** 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 SynthPortImpl_IDirectMusicPort_DownloadInstrument(LPDIRECT<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_UnloadInstrument(LPDIRECTMUSICPORT iface, 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 = 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 SynthPortImpl_IDirectMusicPort_UnloadInstrument(LPDIRECTMU<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetLatencyClock(LPDIRECTMUSICPORT iface, 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 SynthPortImpl_IDirectMusicPort_GetLatencyClock(LPDIRECTMUS<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetRunningStats(LPDIRECTMUSICPORT iface, 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 SynthPortImpl_IDirectMusicPort_GetRunningStats(LPDIRECTMUS<br>
<br>
 static HRESULT WINAPI 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 SynthPortImpl_IDirectMusicPort_Compact(LPDIRECTMUSICPORT i<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetCaps(LPDIRECTMUSICPORT iface, 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 SynthPortImpl_IDirectMusicPort_GetCaps(LPDIRECTMUSICPORT i<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DeviceIoControl(LPDIRECTMUSICPORT iface, DWORD io_control_code, LPVOID in_buffer, DWORD in_buffer_size,<br>
                                                            LPVOID out_buffer, DWORD out_buffer_size, LPDWORD bytes_returned, LPOVERLAPPED 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, io_control_code, in_buffer, in_buffer_size, out_buffer, out_buffer_size, bytes_returned, overlapped);<br>
<br>
@@ -419,7 +419,7 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DeviceIoControl(LPDIRECTMUS<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetNumChannelGroups(LPDIRECTMUSICPORT iface, 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 SynthPortImpl_IDirectMusicPort_SetNumChannelGroups(LPDIREC<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetNumChannelGroups(LPDIRECTMUSICPORT iface, 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 SynthPortImpl_IDirectMusicPort_GetNumChannelGroups(LPDIREC<br>
<br>
 static HRESULT WINAPI synth_dmport_Activate(IDirectMusicPort *iface, BOOL 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 synth_dmport_Activate(IDirectMusicPort *iface, BOOL active<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetChannelPriority(LPDIRECTMUSICPORT iface, 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, channel_group, channel, priority);<br>
<br>
@@ -485,7 +485,7 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetChannelPriority(LPDIRECT<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetChannelPriority(LPDIRECTMUSICPORT iface, 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, priority);<br>
<br>
@@ -497,7 +497,7 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetChannelPriority(LPDIRECT<br>
 static HRESULT WINAPI synth_dmport_SetDirectSound(IDirectMusicPort *iface, 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 synth_dmport_SetDirectSound(IDirectMusicPort *iface, IDire<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetFormat(LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD 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, pdwWaveFormatExSize, pdwBufferSize);<br>
<br>
@@ -598,7 +598,7 @@ static const IDirectMusicPortVtbl SynthPortImpl_DirectMusicPort_Vtbl = {<br>
 /* SynthPortImpl IDirectMusicPortDownload IUnknown part follows: */<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_QueryInterface(LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ret_iface)<br>
 {<br>
-    SynthPortImpl *This = 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), ret_iface);<br>
<br>
@@ -607,7 +607,7 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_QueryInterface(LPDI<br>
<br>
 static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface)<br>
 {<br>
-    SynthPortImpl *This = 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 SynthPortImpl_IDirectMusicPortDownload_AddRef (LPDIRECTMUSIC<br>
<br>
 static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_Release(LPDIRECTMUSICPORTDOWNLOAD iface)<br>
 {<br>
-    SynthPortImpl *This = 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 SynthPortImpl_IDirectMusicPortDownload_Release(LPDIRECTMUSIC<br>
 /* SynthPortImpl IDirectMusicPortDownload Interface follows: */<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetBuffer(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD DLId, IDirectMusicDownload** IDMDownload)<br>
 {<br>
-    SynthPortImpl *This = 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 SynthPortImpl_IDirectMusicPortDownload_GetBuffer(LPDIRECTM<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD size, IDirectMusicDownload** IDMDownload)<br>
 {<br>
-    SynthPortImpl *This = 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 SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer(LPDI<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetDLId(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* start_DLId, DWORD count)<br>
 {<br>
-    SynthPortImpl *This = 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 SynthPortImpl_IDirectMusicPortDownload_GetDLId(LPDIRECTMUS<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* append)<br>
 {<br>
-    SynthPortImpl *This = 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 SynthPortImpl_IDirectMusicPortDownload_GetAppend (LPDIRECT<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Download(LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* IDMDownload)<br>
 {<br>
-    SynthPortImpl *This = 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 SynthPortImpl_IDirectMusicPortDownload_Download(LPDIRECTMU<br>
<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Unload(LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* IDMDownload)<br>
 {<br>
-    SynthPortImpl *This = 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 SynthPortImpl_DirectMusicPortDownload_<br>
 /* SynthPortImpl IDirectMusicThru IUnknown part follows: */<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_QueryInterface(LPDIRECTMUSICTHRU iface, 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), ret_iface);<br>
<br>
@@ -707,7 +707,7 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_QueryInterface(LPDIRECTMUSI<br>
<br>
 static ULONG WINAPI 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 SynthPortImpl_IDirectMusicThru_AddRef(LPDIRECTMUSICTHRU ifac<br>
<br>
 static ULONG WINAPI 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 SynthPortImpl_IDirectMusicThru_Release(LPDIRECTMUSICTHRU ifa<br>
 static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_ThruChannel(LPDIRECTMUSICTHRU iface, DWORD source_channel_group, DWORD source_channel, DWORD destination_channel_group,<br>
                                                        DWORD 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, source_channel_group, source_channel, destination_channel_group, destination_channel, destination_port);<br>
<br>
@@ -746,21 +746,21 @@ static const IDirectMusicThruVtbl SynthPortImpl_DirectMusicThru_Vtbl = {<br>
 static HRESULT WINAPI IKsControlImpl_QueryInterface(IKsControl *iface, 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, 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 *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, 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>
</blockquote></div>