From b67da5b946516ba754125076c60d2e133f737289 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Wed, 1 Jun 2005 19:57:42 +0000 Subject: [PATCH] Make more of the OLE interface vtables const. --- dlls/dmsynth/dmsynth_main.c | 6 +- dlls/dmsynth/dmsynth_private.h | 46 +-------- dlls/dmsynth/synth.c | 2 +- dlls/dmsynth/synthsink.c | 2 +- dlls/dmusic/buffer.c | 2 +- dlls/dmusic/clock.c | 2 +- dlls/dmusic/collection.c | 8 +- dlls/dmusic/dmusic.c | 2 +- dlls/dmusic/dmusic_main.c | 6 +- dlls/dmusic/dmusic_private.h | 150 +++-------------------------- dlls/dmusic/download.c | 2 +- dlls/dmusic/downloadedinstrument.c | 2 +- dlls/dmusic/instrument.c | 6 +- dlls/dmusic/port.c | 2 +- dlls/dmusic/portdownload.c | 2 +- dlls/dmusic/thru.c | 2 +- dlls/dplayx/dpclassfactory.c | 4 +- dlls/dplayx/dplay.c | 24 ++--- dlls/dplayx/dplay_global.h | 6 +- dlls/dplayx/dplaysp.c | 7 +- dlls/dplayx/dplobby.c | 34 +++---- dlls/dplayx/lobbysp.c | 7 +- dlls/dpnet/address.c | 2 +- dlls/dpnet/client.c | 2 +- dlls/dpnet/dpnet_main.c | 4 +- dlls/dpnet/dpnet_private.h | 39 +------- dlls/dsound/buffer.c | 6 +- dlls/dsound/capture.c | 18 ++-- dlls/dsound/dsound.c | 12 +-- dlls/dsound/dsound_main.c | 4 +- dlls/dsound/dsound_private.h | 38 ++++---- dlls/dsound/primary.c | 2 +- dlls/dsound/propset.c | 4 +- dlls/dsound/sound3d.c | 4 +- dlls/dswave/dswave.c | 10 +- dlls/dswave/dswave_main.c | 2 +- dlls/dswave/dswave_private.h | 63 +----------- dlls/dxdiagn/container.c | 3 +- dlls/dxdiagn/dxdiag_main.c | 4 +- dlls/dxdiagn/dxdiag_private.h | 23 +---- dlls/dxdiagn/provider.c | 2 +- dlls/itss/itss.c | 6 +- dlls/itss/moniker.c | 8 +- dlls/itss/storage.c | 12 +-- dlls/mapi32/prop.c | 4 +- dlls/mlang/mlang.c | 22 ++--- dlls/msdmo/dmoreg.c | 8 +- dlls/mshtml/htmldoc.c | 2 +- dlls/mshtml/mshtml_private.h | 16 +-- dlls/mshtml/oleobj.c | 6 +- dlls/mshtml/persist.c | 6 +- dlls/mshtml/view.c | 2 +- dlls/msi/msi.c | 4 +- 53 files changed, 194 insertions(+), 468 deletions(-) diff --git a/dlls/dmsynth/dmsynth_main.c b/dlls/dmsynth/dmsynth_main.c index f7928a99896..bbf7e583f49 100644 --- a/dlls/dmsynth/dmsynth_main.c +++ b/dlls/dmsynth/dmsynth_main.c @@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmsynth); LONG DMSYNTH_refCount = 0; typedef struct { - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; } IClassFactoryImpl; /****************************************************************** @@ -68,7 +68,7 @@ static HRESULT WINAPI SynthCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { return S_OK; } -static IClassFactoryVtbl SynthCF_Vtbl = { +static const IClassFactoryVtbl SynthCF_Vtbl = { SynthCF_QueryInterface, SynthCF_AddRef, SynthCF_Release, @@ -117,7 +117,7 @@ static HRESULT WINAPI SynthSinkCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { return S_OK; } -static IClassFactoryVtbl SynthSinkCF_Vtbl = { +static const IClassFactoryVtbl SynthSinkCF_Vtbl = { SynthSinkCF_QueryInterface, SynthSinkCF_AddRef, SynthSinkCF_Release, diff --git a/dlls/dmsynth/dmsynth_private.h b/dlls/dmsynth/dmsynth_private.h index 9559c5d2690..aca175543a2 100644 --- a/dlls/dmsynth/dmsynth_private.h +++ b/dlls/dmsynth/dmsynth_private.h @@ -46,12 +46,6 @@ typedef struct IDirectMusicSynth8Impl IDirectMusicSynth8Impl; typedef struct IDirectMusicSynthSinkImpl IDirectMusicSynthSinkImpl; -/***************************************************************************** - * Predeclare the interface implementation structures - */ -extern IDirectMusicSynth8Vtbl DirectMusicSynth8_Vtbl; -extern IDirectMusicSynthSinkVtbl DirectMusicSynthSink_Vtbl; - /***************************************************************************** * ClassFactory */ @@ -63,7 +57,7 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LP */ struct IDirectMusicSynth8Impl { /* IUnknown fields */ - IDirectMusicSynth8Vtbl *lpVtbl; + const IDirectMusicSynth8Vtbl *lpVtbl; DWORD ref; /* IDirectMusicSynth8 fields */ @@ -76,56 +70,20 @@ struct IDirectMusicSynth8Impl { /* IUnknown: */ extern HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface (LPDIRECTMUSICSYNTH8 iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicSynth8Impl_AddRef (LPDIRECTMUSICSYNTH8 iface); -extern ULONG WINAPI IDirectMusicSynth8Impl_Release (LPDIRECTMUSICSYNTH8 iface); -/* IDirectMusicSynth: */ -extern HRESULT WINAPI IDirectMusicSynth8Impl_Open (LPDIRECTMUSICSYNTH8 iface, LPDMUS_PORTPARAMS pPortParams); -extern HRESULT WINAPI IDirectMusicSynth8Impl_Close (LPDIRECTMUSICSYNTH8 iface); -extern HRESULT WINAPI IDirectMusicSynth8Impl_SetNumChannelGroups (LPDIRECTMUSICSYNTH8 iface, DWORD dwGroups); -extern HRESULT WINAPI IDirectMusicSynth8Impl_Download (LPDIRECTMUSICSYNTH8 iface, LPHANDLE phDownload, LPVOID pvData, LPBOOL pbFree); -extern HRESULT WINAPI IDirectMusicSynth8Impl_Unload (LPDIRECTMUSICSYNTH8 iface, HANDLE hDownload, HRESULT (CALLBACK* lpFreeHandle)(HANDLE,HANDLE), HANDLE hUserData); -extern HRESULT WINAPI IDirectMusicSynth8Impl_PlayBuffer (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, LPBYTE pbBuffer, DWORD cbBuffer); -extern HRESULT WINAPI IDirectMusicSynth8Impl_GetRunningStats (LPDIRECTMUSICSYNTH8 iface, LPDMUS_SYNTHSTATS pStats); -extern HRESULT WINAPI IDirectMusicSynth8Impl_GetPortCaps (LPDIRECTMUSICSYNTH8 iface, LPDMUS_PORTCAPS pCaps); -extern HRESULT WINAPI IDirectMusicSynth8Impl_SetMasterClock (LPDIRECTMUSICSYNTH8 iface, IReferenceClock* pClock); -extern HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock (LPDIRECTMUSICSYNTH8 iface, IReferenceClock** ppClock); -extern HRESULT WINAPI IDirectMusicSynth8Impl_Activate (LPDIRECTMUSICSYNTH8 iface, BOOL fEnable); -extern HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink (LPDIRECTMUSICSYNTH8 iface, IDirectMusicSynthSink* pSynthSink); -extern HRESULT WINAPI IDirectMusicSynth8Impl_Render (LPDIRECTMUSICSYNTH8 iface, short* pBuffer, DWORD dwLength, LONGLONG llPosition); -extern HRESULT WINAPI IDirectMusicSynth8Impl_SetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority); -extern HRESULT WINAPI IDirectMusicSynth8Impl_GetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority); -extern HRESULT WINAPI IDirectMusicSynth8Impl_GetFormat (LPDIRECTMUSICSYNTH8 iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSiz); -extern HRESULT WINAPI IDirectMusicSynth8Impl_GetAppend (LPDIRECTMUSICSYNTH8 iface, DWORD* pdwAppend); -/* IDirectMusicSynth8: */ -extern HRESULT WINAPI IDirectMusicSynth8Impl_PlayVoice (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, DWORD dwVoiceId, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwDLId, long prPitch, long vrVolume, SAMPLE_TIME stVoiceStart, SAMPLE_TIME stLoopStart, SAMPLE_TIME stLoopEnd); -extern HRESULT WINAPI IDirectMusicSynth8Impl_StopVoice (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, DWORD dwVoiceId); -extern HRESULT WINAPI IDirectMusicSynth8Impl_GetVoiceState (LPDIRECTMUSICSYNTH8 iface, DWORD dwVoice[], DWORD cbVoice, DMUS_VOICE_STATE dwVoiceState[]); -extern HRESULT WINAPI IDirectMusicSynth8Impl_Refresh (LPDIRECTMUSICSYNTH8 iface, DWORD dwDownloadID, DWORD dwFlags); -extern HRESULT WINAPI IDirectMusicSynth8Impl_AssignChannelToBuses (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwBuses, DWORD cBuses); /***************************************************************************** * IDirectMusicSynthSinkImpl implementation structure */ struct IDirectMusicSynthSinkImpl { /* IUnknown fields */ - IDirectMusicSynthSinkVtbl *lpVtbl; + const IDirectMusicSynthSinkVtbl *lpVtbl; DWORD ref; /* IDirectMusicSynthSinkImpl fields */ }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface); -extern ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface); -/* IDirectMusicSynthSinkImpl: */ -extern HRESULT WINAPI IDirectMusicSynthSinkImpl_Init (LPDIRECTMUSICSYNTHSINK iface, IDirectMusicSynth* pSynth); -extern HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock* pClock); -extern HRESULT WINAPI IDirectMusicSynthSinkImpl_GetLatencyClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock** ppClock); -extern HRESULT WINAPI IDirectMusicSynthSinkImpl_Activate (LPDIRECTMUSICSYNTHSINK iface, BOOL fEnable); -extern HRESULT WINAPI IDirectMusicSynthSinkImpl_SampleToRefTime (LPDIRECTMUSICSYNTHSINK iface, LONGLONG llSampleTime, REFERENCE_TIME* prfTime); -extern HRESULT WINAPI IDirectMusicSynthSinkImpl_RefTimeToSample (LPDIRECTMUSICSYNTHSINK iface, REFERENCE_TIME rfTime, LONGLONG* pllSampleTime); -extern HRESULT WINAPI IDirectMusicSynthSinkImpl_SetDirectSound (LPDIRECTMUSICSYNTHSINK iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer); -extern HRESULT WINAPI IDirectMusicSynthSinkImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNTHSINK iface, LPDWORD pdwBufferSizeInSamples); /********************************************************************** * Dll lifetime tracking declaration for dmsynth.dll diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index d9b6d6f31e7..80f206de4cd 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -202,7 +202,7 @@ HRESULT WINAPI IDirectMusicSynth8Impl_AssignChannelToBuses (LPDIRECTMUSICSYNTH8 return S_OK; } -IDirectMusicSynth8Vtbl DirectMusicSynth8_Vtbl = { +static const IDirectMusicSynth8Vtbl DirectMusicSynth8_Vtbl = { IDirectMusicSynth8Impl_QueryInterface, IDirectMusicSynth8Impl_AddRef, IDirectMusicSynth8Impl_Release, diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index 3177ed7983b..ec198bde99e 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -111,7 +111,7 @@ HRESULT WINAPI IDirectMusicSynthSinkImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNT return S_OK; } -IDirectMusicSynthSinkVtbl DirectMusicSynthSink_Vtbl = { +static const IDirectMusicSynthSinkVtbl DirectMusicSynthSink_Vtbl = { IDirectMusicSynthSinkImpl_QueryInterface, IDirectMusicSynthSinkImpl_AddRef, IDirectMusicSynthSinkImpl_Release, diff --git a/dlls/dmusic/buffer.c b/dlls/dmusic/buffer.c index a7164858f5e..0d79922ef26 100644 --- a/dlls/dmusic/buffer.c +++ b/dlls/dmusic/buffer.c @@ -140,7 +140,7 @@ HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, D return S_OK; } -IDirectMusicBufferVtbl DirectMusicBuffer_Vtbl = { +static const IDirectMusicBufferVtbl DirectMusicBuffer_Vtbl = { IDirectMusicBufferImpl_QueryInterface, IDirectMusicBufferImpl_AddRef, IDirectMusicBufferImpl_Release, diff --git a/dlls/dmusic/clock.c b/dlls/dmusic/clock.c index fa44f100567..02d85c01957 100644 --- a/dlls/dmusic/clock.c +++ b/dlls/dmusic/clock.c @@ -88,7 +88,7 @@ HRESULT WINAPI IReferenceClockImpl_Unadvise (IReferenceClock *iface, DWORD dwAdv return S_OK; } -IReferenceClockVtbl ReferenceClock_Vtbl = { +static const IReferenceClockVtbl ReferenceClock_Vtbl = { IReferenceClockImpl_QueryInterface, IReferenceClockImpl_AddRef, IReferenceClockImpl_Release, diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index befae8a9de2..99dced525d2 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -78,7 +78,7 @@ ULONG WINAPI IDirectMusicCollectionImpl_IUnknown_Release (LPUNKNOWN iface) { return refCount; } -IUnknownVtbl DirectMusicCollection_Unknown_Vtbl = { +static const IUnknownVtbl DirectMusicCollection_Unknown_Vtbl = { IDirectMusicCollectionImpl_IUnknown_QueryInterface, IDirectMusicCollectionImpl_IUnknown_AddRef, IDirectMusicCollectionImpl_IUnknown_Release @@ -152,7 +152,7 @@ HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_EnumInstrument return S_FALSE; } -IDirectMusicCollectionVtbl DirectMusicCollection_Collection_Vtbl = { +static const IDirectMusicCollectionVtbl DirectMusicCollection_Collection_Vtbl = { IDirectMusicCollectionImpl_IDirectMusicCollection_QueryInterface, IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef, IDirectMusicCollectionImpl_IDirectMusicCollection_Release, @@ -386,7 +386,7 @@ HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_ParseDescriptor (LP return S_OK; } -IDirectMusicObjectVtbl DirectMusicCollection_Object_Vtbl = { +static const IDirectMusicObjectVtbl DirectMusicCollection_Object_Vtbl = { IDirectMusicCollectionImpl_IDirectMusicObject_QueryInterface, IDirectMusicCollectionImpl_IDirectMusicObject_AddRef, IDirectMusicCollectionImpl_IDirectMusicObject_Release, @@ -737,7 +737,7 @@ HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_GetSizeMax (LPPERSISTST return E_NOTIMPL; } -IPersistStreamVtbl DirectMusicCollection_PersistStream_Vtbl = { +static const IPersistStreamVtbl DirectMusicCollection_PersistStream_Vtbl = { IDirectMusicCollectionImpl_IPersistStream_QueryInterface, IDirectMusicCollectionImpl_IPersistStream_AddRef, IDirectMusicCollectionImpl_IPersistStream_Release, diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index b93f0bd20b4..49fd50acbb8 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -240,7 +240,7 @@ HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock (LPDIRECTMUSIC8 iface, I return S_OK; } -IDirectMusic8Vtbl DirectMusic8_Vtbl = { +static const IDirectMusic8Vtbl DirectMusic8_Vtbl = { IDirectMusic8Impl_QueryInterface, IDirectMusic8Impl_AddRef, IDirectMusic8Impl_Release, diff --git a/dlls/dmusic/dmusic_main.c b/dlls/dmusic/dmusic_main.c index dc1544ea56c..f0967613e01 100644 --- a/dlls/dmusic/dmusic_main.c +++ b/dlls/dmusic/dmusic_main.c @@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmusic); LONG DMUSIC_refCount = 0; typedef struct { - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; } IClassFactoryImpl; /****************************************************************** @@ -68,7 +68,7 @@ static HRESULT WINAPI DirectMusicCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) return S_OK; } -static IClassFactoryVtbl DirectMusicCF_Vtbl = { +static const IClassFactoryVtbl DirectMusicCF_Vtbl = { DirectMusicCF_QueryInterface, DirectMusicCF_AddRef, DirectMusicCF_Release, @@ -117,7 +117,7 @@ static HRESULT WINAPI CollectionCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) return S_OK; } -static IClassFactoryVtbl CollectionCF_Vtbl = { +static const IClassFactoryVtbl CollectionCF_Vtbl = { CollectionCF_QueryInterface, CollectionCF_AddRef, CollectionCF_Release, diff --git a/dlls/dmusic/dmusic_private.h b/dlls/dmusic/dmusic_private.h index c9ebd9df9fb..56a5a927826 100644 --- a/dlls/dmusic/dmusic_private.h +++ b/dlls/dmusic/dmusic_private.h @@ -59,22 +59,7 @@ typedef struct IDirectMusicInstrumentImpl IDirectMusicInstrumentImpl; /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirectMusic8Vtbl DirectMusic8_Vtbl; -extern IDirectMusicBufferVtbl DirectMusicBuffer_Vtbl; -extern IDirectMusicDownloadedInstrumentVtbl DirectMusicDownloadedInstrument_Vtbl; -extern IDirectMusicDownloadVtbl DirectMusicDownload_Vtbl; -extern IDirectMusicPortDownloadVtbl DirectMusicPortDownload_Vtbl; -extern IDirectMusicPortVtbl DirectMusicPort_Vtbl; -extern IDirectMusicThruVtbl DirectMusicThru_Vtbl; -extern IReferenceClockVtbl ReferenceClock_Vtbl; - -extern IUnknownVtbl DirectMusicCollection_Unknown_Vtbl; -extern IDirectMusicCollectionVtbl DirectMusicCollection_Collection_Vtbl; -extern IDirectMusicObjectVtbl DirectMusicCollection_Object_Vtbl; -extern IPersistStreamVtbl DirectMusicCollection_PersistStream_Vtbl; - -extern IUnknownVtbl DirectMusicInstrument_Unknown_Vtbl; -extern IDirectMusicInstrumentVtbl DirectMusicInstrument_Instrument_Vtbl; +extern const IDirectMusicPortVtbl DirectMusicPort_Vtbl; /***************************************************************************** * Some stuff to make my life easier :=) @@ -109,7 +94,7 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicInstrumentImpl (LPCGUID lpcGUID, L */ struct IDirectMusic8Impl { /* IUnknown fields */ - IDirectMusic8Vtbl *lpVtbl; + const IDirectMusic8Vtbl *lpVtbl; DWORD ref; /* IDirectMusicImpl fields */ @@ -119,120 +104,72 @@ struct IDirectMusic8Impl { }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusic8Impl_AddRef (LPDIRECTMUSIC8 iface); -extern ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface); -/* IDirectMusic: */ -extern HRESULT WINAPI IDirectMusic8Impl_EnumPort (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps); -extern HRESULT WINAPI IDirectMusic8Impl_CreateMusicBuffer (LPDIRECTMUSIC8 iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter); -extern HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter); -extern HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo); -extern HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock); -extern HRESULT WINAPI IDirectMusic8Impl_SetMasterClock (LPDIRECTMUSIC8 iface, REFGUID rguidClock); -extern HRESULT WINAPI IDirectMusic8Impl_Activate (LPDIRECTMUSIC8 iface, BOOL fEnable); -extern HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pguidPort); -extern HRESULT WINAPI IDirectMusic8Impl_SetDirectSound (LPDIRECTMUSIC8 iface, LPDIRECTSOUND pDirectSound, HWND hWnd); -/* IDirectMusic8: */ -extern HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock (LPDIRECTMUSIC8 iface, IReferenceClock* pClock); /***************************************************************************** * IDirectMusicBufferImpl implementation structure */ struct IDirectMusicBufferImpl { /* IUnknown fields */ - IDirectMusicBufferVtbl *lpVtbl; + const IDirectMusicBufferVtbl *lpVtbl; DWORD ref; /* IDirectMusicBufferImpl fields */ }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface (LPDIRECTMUSICBUFFER iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicBufferImpl_AddRef (LPDIRECTMUSICBUFFER iface); -extern ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface); -/* IDirectMusicBufferImpl: */ -extern HRESULT WINAPI IDirectMusicBufferImpl_Flush (LPDIRECTMUSICBUFFER iface); -extern HRESULT WINAPI IDirectMusicBufferImpl_TotalTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prtTime); -extern HRESULT WINAPI IDirectMusicBufferImpl_PackStructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage); -extern HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb); -extern HRESULT WINAPI IDirectMusicBufferImpl_ResetReadPtr (LPDIRECTMUSICBUFFER iface); -extern HRESULT WINAPI IDirectMusicBufferImpl_GetNextEvent (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE* ppData); -extern HRESULT WINAPI IDirectMusicBufferImpl_GetRawBufferPtr (LPDIRECTMUSICBUFFER iface, LPBYTE* ppData); -extern HRESULT WINAPI IDirectMusicBufferImpl_GetStartTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt); -extern HRESULT WINAPI IDirectMusicBufferImpl_GetUsedBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb); -extern HRESULT WINAPI IDirectMusicBufferImpl_GetMaxBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb); -extern HRESULT WINAPI IDirectMusicBufferImpl_GetBufferFormat (LPDIRECTMUSICBUFFER iface, LPGUID pGuidFormat); -extern HRESULT WINAPI IDirectMusicBufferImpl_SetStartTime (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt); -extern HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, DWORD cb); - /***************************************************************************** * IDirectMusicDownloadedInstrumentImpl implementation structure */ struct IDirectMusicDownloadedInstrumentImpl { /* IUnknown fields */ - IDirectMusicDownloadedInstrumentVtbl *lpVtbl; + const IDirectMusicDownloadedInstrumentVtbl *lpVtbl; DWORD ref; /* IDirectMusicDownloadedInstrumentImpl fields */ }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface); -extern ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface); /* IDirectMusicDownloadedInstrumentImpl: */ /* none yet */ - /***************************************************************************** * IDirectMusicDownloadImpl implementation structure */ struct IDirectMusicDownloadImpl { /* IUnknown fields */ - IDirectMusicDownloadVtbl *lpVtbl; + const IDirectMusicDownloadVtbl *lpVtbl; DWORD ref; /* IDirectMusicDownloadImpl fields */ }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicDownloadImpl_AddRef (LPDIRECTMUSICDOWNLOAD iface); -extern ULONG WINAPI IDirectMusicDownloadImpl_Release (LPDIRECTMUSICDOWNLOAD iface); -/* IDirectMusicImpl: */ -extern HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer (LPDIRECTMUSICDOWNLOAD iface, void** ppvBuffer, DWORD* pdwSize); - /***************************************************************************** * IDirectMusicPortDownloadImpl implementation structure */ struct IDirectMusicPortDownloadImpl { /* IUnknown fields */ - IDirectMusicPortDownloadVtbl *lpVtbl; + const IDirectMusicPortDownloadVtbl *lpVtbl; DWORD ref; /* IDirectMusicPortDownloadImpl fields */ }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicPortDownloadImpl_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface); -extern ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD iface); -/* IDirectMusicPortDownloadImpl: */ -extern HRESULT WINAPI IDirectMusicPortDownloadImpl_GetBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwDLId, IDirectMusicDownload** ppIDMDownload); -extern HRESULT WINAPI IDirectMusicPortDownloadImpl_AllocateBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwSize, IDirectMusicDownload** ppIDMDownload); -extern HRESULT WINAPI IDirectMusicPortDownloadImpl_GetDLId (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwStartDLId, DWORD dwCount); -extern HRESULT WINAPI IDirectMusicPortDownloadImpl_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwAppend); -extern HRESULT WINAPI IDirectMusicPortDownloadImpl_Download (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload); -extern HRESULT WINAPI IDirectMusicPortDownloadImpl_Unload (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload); /***************************************************************************** * IDirectMusicPortImpl implementation structure */ struct IDirectMusicPortImpl { /* IUnknown fields */ - IDirectMusicPortVtbl *lpVtbl; + const IDirectMusicPortVtbl *lpVtbl; DWORD ref; /* IDirectMusicPortImpl fields */ @@ -246,52 +183,28 @@ struct IDirectMusicPortImpl { }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicPortImpl_AddRef (LPDIRECTMUSICPORT iface); -extern ULONG WINAPI IDirectMusicPortImpl_Release (LPDIRECTMUSICPORT iface); -/* IDirectMusicPortImpl: */ -extern HRESULT WINAPI IDirectMusicPortImpl_PlayBuffer (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer); -extern HRESULT WINAPI IDirectMusicPortImpl_SetReadNotificationHandle (LPDIRECTMUSICPORT iface, HANDLE hEvent); -extern HRESULT WINAPI IDirectMusicPortImpl_Read (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer); -extern HRESULT WINAPI IDirectMusicPortImpl_DownloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicInstrument* pInstrument, IDirectMusicDownloadedInstrument** ppDownloadedInstrument, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges); -extern HRESULT WINAPI IDirectMusicPortImpl_UnloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *pDownloadedInstrument); -extern HRESULT WINAPI IDirectMusicPortImpl_GetLatencyClock (LPDIRECTMUSICPORT iface, IReferenceClock** ppClock); -extern HRESULT WINAPI IDirectMusicPortImpl_GetRunningStats (LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS pStats); -extern HRESULT WINAPI IDirectMusicPortImpl_Compact (LPDIRECTMUSICPORT iface); -extern HRESULT WINAPI IDirectMusicPortImpl_GetCaps (LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS pPortCaps); -extern HRESULT WINAPI IDirectMusicPortImpl_DeviceIoControl (LPDIRECTMUSICPORT iface, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped); -extern HRESULT WINAPI IDirectMusicPortImpl_SetNumChannelGroups (LPDIRECTMUSICPORT iface, DWORD dwChannelGroups); -extern HRESULT WINAPI IDirectMusicPortImpl_GetNumChannelGroups (LPDIRECTMUSICPORT iface, LPDWORD pdwChannelGroups); -extern HRESULT WINAPI IDirectMusicPortImpl_Activate (LPDIRECTMUSICPORT iface, BOOL fActive); -extern HRESULT WINAPI IDirectMusicPortImpl_SetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority); -extern HRESULT WINAPI IDirectMusicPortImpl_GetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority); -extern HRESULT WINAPI IDirectMusicPortImpl_SetDirectSound (LPDIRECTMUSICPORT iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer); -extern HRESULT WINAPI IDirectMusicPortImpl_GetFormat (LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize); /***************************************************************************** * IDirectMusicThruImpl implementation structure */ struct IDirectMusicThruImpl { /* IUnknown fields */ - IDirectMusicThruVtbl *lpVtbl; + const IDirectMusicThruVtbl *lpVtbl; DWORD ref; /* IDirectMusicThruImpl fields */ }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicThruImpl_AddRef (LPDIRECTMUSICTHRU iface); -extern ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface); -/* IDirectMusicPortDownloadImpl: */ -extern HRESULT WINAPI ThruChannel (LPDIRECTMUSICTHRU iface, DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort); /***************************************************************************** * IReferenceClockImpl implementation structure */ struct IReferenceClockImpl { /* IUnknown fields */ - IReferenceClockVtbl *lpVtbl; + const IReferenceClockVtbl *lpVtbl; DWORD ref; /* IReferenceClockImpl fields */ @@ -300,15 +213,7 @@ struct IReferenceClockImpl { }; /* IUnknown: */ -extern HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IReferenceClockImpl_AddRef (IReferenceClock *iface); -extern ULONG WINAPI IReferenceClockImpl_Release (IReferenceClock *iface); -/* IReferenceClock: */ -extern HRESULT WINAPI IReferenceClockImpl_GetTime (IReferenceClock *iface, REFERENCE_TIME* pTime); -extern HRESULT WINAPI IReferenceClockImpl_AdviseTime (IReferenceClock *iface, REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD* pdwAdviseCookie); -extern HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic (IReferenceClock *iface, REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD* pdwAdviseCookie); -extern HRESULT WINAPI IReferenceClockImpl_Unadvise (IReferenceClock *iface, DWORD dwAdviseCookie); - typedef struct _DMUS_PRIVATE_INSTRUMENT_ENTRY { struct list entry; /* for listing elements */ @@ -324,10 +229,10 @@ typedef struct _DMUS_PRIVATE_POOLCUE { */ struct IDirectMusicCollectionImpl { /* IUnknown fields */ - IUnknownVtbl *UnknownVtbl; - IDirectMusicCollectionVtbl *CollectionVtbl; - IDirectMusicObjectVtbl *ObjectVtbl; - IPersistStreamVtbl *PersistStreamVtbl; + const IUnknownVtbl *UnknownVtbl; + const IDirectMusicCollectionVtbl *CollectionVtbl; + const IDirectMusicObjectVtbl *ObjectVtbl; + const IPersistStreamVtbl *PersistStreamVtbl; DWORD ref; /* IDirectMusicCollectionImpl fields */ @@ -345,40 +250,21 @@ struct IDirectMusicCollectionImpl { }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicCollectionImpl_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicCollectionImpl_IUnknown_AddRef (LPUNKNOWN iface); -extern ULONG WINAPI IDirectMusicCollectionImpl_IUnknown_Release (LPUNKNOWN iface); /* IDirectMusicCollection: */ -extern HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_QueryInterface (LPDIRECTMUSICCOLLECTION iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef (LPDIRECTMUSICCOLLECTION iface); -extern ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_Release (LPDIRECTMUSICCOLLECTION iface); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_GetInstrument (LPDIRECTMUSICCOLLECTION iface, DWORD dwPatch, IDirectMusicInstrument** ppInstrument); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_EnumInstrument (LPDIRECTMUSICCOLLECTION iface, DWORD dwIndex, DWORD* pdwPatch, LPWSTR pwszName, DWORD dwNameLen); /* IDirectMusicObject: */ -extern HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_QueryInterface (LPDIRECTMUSICOBJECT iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface); -extern ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_Release (LPDIRECTMUSICOBJECT iface); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_GetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_SetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_ParseDescriptor (LPDIRECTMUSICOBJECT iface, LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc); /* IPersistStream: */ -extern HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject); extern ULONG WINAPI IDirectMusicCollectionImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface); -extern ULONG WINAPI IDirectMusicCollectionImpl_IPersistStream_Release (LPPERSISTSTREAM iface); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_IsDirty (LPPERSISTSTREAM iface); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_Load (LPPERSISTSTREAM iface, IStream* pStm); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty); -extern HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize); - /***************************************************************************** * IDirectMusicInstrumentImpl implementation structure */ struct IDirectMusicInstrumentImpl { /* IUnknown fields */ - IUnknownVtbl *UnknownVtbl; - IDirectMusicInstrumentVtbl *InstrumentVtbl; + const IUnknownVtbl *UnknownVtbl; + const IDirectMusicInstrumentVtbl *InstrumentVtbl; DWORD ref; /* IDirectMusicInstrumentImpl fields */ @@ -390,15 +276,9 @@ struct IDirectMusicInstrumentImpl { }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicInstrumentImpl_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicInstrumentImpl_IUnknown_AddRef (LPUNKNOWN iface); -extern ULONG WINAPI IDirectMusicInstrumentImpl_IUnknown_Release (LPUNKNOWN iface); /* IDirectMusicInstrumentImpl: */ -extern HRESULT WINAPI IDirectMusicInstrumentImpl_IDirectMusicInstrument_QueryInterface (LPDIRECTMUSICINSTRUMENT iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicInstrumentImpl_IDirectMusicInstrument_AddRef (LPDIRECTMUSICINSTRUMENT iface); -extern ULONG WINAPI IDirectMusicInstrumentImpl_IDirectMusicInstrument_Release (LPDIRECTMUSICINSTRUMENT iface); -extern HRESULT WINAPI IDirectMusicInstrumentImpl_IDirectMusicInstrument_GetPatch (LPDIRECTMUSICINSTRUMENT iface, DWORD* pdwPatch); -extern HRESULT WINAPI IDirectMusicInstrumentImpl_IDirectMusicInstrument_SetPatch (LPDIRECTMUSICINSTRUMENT iface, DWORD dwPatch); /* custom :) */ extern HRESULT WINAPI IDirectMusicInstrumentImpl_Custom_Load (LPDIRECTMUSICINSTRUMENT iface, LPSTREAM pStm); diff --git a/dlls/dmusic/download.c b/dlls/dmusic/download.c index c6a0a5571fc..639e0d101b2 100644 --- a/dlls/dmusic/download.c +++ b/dlls/dmusic/download.c @@ -69,7 +69,7 @@ HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer (LPDIRECTMUSICDOWNLOAD iface, return S_OK; } -IDirectMusicDownloadVtbl DirectMusicDownload_Vtbl = { +static const IDirectMusicDownloadVtbl DirectMusicDownload_Vtbl = { IDirectMusicDownloadImpl_QueryInterface, IDirectMusicDownloadImpl_AddRef, IDirectMusicDownloadImpl_Release, diff --git a/dlls/dmusic/downloadedinstrument.c b/dlls/dmusic/downloadedinstrument.c index 7cb6c76cf2c..e9430f14854 100644 --- a/dlls/dmusic/downloadedinstrument.c +++ b/dlls/dmusic/downloadedinstrument.c @@ -65,7 +65,7 @@ ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOAD /* IDirectMusicDownloadedInstrumentImpl IDirectMusicDownloadedInstrument part: */ /* none at this time */ -IDirectMusicDownloadedInstrumentVtbl DirectMusicDownloadedInstrument_Vtbl = { +static const IDirectMusicDownloadedInstrumentVtbl DirectMusicDownloadedInstrument_Vtbl = { IDirectMusicDownloadedInstrumentImpl_QueryInterface, IDirectMusicDownloadedInstrumentImpl_AddRef, IDirectMusicDownloadedInstrumentImpl_Release diff --git a/dlls/dmusic/instrument.c b/dlls/dmusic/instrument.c index e7df0236895..8b8d72df9e3 100644 --- a/dlls/dmusic/instrument.c +++ b/dlls/dmusic/instrument.c @@ -22,7 +22,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DECLARE_DEBUG_CHANNEL(dmfile); -const GUID IID_IDirectMusicInstrumentPRIVATE = {0xbcb20080,0xa40c,0x11d1,{0x86,0xbc,0x00,0xc0,0x4f,0xbf,0x8f,0xef}}; +static const GUID IID_IDirectMusicInstrumentPRIVATE = {0xbcb20080,0xa40c,0x11d1,{0x86,0xbc,0x00,0xc0,0x4f,0xbf,0x8f,0xef}}; /* IDirectMusicInstrument IUnknown part: */ HRESULT WINAPI IDirectMusicInstrumentImpl_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj) { @@ -78,7 +78,7 @@ ULONG WINAPI IDirectMusicInstrumentImpl_IUnknown_Release (LPUNKNOWN iface) { return refCount; } -IUnknownVtbl DirectMusicInstrument_Unknown_Vtbl = { +static const IUnknownVtbl DirectMusicInstrument_Unknown_Vtbl = { IDirectMusicInstrumentImpl_IUnknown_QueryInterface, IDirectMusicInstrumentImpl_IUnknown_AddRef, IDirectMusicInstrumentImpl_IUnknown_Release @@ -114,7 +114,7 @@ HRESULT WINAPI IDirectMusicInstrumentImpl_IDirectMusicInstrument_SetPatch (LPDIR return S_OK; } -IDirectMusicInstrumentVtbl DirectMusicInstrument_Instrument_Vtbl = { +static const IDirectMusicInstrumentVtbl DirectMusicInstrument_Instrument_Vtbl = { IDirectMusicInstrumentImpl_IDirectMusicInstrument_QueryInterface, IDirectMusicInstrumentImpl_IDirectMusicInstrument_AddRef, IDirectMusicInstrumentImpl_IDirectMusicInstrument_Release, diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c index d5c9ad65abb..38067670d49 100644 --- a/dlls/dmusic/port.c +++ b/dlls/dmusic/port.c @@ -175,7 +175,7 @@ HRESULT WINAPI IDirectMusicPortImpl_GetFormat (LPDIRECTMUSICPORT iface, LPWAVEFO return S_OK; } -IDirectMusicPortVtbl DirectMusicPort_Vtbl = { +const IDirectMusicPortVtbl DirectMusicPort_Vtbl = { IDirectMusicPortImpl_QueryInterface, IDirectMusicPortImpl_AddRef, IDirectMusicPortImpl_Release, diff --git a/dlls/dmusic/portdownload.c b/dlls/dmusic/portdownload.c index 94592d10950..5b6b162a23c 100644 --- a/dlls/dmusic/portdownload.c +++ b/dlls/dmusic/portdownload.c @@ -98,7 +98,7 @@ HRESULT WINAPI IDirectMusicPortDownloadImpl_Unload (LPDIRECTMUSICPORTDOWNLOAD if return S_OK; } -IDirectMusicPortDownloadVtbl DirectMusicPortDownload_Vtbl = { +static const IDirectMusicPortDownloadVtbl DirectMusicPortDownload_Vtbl = { IDirectMusicPortDownloadImpl_QueryInterface, IDirectMusicPortDownloadImpl_AddRef, IDirectMusicPortDownloadImpl_Release, diff --git a/dlls/dmusic/thru.c b/dlls/dmusic/thru.c index e45ab8b29a6..51462ffe4f2 100644 --- a/dlls/dmusic/thru.c +++ b/dlls/dmusic/thru.c @@ -69,7 +69,7 @@ HRESULT WINAPI IDirectMusicThruImpl_ThruChannel (LPDIRECTMUSICTHRU iface, DWORD return S_OK; } -IDirectMusicThruVtbl DirectMusicThru_Vtbl = { +static const IDirectMusicThruVtbl DirectMusicThru_Vtbl = { IDirectMusicThruImpl_QueryInterface, IDirectMusicThruImpl_AddRef, IDirectMusicThruImpl_Release, diff --git a/dlls/dplayx/dpclassfactory.c b/dlls/dplayx/dpclassfactory.c index 673902bdcee..d233e95870d 100644 --- a/dlls/dplayx/dpclassfactory.c +++ b/dlls/dplayx/dpclassfactory.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); typedef struct { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; } IClassFactoryImpl; @@ -89,7 +89,7 @@ static HRESULT WINAPI DP_and_DPL_LockServer(LPCLASSFACTORY iface,BOOL dolock) { return S_OK; } -static IClassFactoryVtbl DP_and_DPL_Vtbl = { +static const IClassFactoryVtbl DP_and_DPL_Vtbl = { DP_and_DPL_QueryInterface, DP_and_DPL_AddRef, DP_and_DPL_Release, diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 4c0fa968481..1c523605cd0 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -77,13 +77,13 @@ static BOOL CALLBACK cbRemoveGroupOrPlayer( DPID dpId, DWORD dwPlayerType, static void DP_DeleteGroup( IDirectPlay2Impl* This, DPID dpid ); /* Forward declarations of virtual tables */ -static IDirectPlay2Vtbl directPlay2AVT; -static IDirectPlay3Vtbl directPlay3AVT; -static IDirectPlay4Vtbl directPlay4AVT; +static const IDirectPlay2Vtbl directPlay2AVT; +static const IDirectPlay3Vtbl directPlay3AVT; +static const IDirectPlay4Vtbl directPlay4AVT; -static IDirectPlay2Vtbl directPlay2WVT; -static IDirectPlay3Vtbl directPlay3WVT; -static IDirectPlay4Vtbl directPlay4WVT; +static const IDirectPlay2Vtbl directPlay2WVT; +static const IDirectPlay3Vtbl directPlay3WVT; +static const IDirectPlay4Vtbl directPlay4WVT; /* Helper methods for player/group interfaces */ static HRESULT WINAPI DP_IF_DeletePlayerFromGroup @@ -4780,7 +4780,7 @@ static HRESULT WINAPI DirectPlay4WImpl_CancelPriority # define XCAST(fun) (void*) #endif -static IDirectPlay2Vtbl directPlay2WVT = +static const IDirectPlay2Vtbl directPlay2WVT = { XCAST(QueryInterface)DP_QueryInterface, XCAST(AddRef)DP_AddRef, @@ -4825,7 +4825,7 @@ static IDirectPlay2Vtbl directPlay2WVT = # define XCAST(fun) (void*) #endif -static IDirectPlay2Vtbl directPlay2AVT = +static const IDirectPlay2Vtbl directPlay2AVT = { XCAST(QueryInterface)DP_QueryInterface, XCAST(AddRef)DP_AddRef, @@ -4871,7 +4871,7 @@ static IDirectPlay2Vtbl directPlay2AVT = # define XCAST(fun) (void*) #endif -static IDirectPlay3Vtbl directPlay3AVT = +static const IDirectPlay3Vtbl directPlay3AVT = { XCAST(QueryInterface)DP_QueryInterface, XCAST(AddRef)DP_AddRef, @@ -4931,7 +4931,7 @@ static IDirectPlay3Vtbl directPlay3AVT = #else # define XCAST(fun) (void*) #endif -static IDirectPlay3Vtbl directPlay3WVT = +static const IDirectPlay3Vtbl directPlay3WVT = { XCAST(QueryInterface)DP_QueryInterface, XCAST(AddRef)DP_AddRef, @@ -4991,7 +4991,7 @@ static IDirectPlay3Vtbl directPlay3WVT = #else # define XCAST(fun) (void*) #endif -static IDirectPlay4Vtbl directPlay4WVT = +static const IDirectPlay4Vtbl directPlay4WVT = { XCAST(QueryInterface)DP_QueryInterface, XCAST(AddRef)DP_AddRef, @@ -5059,7 +5059,7 @@ static IDirectPlay4Vtbl directPlay4WVT = #else # define XCAST(fun) (void*) #endif -static IDirectPlay4Vtbl directPlay4AVT = +static const IDirectPlay4Vtbl directPlay4AVT = { XCAST(QueryInterface)DP_QueryInterface, XCAST(AddRef)DP_AddRef, diff --git a/dlls/dplayx/dplay_global.h b/dlls/dplayx/dplay_global.h index 3840e6727db..b86d3247845 100644 --- a/dlls/dplayx/dplay_global.h +++ b/dlls/dplayx/dplay_global.h @@ -215,19 +215,19 @@ typedef struct tagDirectPlay4Data struct IDirectPlay2Impl { - IDirectPlay2Vtbl *lpVtbl; + const IDirectPlay2Vtbl *lpVtbl; DP_IMPL_FIELDS }; struct IDirectPlay3Impl { - IDirectPlay3Vtbl *lpVtbl; + const IDirectPlay3Vtbl *lpVtbl; DP_IMPL_FIELDS }; struct IDirectPlay4Impl { - IDirectPlay4Vtbl *lpVtbl; + const IDirectPlay4Vtbl *lpVtbl; DP_IMPL_FIELDS }; diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c index 252071e1ef9..be4a4bc5824 100644 --- a/dlls/dplayx/dplaysp.c +++ b/dlls/dplayx/dplaysp.c @@ -68,12 +68,12 @@ typedef struct tagDirectPlaySPData struct IDirectPlaySPImpl { - IDirectPlaySPVtbl *lpVtbl; + const IDirectPlaySPVtbl *lpVtbl; DPSP_IMPL_FIELDS }; /* Forward declaration of virtual tables */ -static IDirectPlaySPVtbl directPlaySPVT; +static const IDirectPlaySPVtbl directPlaySPVT; /* This structure is passed to the DP object for safe keeping */ typedef struct tagDP_SPPLAYERDATA @@ -922,8 +922,7 @@ static VOID WINAPI IDirectPlaySPImpl_SendComplete This, unknownA, unknownB ); } - -static struct IDirectPlaySPVtbl directPlaySPVT = +static const IDirectPlaySPVtbl directPlaySPVT = { DPSP_QueryInterface, diff --git a/dlls/dplayx/dplobby.c b/dlls/dplayx/dplobby.c index d704f12f796..66f7e601b1f 100644 --- a/dlls/dplayx/dplobby.c +++ b/dlls/dplayx/dplobby.c @@ -118,34 +118,30 @@ typedef struct tagDirectPlayLobby3Data struct IDirectPlayLobbyImpl { - IDirectPlayLobbyVtbl *lpVtbl; + const IDirectPlayLobbyVtbl *lpVtbl; DPL_IMPL_FIELDS }; struct IDirectPlayLobby2Impl { - IDirectPlayLobby2Vtbl *lpVtbl; + const IDirectPlayLobby2Vtbl *lpVtbl; DPL_IMPL_FIELDS }; struct IDirectPlayLobby3Impl { - IDirectPlayLobby3Vtbl *lpVtbl; + const IDirectPlayLobby3Vtbl *lpVtbl; DPL_IMPL_FIELDS }; - /* Forward declarations of virtual tables */ -static IDirectPlayLobbyVtbl directPlayLobbyWVT; -static IDirectPlayLobby2Vtbl directPlayLobby2WVT; -static IDirectPlayLobby3Vtbl directPlayLobby3WVT; - -static IDirectPlayLobbyVtbl directPlayLobbyAVT; -static IDirectPlayLobby2Vtbl directPlayLobby2AVT; -static IDirectPlayLobby3Vtbl directPlayLobby3AVT; - - +static const IDirectPlayLobbyVtbl directPlayLobbyWVT; +static const IDirectPlayLobby2Vtbl directPlayLobby2WVT; +static const IDirectPlayLobby3Vtbl directPlayLobby3WVT; +static const IDirectPlayLobbyVtbl directPlayLobbyAVT; +static const IDirectPlayLobby2Vtbl directPlayLobby2AVT; +static const IDirectPlayLobby3Vtbl directPlayLobby3AVT; static BOOL DPL_CreateIUnknown( LPVOID lpDPL ) { @@ -1758,7 +1754,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_WaitForConnectionSettings /* Direct Play Lobby 1 (ascii) Virtual Table for methods */ /* All lobby 1 methods are exactly the same except QueryInterface */ -static struct IDirectPlayLobbyVtbl directPlayLobbyAVT = +static const IDirectPlayLobbyVtbl directPlayLobbyAVT = { XCAST(QueryInterface)DPL_QueryInterface, @@ -1788,7 +1784,7 @@ static struct IDirectPlayLobbyVtbl directPlayLobbyAVT = #endif /* Direct Play Lobby 1 (unicode) Virtual Table for methods */ -static IDirectPlayLobbyVtbl directPlayLobbyWVT = +static const IDirectPlayLobbyVtbl directPlayLobbyWVT = { XCAST(QueryInterface)DPL_QueryInterface, @@ -1817,7 +1813,7 @@ static IDirectPlayLobbyVtbl directPlayLobbyWVT = #endif /* Direct Play Lobby 2 (ascii) Virtual Table for methods */ -static IDirectPlayLobby2Vtbl directPlayLobby2AVT = +static const IDirectPlayLobby2Vtbl directPlayLobby2AVT = { XCAST(QueryInterface)DPL_QueryInterface, @@ -1848,7 +1844,7 @@ static IDirectPlayLobby2Vtbl directPlayLobby2AVT = #endif /* Direct Play Lobby 2 (unicode) Virtual Table for methods */ -static IDirectPlayLobby2Vtbl directPlayLobby2WVT = +static const IDirectPlayLobby2Vtbl directPlayLobby2WVT = { XCAST(QueryInterface)DPL_QueryInterface, @@ -1880,7 +1876,7 @@ static IDirectPlayLobby2Vtbl directPlayLobby2WVT = # define XCAST(fun) (void*) #endif -static IDirectPlayLobby3Vtbl directPlayLobby3AVT = +static const IDirectPlayLobby3Vtbl directPlayLobby3AVT = { XCAST(QueryInterface)DPL_QueryInterface, XCAST(AddRef)DPL_AddRef, @@ -1916,7 +1912,7 @@ static IDirectPlayLobby3Vtbl directPlayLobby3AVT = # define XCAST(fun) (void*) #endif -static IDirectPlayLobby3Vtbl directPlayLobby3WVT = +static const IDirectPlayLobby3Vtbl directPlayLobby3WVT = { XCAST(QueryInterface)DPL_QueryInterface, XCAST(AddRef)DPL_AddRef, diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c index 32d57c5451e..9bd555b4a9e 100644 --- a/dlls/dplayx/lobbysp.c +++ b/dlls/dplayx/lobbysp.c @@ -55,14 +55,13 @@ typedef struct tagDPLobbySPData struct IDPLobbySPImpl { - IDPLobbySPVtbl *lpVtbl; + const IDPLobbySPVtbl *lpVtbl; DPLSP_IMPL_FIELDS }; /* Forward declaration of virtual tables */ -static IDPLobbySPVtbl dpLobbySPVT; +static const IDPLobbySPVtbl dpLobbySPVT; -extern HRESULT DPLSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp ) { TRACE( " for %s\n", debugstr_guid( riid ) ); @@ -436,7 +435,7 @@ HRESULT WINAPI IDPLobbySPImpl_StartSession } -static struct IDPLobbySPVtbl dpLobbySPVT = +static const IDPLobbySPVtbl dpLobbySPVT = { DPLSP_QueryInterface, diff --git a/dlls/dpnet/address.c b/dlls/dpnet/address.c index 1b5706bf076..0eab7add00a 100644 --- a/dlls/dpnet/address.c +++ b/dlls/dpnet/address.c @@ -212,7 +212,7 @@ HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromDirectPlay4Address(PDIRECTPLAY8A return DPN_OK; } -IDirectPlay8AddressVtbl DirectPlay8Address_Vtbl = +static const IDirectPlay8AddressVtbl DirectPlay8Address_Vtbl = { IDirectPlay8AddressImpl_QueryInterface, IDirectPlay8AddressImpl_AddRef, diff --git a/dlls/dpnet/client.c b/dlls/dpnet/client.c index 88fefcb7d0e..7373d1c88af 100644 --- a/dlls/dpnet/client.c +++ b/dlls/dpnet/client.c @@ -225,7 +225,7 @@ HRESULT WINAPI IDirectPlay8ClientImpl_RegisterLobby(PDIRECTPLAY8CLIENT iface, CO return DPN_OK; } -IDirectPlay8ClientVtbl DirectPlay8Client_Vtbl = +static const IDirectPlay8ClientVtbl DirectPlay8Client_Vtbl = { IDirectPlay8ClientImpl_QueryInterface, IDirectPlay8ClientImpl_AddRef, diff --git a/dlls/dpnet/dpnet_main.c b/dlls/dpnet/dpnet_main.c index 5504409af11..62bd2918676 100644 --- a/dlls/dpnet/dpnet_main.c +++ b/dlls/dpnet/dpnet_main.c @@ -65,7 +65,7 @@ HRESULT WINAPI DirectPlay8Create(REFGUID lpGUID, LPVOID *ppvInt, LPUNKNOWN punkO typedef struct { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; REFCLSID rclsid; HRESULT (*pfnCreateInstanceFactory)(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj); @@ -102,7 +102,7 @@ static HRESULT WINAPI DICF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { return S_OK; } -static IClassFactoryVtbl DICF_Vtbl = { +static const IClassFactoryVtbl DICF_Vtbl = { DICF_QueryInterface, DICF_AddRef, DICF_Release, diff --git a/dlls/dpnet/dpnet_private.h b/dlls/dpnet/dpnet_private.h index 334b5558fa7..bbe90cde293 100644 --- a/dlls/dpnet/dpnet_private.h +++ b/dlls/dpnet/dpnet_private.h @@ -39,68 +39,35 @@ typedef struct IDirectPlay8AddressImpl IDirectPlay8AddressImpl; /* IDirectPlay8Client */ /* ------------------ */ -/***************************************************************************** - * Predeclare the interface implementation structures - */ -extern IDirectPlay8ClientVtbl DirectPlay8Client_Vtbl; - /***************************************************************************** * IDirectPlay8Client implementation structure */ struct IDirectPlay8ClientImpl { /* IUnknown fields */ - IDirectPlay8ClientVtbl *lpVtbl; + const IDirectPlay8ClientVtbl *lpVtbl; DWORD ref; /* IDirectPlay8Client fields */ }; /* IUnknown: */ -extern HRESULT WINAPI IDirectPlay8ClientImpl_QueryInterface(PDIRECTPLAY8CLIENT iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectPlay8ClientImpl_AddRef(PDIRECTPLAY8CLIENT iface); -extern ULONG WINAPI IDirectPlay8ClientImpl_Release(PDIRECTPLAY8CLIENT iface); - -/* IDirectPlay8Client: */ -extern HRESULT WINAPI IDirectPlay8ClientImpl_Initialize(PDIRECTPLAY8CLIENT iface, PVOID CONST pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_EnumServiceProviders(PDIRECTPLAY8CLIENT iface, CONST GUID * CONST pguidServiceProvider, CONST GUID * CONST pguidApplication, DPN_SERVICE_PROVIDER_INFO * CONST pSPInfoBuffer, PDWORD CONST pcbEnumData, PDWORD CONST pcReturned, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_EnumHosts(PDIRECTPLAY8CLIENT iface, PDPN_APPLICATION_DESC CONST pApplicationDesc,IDirectPlay8Address * CONST pAddrHost,IDirectPlay8Address * CONST pDeviceInfo, PVOID CONST pUserEnumData, CONST DWORD dwUserEnumDataSize, CONST DWORD dwEnumCount, CONST DWORD dwRetryInterval, CONST DWORD dwTimeOut, PVOID CONST pvUserContext, DPNHANDLE * CONST pAsyncHandle, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_CancelAsyncOperation(PDIRECTPLAY8CLIENT iface, CONST DPNHANDLE hAsyncHandle, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_Connect(PDIRECTPLAY8CLIENT iface, CONST DPN_APPLICATION_DESC * CONST pdnAppDesc,IDirectPlay8Address * CONST pHostAddr,IDirectPlay8Address * CONST pDeviceInfo, CONST DPN_SECURITY_DESC * CONST pdnSecurity, CONST DPN_SECURITY_CREDENTIALS * CONST pdnCredentials, CONST void * CONST pvUserConnectData, CONST DWORD dwUserConnectDataSize,void * CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_Send(PDIRECTPLAY8CLIENT iface, CONST DPN_BUFFER_DESC * CONST prgBufferDesc, CONST DWORD cBufferDesc, CONST DWORD dwTimeOut, void * CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_GetSendQueueInfo(PDIRECTPLAY8CLIENT iface, DWORD * CONST pdwNumMsgs, DWORD * CONST pdwNumBytes, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_GetApplicationDesc(PDIRECTPLAY8CLIENT iface, DPN_APPLICATION_DESC * CONST pAppDescBuffer, DWORD * CONST pcbDataSize, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_SetClientInfo(PDIRECTPLAY8CLIENT iface, CONST DPN_PLAYER_INFO * CONST pdpnPlayerInfo, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_GetServerInfo(PDIRECTPLAY8CLIENT iface, DPN_PLAYER_INFO * CONST pdpnPlayerInfo, DWORD * CONST pdwSize, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_GetServerAddress(PDIRECTPLAY8CLIENT iface, IDirectPlay8Address ** CONST pAddress, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_Close(PDIRECTPLAY8CLIENT iface, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_ReturnBuffer(PDIRECTPLAY8CLIENT iface, CONST DPNHANDLE hBufferHandle, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_GetCaps(PDIRECTPLAY8CLIENT iface, DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_SetCaps(PDIRECTPLAY8CLIENT iface, CONST DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_SetSPCaps(PDIRECTPLAY8CLIENT iface, CONST GUID * CONST pguidSP, CONST DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags ) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_GetSPCaps(PDIRECTPLAY8CLIENT iface, CONST GUID * CONST pguidSP, DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_GetConnectionInfo(PDIRECTPLAY8CLIENT iface, DPN_CONNECTION_INFO * CONST pdpConnectionInfo, CONST DWORD dwFlags) ; -extern HRESULT WINAPI IDirectPlay8ClientImpl_RegisterLobby(PDIRECTPLAY8CLIENT iface, CONST DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication * CONST pIDP8LobbiedApplication, CONST DWORD dwFlags) ; /* ------------------- */ /* IDirectPlay8Address */ /* ------------------- */ -/***************************************************************************** - * Predeclare the interface implementation structures - */ -extern IDirectPlay8AddressVtbl DirectPlay8Address_Vtbl; - /***************************************************************************** * IDirectPlay8Address implementation structure */ struct IDirectPlay8AddressImpl { /* IUnknown fields */ - IDirectPlay8AddressVtbl *lpVtbl; + const IDirectPlay8AddressVtbl *lpVtbl; DWORD ref; /* IDirectPlay8Address fields */ GUID SP_guid; - WCHAR* url; + const WCHAR *url; }; /* IUnknown: */ diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index 4bd4c9b2e9e..62c719c8673 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -124,7 +124,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions( return S_OK; } -IDirectSoundNotifyVtbl dsnvt = +static const IDirectSoundNotifyVtbl dsnvt = { IDirectSoundNotifyImpl_QueryInterface, IDirectSoundNotifyImpl_AddRef, @@ -954,7 +954,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface( return E_NOINTERFACE; } -static IDirectSoundBuffer8Vtbl dsbvt = +static const IDirectSoundBuffer8Vtbl dsbvt = { IDirectSoundBufferImpl_QueryInterface, IDirectSoundBufferImpl_AddRef, @@ -1449,7 +1449,7 @@ static HRESULT WINAPI SecondaryBufferImpl_GetObjectInPath( return IDirectSoundBufferImpl_GetObjectInPath((LPDIRECTSOUNDBUFFER8)This->dsb,rguidObject,dwIndex,rguidInterface,ppObject); } -static IDirectSoundBuffer8Vtbl sbvt = +static const IDirectSoundBuffer8Vtbl sbvt = { SecondaryBufferImpl_QueryInterface, SecondaryBufferImpl_AddRef, diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index d391d97961c..fe7e9b97c5a 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -64,9 +64,9 @@ static HRESULT WINAPI IDirectSoundFullDuplexImpl_Initialize( LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8, LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8 ); -static IDirectSoundCaptureVtbl dscvt; -static IDirectSoundCaptureBuffer8Vtbl dscbvt; -static IDirectSoundFullDuplexVtbl dsfdvt; +static const IDirectSoundCaptureVtbl dscvt; +static const IDirectSoundCaptureBuffer8Vtbl dscbvt; +static const IDirectSoundFullDuplexVtbl dsfdvt; static IDirectSoundCaptureImpl* dsound_capture = NULL; @@ -580,7 +580,7 @@ IDirectSoundCaptureImpl_Initialize( return err; } -static IDirectSoundCaptureVtbl dscvt = +static const IDirectSoundCaptureVtbl dscvt = { /* IUnknown methods */ IDirectSoundCaptureImpl_QueryInterface, @@ -858,7 +858,7 @@ static HRESULT WINAPI IDirectSoundCaptureNotifyImpl_SetNotificationPositions( return S_OK; } -IDirectSoundNotifyVtbl dscnvt = +static const IDirectSoundNotifyVtbl dscnvt = { IDirectSoundCaptureNotifyImpl_QueryInterface, IDirectSoundCaptureNotifyImpl_AddRef, @@ -1533,7 +1533,7 @@ IDirectSoundCaptureBufferImpl_GetFXStatus( return DS_OK; } -static IDirectSoundCaptureBuffer8Vtbl dscbvt = +static const IDirectSoundCaptureBuffer8Vtbl dscbvt = { /* IUnknown methods */ IDirectSoundCaptureBufferImpl_QueryInterface, @@ -1622,7 +1622,7 @@ DSCCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) return S_OK; } -static IClassFactoryVtbl DSCCF_Vtbl = +static const IClassFactoryVtbl DSCCF_Vtbl = { DSCCF_QueryInterface, DSCCF_AddRef, @@ -1770,7 +1770,7 @@ IDirectSoundFullDuplexImpl_Initialize( return E_FAIL; } -static IDirectSoundFullDuplexVtbl dsfdvt = +static const IDirectSoundFullDuplexVtbl dsfdvt = { /* IUnknown methods */ IDirectSoundFullDuplexImpl_QueryInterface, @@ -1849,7 +1849,7 @@ DSFDCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) return S_OK; } -static IClassFactoryVtbl DSFDCF_Vtbl = +static const IClassFactoryVtbl DSFDCF_Vtbl = { DSFDCF_QueryInterface, DSFDCF_AddRef, diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 5bfe58f62e0..afb3dcf12bc 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -844,7 +844,7 @@ static HRESULT WINAPI IDirectSoundImpl_VerifyCertification( return DS_OK; } -static IDirectSound8Vtbl IDirectSoundImpl_Vtbl = +static const IDirectSound8Vtbl IDirectSoundImpl_Vtbl = { IDirectSoundImpl_QueryInterface, IDirectSoundImpl_AddRef, @@ -1056,7 +1056,7 @@ static ULONG WINAPI IDirectSound_IUnknown_Release( return ref; } -static IUnknownVtbl DirectSound_Unknown_Vtbl = +static const IUnknownVtbl DirectSound_Unknown_Vtbl = { IDirectSound_IUnknown_QueryInterface, IDirectSound_IUnknown_AddRef, @@ -1209,7 +1209,7 @@ static HRESULT WINAPI IDirectSound_IDirectSound_Initialize( return IDirectSoundImpl_Initialize(This->pds,lpcGuid); } -static IDirectSoundVtbl DirectSound_DirectSound_Vtbl = +static const IDirectSoundVtbl DirectSound_DirectSound_Vtbl = { IDirectSound_IDirectSound_QueryInterface, IDirectSound_IDirectSound_AddRef, @@ -1295,7 +1295,7 @@ static ULONG WINAPI IDirectSound8_IUnknown_Release( return ref; } -static IUnknownVtbl DirectSound8_Unknown_Vtbl = +static const IUnknownVtbl DirectSound8_Unknown_Vtbl = { IDirectSound8_IUnknown_QueryInterface, IDirectSound8_IUnknown_AddRef, @@ -1448,7 +1448,7 @@ static HRESULT WINAPI IDirectSound8_IDirectSound_Initialize( return IDirectSoundImpl_Initialize(This->pds,lpcGuid); } -static IDirectSoundVtbl DirectSound8_DirectSound_Vtbl = +static const IDirectSoundVtbl DirectSound8_DirectSound_Vtbl = { IDirectSound8_IDirectSound_QueryInterface, IDirectSound8_IDirectSound_AddRef, @@ -1618,7 +1618,7 @@ static HRESULT WINAPI IDirectSound8_IDirectSound8_VerifyCertification( return IDirectSoundImpl_VerifyCertification(This->pds,pdwCertified); } -static IDirectSound8Vtbl DirectSound8_DirectSound8_Vtbl = +static const IDirectSound8Vtbl DirectSound8_DirectSound8_Vtbl = { IDirectSound8_IDirectSound8_QueryInterface, IDirectSound8_IDirectSound8_AddRef, diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index 26dd130ddd9..d67aa9bfd67 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -475,7 +475,7 @@ static HRESULT WINAPI DSCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { return S_OK; } -static IClassFactoryVtbl DSCF_Vtbl = { +static const IClassFactoryVtbl DSCF_Vtbl = { DSCF_QueryInterface, DSCF_AddRef, DSCF_Release, @@ -543,7 +543,7 @@ DSPCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { return S_OK; } -static IClassFactoryVtbl DSPCF_Vtbl = { +static const IClassFactoryVtbl DSPCF_Vtbl = { DSPCF_QueryInterface, DSPCF_AddRef, DSPCF_Release, diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index 875249f4d9a..a107ce34b51 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -71,7 +71,7 @@ typedef struct DirectSoundDevice DirectSoundDevice; struct IDirectSoundImpl { /* IUnknown fields */ - IDirectSound8Vtbl *lpVtbl; + const IDirectSound8Vtbl *lpVtbl; DWORD ref; DirectSoundDevice *device; @@ -136,7 +136,7 @@ HRESULT WINAPI DSOUND_Create8( * IDirectSound COM components */ struct IDirectSound_IUnknown { - IUnknownVtbl *lpVtbl; + const IUnknownVtbl *lpVtbl; DWORD ref; LPDIRECTSOUND8 pds; }; @@ -146,7 +146,7 @@ HRESULT WINAPI IDirectSound_IUnknown_Create( LPUNKNOWN * ppunk); struct IDirectSound_IDirectSound { - IDirectSoundVtbl *lpVtbl; + const IDirectSoundVtbl *lpVtbl; DWORD ref; LPDIRECTSOUND8 pds; }; @@ -159,7 +159,7 @@ HRESULT WINAPI IDirectSound_IDirectSound_Create( * IDirectSound8 COM components */ struct IDirectSound8_IUnknown { - IUnknownVtbl *lpVtbl; + const IUnknownVtbl *lpVtbl; DWORD ref; LPDIRECTSOUND8 pds; }; @@ -169,7 +169,7 @@ HRESULT WINAPI IDirectSound8_IUnknown_Create( LPUNKNOWN * ppunk); struct IDirectSound8_IDirectSound { - IDirectSoundVtbl *lpVtbl; + const IDirectSoundVtbl *lpVtbl; DWORD ref; LPDIRECTSOUND8 pds; }; @@ -179,7 +179,7 @@ HRESULT WINAPI IDirectSound8_IDirectSound_Create( LPDIRECTSOUND * ppds); struct IDirectSound8_IDirectSound8 { - IDirectSound8Vtbl *lpVtbl; + const IDirectSound8Vtbl *lpVtbl; DWORD ref; LPDIRECTSOUND8 pds; }; @@ -195,7 +195,7 @@ struct IDirectSoundBufferImpl { /* FIXME: document */ /* IUnknown fields */ - IDirectSoundBuffer8Vtbl *lpVtbl; + const IDirectSoundBuffer8Vtbl *lpVtbl; DWORD ref; /* IDirectSoundBufferImpl fields */ SecondaryBufferImpl* dsb; @@ -245,7 +245,7 @@ HRESULT WINAPI IDirectSoundBufferImpl_Destroy( */ struct SecondaryBufferImpl { - IDirectSoundBuffer8Vtbl *lpVtbl; + const IDirectSoundBuffer8Vtbl *lpVtbl; DWORD ref; IDirectSoundBufferImpl* dsb; }; @@ -261,7 +261,7 @@ HRESULT WINAPI SecondaryBufferImpl_Destroy( */ struct PrimaryBufferImpl { - IDirectSoundBuffer8Vtbl *lpVtbl; + const IDirectSoundBuffer8Vtbl *lpVtbl; DWORD ref; IDirectSoundImpl* dsound; }; @@ -277,7 +277,7 @@ HRESULT WINAPI PrimaryBufferImpl_Create( struct IDirectSoundCaptureImpl { /* IUnknown fields */ - IDirectSoundCaptureVtbl *lpVtbl; + const IDirectSoundCaptureVtbl *lpVtbl; DWORD ref; /* IDirectSoundCaptureImpl fields */ @@ -314,7 +314,7 @@ struct IDirectSoundCaptureImpl struct IDirectSoundCaptureBufferImpl { /* IUnknown fields */ - IDirectSoundCaptureBuffer8Vtbl *lpVtbl; + const IDirectSoundCaptureBuffer8Vtbl *lpVtbl; DWORD ref; /* IDirectSoundCaptureBufferImpl fields */ @@ -336,7 +336,7 @@ struct IDirectSoundCaptureBufferImpl struct IDirectSoundFullDuplexImpl { /* IUnknown fields */ - IDirectSoundFullDuplexVtbl *lpVtbl; + const IDirectSoundFullDuplexVtbl *lpVtbl; DWORD ref; /* IDirectSoundFullDuplexImpl fields */ @@ -349,7 +349,7 @@ struct IDirectSoundFullDuplexImpl struct IDirectSoundNotifyImpl { /* IUnknown fields */ - IDirectSoundNotifyVtbl *lpVtbl; + const IDirectSoundNotifyVtbl *lpVtbl; DWORD ref; IDirectSoundBufferImpl* dsb; }; @@ -366,7 +366,7 @@ HRESULT WINAPI IDirectSoundNotifyImpl_Destroy( struct IDirectSoundCaptureNotifyImpl { /* IUnknown fields */ - IDirectSoundNotifyVtbl *lpVtbl; + const IDirectSoundNotifyVtbl *lpVtbl; DWORD ref; IDirectSoundCaptureBufferImpl* dscb; }; @@ -381,7 +381,7 @@ HRESULT WINAPI IDirectSoundCaptureNotifyImpl_Create( struct IDirectSound3DListenerImpl { /* IUnknown fields */ - IDirectSound3DListenerVtbl *lpVtbl; + const IDirectSound3DListenerVtbl *lpVtbl; DWORD ref; /* IDirectSound3DListenerImpl fields */ IDirectSoundImpl* dsound; @@ -397,7 +397,7 @@ HRESULT WINAPI IDirectSound3DListenerImpl_Create( struct IKsBufferPropertySetImpl { /* IUnknown fields */ - IKsPropertySetVtbl *lpVtbl; + const IKsPropertySetVtbl *lpVtbl; DWORD ref; /* IKsPropertySetImpl fields */ IDirectSoundBufferImpl* dsb; @@ -415,7 +415,7 @@ HRESULT WINAPI IKsBufferPropertySetImpl_Destroy( struct IKsPrivatePropertySetImpl { /* IUnknown fields */ - IKsPropertySetVtbl *lpVtbl; + const IKsPropertySetVtbl *lpVtbl; DWORD ref; }; @@ -428,7 +428,7 @@ HRESULT WINAPI IKsPrivatePropertySetImpl_Create( struct IDirectSound3DBufferImpl { /* IUnknown fields */ - IDirectSound3DBufferVtbl *lpVtbl; + const IDirectSound3DBufferVtbl *lpVtbl; DWORD ref; /* IDirectSound3DBufferImpl fields */ IDirectSoundBufferImpl* dsb; @@ -446,7 +446,7 @@ HRESULT WINAPI IDirectSound3DBufferImpl_Destroy( struct IClassFactoryImpl { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; }; diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index fdcf6ee0be9..05e336677c9 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -1004,7 +1004,7 @@ static HRESULT WINAPI PrimaryBufferImpl_QueryInterface( return E_NOINTERFACE; } -static IDirectSoundBuffer8Vtbl dspbvt = +static const IDirectSoundBuffer8Vtbl dspbvt = { PrimaryBufferImpl_QueryInterface, PrimaryBufferImpl_AddRef, diff --git a/dlls/dsound/propset.c b/dlls/dsound/propset.c index ddfd187b6de..9f71e94234c 100644 --- a/dlls/dsound/propset.c +++ b/dlls/dsound/propset.c @@ -184,7 +184,7 @@ static HRESULT WINAPI IKsBufferPropertySetImpl_QuerySupport( return E_PROP_ID_UNSUPPORTED; } -static IKsPropertySetVtbl iksbvt = { +static const IKsPropertySetVtbl iksbvt = { IKsBufferPropertySetImpl_QueryInterface, IKsBufferPropertySetImpl_AddRef, IKsBufferPropertySetImpl_Release, @@ -1476,7 +1476,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport( return E_PROP_ID_UNSUPPORTED; } -static IKsPropertySetVtbl ikspvt = { +static const IKsPropertySetVtbl ikspvt = { IKsPrivatePropertySetImpl_QueryInterface, IKsPrivatePropertySetImpl_AddRef, IKsPrivatePropertySetImpl_Release, diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c index 500e85269b0..3505b0664c4 100644 --- a/dlls/dsound/sound3d.c +++ b/dlls/dsound/sound3d.c @@ -677,7 +677,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetVelocity( return DS_OK; } -static IDirectSound3DBufferVtbl ds3dbvt = +static const IDirectSound3DBufferVtbl ds3dbvt = { /* IUnknown methods */ IDirectSound3DBufferImpl_QueryInterface, @@ -1046,7 +1046,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_CommitDeferredSettings( return DS_OK; } -static IDirectSound3DListenerVtbl ds3dlvt = +static const IDirectSound3DListenerVtbl ds3dlvt = { /* IUnknown methods */ IDirectSound3DListenerImpl_QueryInterface, diff --git a/dlls/dswave/dswave.c b/dlls/dswave/dswave.c index 05b7c4b6a07..08b2859dc5d 100644 --- a/dlls/dswave/dswave.c +++ b/dlls/dswave/dswave.c @@ -24,7 +24,7 @@ WINE_DECLARE_DEBUG_CHANNEL(dmfile); /* an interface that is, according to my tests, obtained by loader after loading object; is it acting as some sort of bridge between object and loader? */ -const GUID IID_IDirectMusicWavePRIVATE = {0x69e934e4,0x97f1,0x4f1d,{0x88,0xe8,0xf2,0xac,0x88,0x67,0x13,0x27}}; +static const GUID IID_IDirectMusicWavePRIVATE = {0x69e934e4,0x97f1,0x4f1d,{0x88,0xe8,0xf2,0xac,0x88,0x67,0x13,0x27}}; /***************************************************************************** * IDirectMusicWaveImpl implementation @@ -88,7 +88,7 @@ ULONG WINAPI IDirectMusicWaveImpl_IUnknown_Release (LPUNKNOWN iface) { return refCount; } -IUnknownVtbl DirectMusicWave_Unknown_Vtbl = { +static const IUnknownVtbl DirectMusicWave_Unknown_Vtbl = { IDirectMusicWaveImpl_IUnknown_QueryInterface, IDirectMusicWaveImpl_IUnknown_AddRef, IDirectMusicWaveImpl_IUnknown_Release @@ -278,7 +278,7 @@ HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Unload (LPDIRECTMUSICSE return S_OK; } -IDirectMusicSegment8Vtbl DirectMusicSegment8_Segment_Vtbl = { +static const IDirectMusicSegment8Vtbl DirectMusicSegment8_Segment_Vtbl = { IDirectMusicWaveImpl_IDirectMusicSegment8_QueryInterface, IDirectMusicWaveImpl_IDirectMusicSegment8_AddRef, IDirectMusicWaveImpl_IDirectMusicSegment8_Release, @@ -517,7 +517,7 @@ HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_ParseDescriptor (LPDIRECT return S_OK; } -IDirectMusicObjectVtbl DirectMusicWave_Object_Vtbl = { +static const IDirectMusicObjectVtbl DirectMusicWave_Object_Vtbl = { IDirectMusicWaveImpl_IDirectMusicObject_QueryInterface, IDirectMusicWaveImpl_IDirectMusicObject_AddRef, IDirectMusicWaveImpl_IDirectMusicObject_Release, @@ -705,7 +705,7 @@ HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_GetSizeMax (LPPERSISTSTREAM i return E_NOTIMPL; } -IPersistStreamVtbl DirectMusicWave_PersistStream_Vtbl = { +static const IPersistStreamVtbl DirectMusicWave_PersistStream_Vtbl = { IDirectMusicWaveImpl_IPersistStream_QueryInterface, IDirectMusicWaveImpl_IPersistStream_AddRef, IDirectMusicWaveImpl_IPersistStream_Release, diff --git a/dlls/dswave/dswave_main.c b/dlls/dswave/dswave_main.c index 3a5a36a3ad0..537ab6b553c 100644 --- a/dlls/dswave/dswave_main.c +++ b/dlls/dswave/dswave_main.c @@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dswave); LONG DSWAVE_refCount = 0; typedef struct { - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; } IClassFactoryImpl; /****************************************************************** diff --git a/dlls/dswave/dswave_private.h b/dlls/dswave/dswave_private.h index 940e4010a4f..2ef01a8942c 100644 --- a/dlls/dswave/dswave_private.h +++ b/dlls/dswave/dswave_private.h @@ -45,16 +45,6 @@ */ typedef struct IDirectMusicWaveImpl IDirectMusicWaveImpl; - -/***************************************************************************** - * Predeclare the interface implementation structures - */ -extern IUnknownVtbl DirectMusicWave_Unknown_Vtbl; -extern IDirectMusicObjectVtbl DirectMusicWave_Object_Vtbl; -extern IPersistStreamVtbl DirectMusicWave_PersistStream_Vtbl; -extern IDirectMusicSegment8Vtbl DirectMusicWave_Segment_Vtbl; - - /***************************************************************************** * ClassFactory */ @@ -66,10 +56,10 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveImpl (LPCGUID lpcGUID, LPVOID* */ struct IDirectMusicWaveImpl { /* IUnknown fields */ - IUnknownVtbl *UnknownVtbl; - IDirectMusicSegment8Vtbl *SegmentVtbl; - IDirectMusicObjectVtbl *ObjectVtbl; - IPersistStreamVtbl *PersistStreamVtbl; + const IUnknownVtbl *UnknownVtbl; + const IDirectMusicSegment8Vtbl *SegmentVtbl; + const IDirectMusicObjectVtbl *ObjectVtbl; + const IPersistStreamVtbl *PersistStreamVtbl; DWORD ref; /* IDirectMusicWaveImpl fields */ @@ -78,57 +68,14 @@ struct IDirectMusicWaveImpl { }; /* IUnknown: */ -extern HRESULT WINAPI IDirectMusicWaveImpl_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicWaveImpl_IUnknown_AddRef (LPUNKNOWN iface); -extern ULONG WINAPI IDirectMusicWaveImpl_IUnknown_Release (LPUNKNOWN iface); /* IDirectMusicSegment(8): */ -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_QueryInterface (LPDIRECTMUSICSEGMENT8 iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_AddRef (LPDIRECTMUSICSEGMENT8 iface); -extern ULONG WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Release (LPDIRECTMUSICSEGMENT8 iface); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetLength (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME* pmtLength); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetLength (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtLength); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetRepeats (LPDIRECTMUSICSEGMENT8 iface, DWORD* pdwRepeats); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetRepeats (LPDIRECTMUSICSEGMENT8 iface, DWORD dwRepeats); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetDefaultResolution (LPDIRECTMUSICSEGMENT8 iface, DWORD* pdwResolution); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetDefaultResolution (LPDIRECTMUSICSEGMENT8 iface, DWORD dwResolution); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetTrack (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, IDirectMusicTrack** ppTrack); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetTrackGroup (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicTrack* pTrack, DWORD* pdwGroupBits); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_InsertTrack (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicTrack* pTrack, DWORD dwGroupBits); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_RemoveTrack (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicTrack* pTrack); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_InitPlay (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicSegmentState** ppSegState, IDirectMusicPerformance* pPerformance, DWORD dwFlags); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetGraph (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicGraph** ppGraph); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetGraph (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicGraph* pGraph); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_AddNotificationType (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidNotificationType); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_RemoveNotificationType (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidNotificationType); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetParam (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetParam (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void* pParam); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Clone (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicSegment** ppSegment); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetStartPoint (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtStart); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetStartPoint (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME* pmtStart); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetLoopPoints (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetLoopPoints (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME* pmtStart, MUSIC_TIME* pmtEnd); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetPChannelsUsed (LPDIRECTMUSICSEGMENT8 iface, DWORD dwNumPChannels, DWORD* paPChannels); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetTrackConfig (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetAudioPathConfig (LPDIRECTMUSICSEGMENT8 iface, IUnknown** ppAudioPathConfig); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Compose (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtTime, IDirectMusicSegment* pFromSegment, IDirectMusicSegment* pToSegment, IDirectMusicSegment** ppComposedSegment); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Download (LPDIRECTMUSICSEGMENT8 iface, IUnknown *pAudioPath); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Unload (LPDIRECTMUSICSEGMENT8 iface, IUnknown *pAudioPath); + /* IDirectMusicObject: */ -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_QueryInterface (LPDIRECTMUSICOBJECT iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDirectMusicWaveImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface); -extern ULONG WINAPI IDirectMusicWaveImpl_IDirectMusicObject_Release (LPDIRECTMUSICOBJECT iface); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_GetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_SetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc); -extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_ParseDescriptor (LPDIRECTMUSICOBJECT iface, LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc); /* IPersistStream: */ -extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject); extern ULONG WINAPI IDirectMusicWaveImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface); -extern ULONG WINAPI IDirectMusicWaveImpl_IPersistStream_Release (LPPERSISTSTREAM iface); -extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID); -extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_IsDirty (LPPERSISTSTREAM iface); -extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_Load (LPPERSISTSTREAM iface, IStream* pStm); -extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty); -extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize); /********************************************************************** * Dll lifetime tracking declaration for dswave.dll diff --git a/dlls/dxdiagn/container.c b/dlls/dxdiagn/container.c index 5b861f06176..d8593f02f76 100644 --- a/dlls/dxdiagn/container.c +++ b/dlls/dxdiagn/container.c @@ -257,8 +257,7 @@ HRESULT WINAPI IDxDiagContainerImpl_AddChildContainer(PDXDIAGCONTAINER iface, LP return S_OK; } - -IDxDiagContainerVtbl DxDiagContainer_Vtbl = +static const IDxDiagContainerVtbl DxDiagContainer_Vtbl = { IDxDiagContainerImpl_QueryInterface, IDxDiagContainerImpl_AddRef, diff --git a/dlls/dxdiagn/dxdiag_main.c b/dlls/dxdiagn/dxdiag_main.c index 6938ae0f1e3..b72f9cd464c 100644 --- a/dlls/dxdiagn/dxdiag_main.c +++ b/dlls/dxdiagn/dxdiag_main.c @@ -41,7 +41,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) * DXDiag ClassFactory */ typedef struct { - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; REFCLSID rclsid; HRESULT (*pfnCreateInstanceFactory)(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj); } IClassFactoryImpl; @@ -84,7 +84,7 @@ static HRESULT WINAPI DXDiagCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { return S_OK; } -static IClassFactoryVtbl DXDiagCF_Vtbl = { +static const IClassFactoryVtbl DXDiagCF_Vtbl = { DXDiagCF_QueryInterface, DXDiagCF_AddRef, DXDiagCF_Release, diff --git a/dlls/dxdiagn/dxdiag_private.h b/dlls/dxdiagn/dxdiag_private.h index d32f7537032..1a97af20b70 100644 --- a/dlls/dxdiagn/dxdiag_private.h +++ b/dlls/dxdiagn/dxdiag_private.h @@ -40,17 +40,12 @@ typedef struct IDxDiagContainerImpl IDxDiagContainerImpl; /* IDxDiagProvider */ /* ---------------- */ -/***************************************************************************** - * Predeclare the interface implementation structures - */ -extern IDxDiagProviderVtbl DxDiagProvider_Vtbl; - /***************************************************************************** * IDxDiagProvider implementation structure */ struct IDxDiagProviderImpl { /* IUnknown fields */ - IDxDiagProviderVtbl *lpVtbl; + const IDxDiagProviderVtbl *lpVtbl; DWORD ref; /* IDxDiagProvider fields */ BOOL init; @@ -84,17 +79,12 @@ typedef struct IDxDiagContainerImpl_Property { } IDxDiagContainerImpl_Property; -/***************************************************************************** - * Predeclare the interface implementation structures - */ -extern IDxDiagContainerVtbl DxDiagContainer_Vtbl; - /***************************************************************************** * IDxDiagContainer implementation structure */ struct IDxDiagContainerImpl { /* IUnknown fields */ - IDxDiagContainerVtbl *lpVtbl; + const IDxDiagContainerVtbl *lpVtbl; DWORD ref; /* IDxDiagContainer fields */ IDxDiagContainerImpl_Property* properties; @@ -106,15 +96,6 @@ struct IDxDiagContainerImpl { /* IUnknown: */ extern HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFIID riid, LPVOID *ppobj); extern ULONG WINAPI IDxDiagContainerImpl_AddRef(PDXDIAGCONTAINER iface); -extern ULONG WINAPI IDxDiagContainerImpl_Release(PDXDIAGCONTAINER iface); - -/* IDxDiagContainer: */ -extern HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfChildContainers(PDXDIAGCONTAINER iface, DWORD* pdwCount); -extern HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer); -extern HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance); -extern HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfProps(PDXDIAGCONTAINER iface, DWORD* pdwCount); -extern HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName); -extern HRESULT WINAPI IDxDiagContainerImpl_GetProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pvarProp); /** Internal */ extern HRESULT WINAPI IDxDiagContainerImpl_AddProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pVarProp); diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 9f586e7bd43..eddd69af4e2 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -105,7 +105,7 @@ HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface, IDxDi return IDxDiagContainerImpl_QueryInterface((PDXDIAGCONTAINER)This->pRootContainer, &IID_IDxDiagContainer, (void**) ppInstance); } -IDxDiagProviderVtbl DxDiagProvider_Vtbl = +static const IDxDiagProviderVtbl DxDiagProvider_Vtbl = { IDxDiagProviderImpl_QueryInterface, IDxDiagProviderImpl_AddRef, diff --git a/dlls/itss/itss.c b/dlls/itss/itss.c index 56308939a8b..38ac36c2fc7 100644 --- a/dlls/itss/itss.c +++ b/dlls/itss/itss.c @@ -158,7 +158,7 @@ static HRESULT WINAPI ITSSCF_LockServer(LPCLASSFACTORY iface, BOOL dolock) return S_OK; } -static IClassFactoryVtbl ITSSCF_Vtbl = +static const IClassFactoryVtbl ITSSCF_Vtbl = { ITSSCF_QueryInterface, ITSSCF_AddRef, @@ -215,7 +215,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) /*****************************************************************************/ typedef struct { - IITStorageVtbl *vtbl_IITStorage; + const IITStorageVtbl *vtbl_IITStorage; DWORD ref; } ITStorageImpl; @@ -378,7 +378,7 @@ HRESULT WINAPI ITStorageImpl_Compact( return E_NOTIMPL; } -static IITStorageVtbl ITStorageImpl_Vtbl = +static const IITStorageVtbl ITStorageImpl_Vtbl = { ITStorageImpl_QueryInterface, ITStorageImpl_AddRef, diff --git a/dlls/itss/moniker.c b/dlls/itss/moniker.c index 4a00aa76181..d5165d799e7 100644 --- a/dlls/itss/moniker.c +++ b/dlls/itss/moniker.c @@ -49,7 +49,7 @@ extern ULONG dll_count; /*****************************************************************************/ typedef struct { - IMonikerVtbl *vtbl_ITS_IMoniker; + const IMonikerVtbl *vtbl_ITS_IMoniker; DWORD ref; LPWSTR szHtml; WCHAR szFile[1]; @@ -322,7 +322,7 @@ static HRESULT WINAPI ITS_IMonikerImpl_IsSystemMoniker( return E_NOTIMPL; } -static IMonikerVtbl ITS_IMonikerImpl_Vtbl = +static const IMonikerVtbl ITS_IMonikerImpl_Vtbl = { ITS_IMonikerImpl_QueryInterface, ITS_IMonikerImpl_AddRef, @@ -377,7 +377,7 @@ static HRESULT ITS_IMoniker_create( IMoniker **ppObj, LPWSTR name, DWORD n ) /*****************************************************************************/ typedef struct { - IParseDisplayNameVtbl *vtbl_ITS_IParseDisplayName; + const IParseDisplayNameVtbl *vtbl_ITS_IParseDisplayName; DWORD ref; } ITS_IParseDisplayNameImpl; @@ -459,7 +459,7 @@ static HRESULT WINAPI ITS_IParseDisplayNameImpl_ParseDisplayName( &pszDisplayName[prefix_len], n-prefix_len ); } -static IParseDisplayNameVtbl ITS_IParseDisplayNameImpl_Vtbl = +static const IParseDisplayNameVtbl ITS_IParseDisplayNameImpl_Vtbl = { ITS_IParseDisplayNameImpl_QueryInterface, ITS_IParseDisplayNameImpl_AddRef, diff --git a/dlls/itss/storage.c b/dlls/itss/storage.c index 221cc832bba..457bef5ddd2 100644 --- a/dlls/itss/storage.c +++ b/dlls/itss/storage.c @@ -51,7 +51,7 @@ extern ULONG dll_count; typedef struct _ITSS_IStorageImpl { - IStorageVtbl *vtbl_IStorage; + const IStorageVtbl *vtbl_IStorage; DWORD ref; struct chmFile *chmfile; WCHAR dir[1]; @@ -65,14 +65,14 @@ struct enum_info typedef struct _IEnumSTATSTG_Impl { - IEnumSTATSTGVtbl *vtbl_IEnumSTATSTG; + const IEnumSTATSTGVtbl *vtbl_IEnumSTATSTG; DWORD ref; struct enum_info *first, *last, *current; } IEnumSTATSTG_Impl; typedef struct _IStream_Impl { - IStreamVtbl *vtbl_IStream; + const IStreamVtbl *vtbl_IStream; DWORD ref; ITSS_IStorageImpl *stg; ULONGLONG addr; @@ -233,7 +233,7 @@ static HRESULT WINAPI ITSS_IEnumSTATSTG_Clone( return E_NOTIMPL; } -struct IEnumSTATSTGVtbl IEnumSTATSTG_vtbl = +static const IEnumSTATSTGVtbl IEnumSTATSTG_vtbl = { ITSS_IEnumSTATSTG_QueryInterface, ITSS_IEnumSTATSTG_AddRef, @@ -535,7 +535,7 @@ HRESULT WINAPI ITSS_IStorageImpl_Stat( return E_NOTIMPL; } -static IStorageVtbl ITSS_IStorageImpl_Vtbl = +static const IStorageVtbl ITSS_IStorageImpl_Vtbl = { ITSS_IStorageImpl_QueryInterface, ITSS_IStorageImpl_AddRef, @@ -795,7 +795,7 @@ static HRESULT WINAPI ITSS_IStream_Clone( return E_NOTIMPL; } -struct IStreamVtbl ITSS_IStream_vtbl = +static const IStreamVtbl ITSS_IStream_vtbl = { ITSS_IStream_QueryInterface, ITSS_IStream_AddRef, diff --git a/dlls/mapi32/prop.c b/dlls/mapi32/prop.c index 4bf9feb7882..0e8cf88fd6c 100644 --- a/dlls/mapi32/prop.c +++ b/dlls/mapi32/prop.c @@ -1397,7 +1397,7 @@ typedef struct /* The main property data collection structure */ typedef struct { - IPropDataVtbl *lpVtbl; + const IPropDataVtbl *lpVtbl; LONG lRef; /* Reference count */ ALLOCATEBUFFER *lpAlloc; /* Memory allocation routine */ ALLOCATEMORE *lpMore; /* Linked memory allocation routine */ @@ -2472,7 +2472,7 @@ IPropData_fnHrAddObjProps(LPPROPDATA iface, LPSPropTagArray lpTags, #endif } -static struct IPropDataVtbl IPropDataImpl_vtbl = +static const IPropDataVtbl IPropDataImpl_vtbl = { IPropData_fnQueryInterface, IPropData_fnAddRef, diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c index 90e4941cb5c..fb709622d1b 100644 --- a/dlls/mlang/mlang.c +++ b/dlls/mlang/mlang.c @@ -736,7 +736,7 @@ static HRESULT WINAPI MLANGCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) return S_OK; } -static IClassFactoryVtbl MLANGCF_Vtbl = +static const IClassFactoryVtbl MLANGCF_Vtbl = { MLANGCF_QueryInterface, MLANGCF_AddRef, @@ -790,9 +790,9 @@ HRESULT WINAPI MLANG_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) typedef struct tagMLang_impl { - IMLangFontLinkVtbl *vtbl_IMLangFontLink; - IMultiLanguageVtbl *vtbl_IMultiLanguage; - IMultiLanguage2Vtbl *vtbl_IMultiLanguage2; + const IMLangFontLinkVtbl *vtbl_IMLangFontLink; + const IMultiLanguageVtbl *vtbl_IMultiLanguage; + const IMultiLanguage2Vtbl *vtbl_IMultiLanguage2; DWORD ref; DWORD total_cp, total_scripts; } MLang_impl; @@ -857,7 +857,7 @@ static HRESULT WINAPI MLang_QueryInterface( typedef struct tagEnumCodePage_impl { - IEnumCodePageVtbl *vtbl_IEnumCodePage; + const IEnumCodePageVtbl *vtbl_IEnumCodePage; DWORD ref; MIMECPINFO *cpinfo; DWORD total, pos; @@ -982,7 +982,7 @@ static HRESULT WINAPI fnIEnumCodePage_Skip( return S_OK; } -static IEnumCodePageVtbl IEnumCodePage_vtbl = +static const IEnumCodePageVtbl IEnumCodePage_vtbl = { fnIEnumCodePage_QueryInterface, fnIEnumCodePage_AddRef, @@ -1043,7 +1043,7 @@ static HRESULT EnumCodePage_create( MLang_impl* mlang, DWORD grfFlags, typedef struct tagEnumScript_impl { - IEnumScriptVtbl *vtbl_IEnumScript; + const IEnumScriptVtbl *vtbl_IEnumScript; DWORD ref; SCRIPTINFO *script_info; DWORD total, pos; @@ -1151,7 +1151,7 @@ static HRESULT WINAPI fnIEnumScript_Skip( return S_OK; } -static IEnumScriptVtbl IEnumScript_vtbl = +static const IEnumScriptVtbl IEnumScript_vtbl = { fnIEnumScript_QueryInterface, fnIEnumScript_AddRef, @@ -1302,7 +1302,7 @@ static HRESULT WINAPI fnIMLangFontLink_ResetFontMapping( } -static IMLangFontLinkVtbl IMLangFontLink_vtbl = +static const IMLangFontLinkVtbl IMLangFontLink_vtbl = { fnIMLangFontLink_QueryInterface, fnIMLangFontLink_AddRef, @@ -1486,7 +1486,7 @@ static HRESULT WINAPI fnIMultiLanguage_CreateConvertCharset( return E_NOTIMPL; } -static IMultiLanguageVtbl IMultiLanguage_vtbl = +static const IMultiLanguageVtbl IMultiLanguage_vtbl = { fnIMultiLanguage_QueryInterface, fnIMultiLanguage_AddRef, @@ -1928,7 +1928,7 @@ static HRESULT WINAPI fnIMultiLanguage2_ValidateCodePageEx( return S_FALSE; } -static IMultiLanguage2Vtbl IMultiLanguage2_vtbl = +static const IMultiLanguage2Vtbl IMultiLanguage2_vtbl = { fnIMultiLanguage2_QueryInterface, fnIMultiLanguage2_AddRef, diff --git a/dlls/msdmo/dmoreg.c b/dlls/msdmo/dmoreg.c index c43a2d0ab4e..b10474e829c 100644 --- a/dlls/msdmo/dmoreg.c +++ b/dlls/msdmo/dmoreg.c @@ -79,7 +79,7 @@ static const WCHAR szCat2Fmt[] = typedef struct { - IEnumDMOVtbl *lpVtbl; + const IEnumDMOVtbl *lpVtbl; DWORD ref; DWORD index; const GUID* guidCategory; @@ -91,10 +91,10 @@ typedef struct HKEY hkey; } IEnumDMOImpl; -const GUID IID_IEnumDMO = { 0x2c3cd98a, 0x2bfa, 0x4a53, +static const GUID IID_IEnumDMO = { 0x2c3cd98a, 0x2bfa, 0x4a53, { 0x9c, 0x27, 0x52, 0x49, 0xba, 0x64, 0xba, 0x0f}}; -static struct IEnumDMOVtbl edmovt; +static const IEnumDMOVtbl edmovt; static LPWSTR GUIDToString(LPWSTR lpwstr, REFGUID lpcguid) { @@ -642,7 +642,7 @@ HRESULT WINAPI DMOEnum( } -static IEnumDMOVtbl edmovt = +static const IEnumDMOVtbl edmovt = { IEnumDMO_fnQueryInterface, IEnumDMO_fnAddRef, diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 8005e53062b..8286ec1ecf4 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -816,7 +816,7 @@ static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR return E_NOTIMPL; } -static IHTMLDocument2Vtbl HTMLDocumentVtbl = { +static const IHTMLDocument2Vtbl HTMLDocumentVtbl = { HTMLDocument_QueryInterface, HTMLDocument_AddRef, HTMLDocument_Release, diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index a20f61b3eee..cfe94983689 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -17,14 +17,14 @@ */ typedef struct { - IHTMLDocument2Vtbl *lpHTMLDocument2Vtbl; - IPersistMonikerVtbl *lpPersistMonikerVtbl; - IPersistFileVtbl *lpPersistFileVtbl; - IMonikerPropVtbl *lpMonikerPropVtbl; - IOleObjectVtbl *lpOleObjectVtbl; - IOleDocumentVtbl *lpOleDocumentVtbl; - IOleDocumentViewVtbl *lpOleDocumentViewVtbl; - IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl; + const IHTMLDocument2Vtbl *lpHTMLDocument2Vtbl; + const IPersistMonikerVtbl *lpPersistMonikerVtbl; + const IPersistFileVtbl *lpPersistFileVtbl; + const IMonikerPropVtbl *lpMonikerPropVtbl; + const IOleObjectVtbl *lpOleObjectVtbl; + const IOleDocumentVtbl *lpOleDocumentVtbl; + const IOleDocumentViewVtbl *lpOleDocumentViewVtbl; + const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl; ULONG ref; diff --git a/dlls/mshtml/oleobj.c b/dlls/mshtml/oleobj.c index 2069a7987e6..1db353083fc 100644 --- a/dlls/mshtml/oleobj.c +++ b/dlls/mshtml/oleobj.c @@ -266,7 +266,7 @@ static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE *pL return E_NOTIMPL; } -static IOleObjectVtbl OleObjectVtbl = { +static const IOleObjectVtbl OleObjectVtbl = { OleObject_QueryInterface, OleObject_AddRef, OleObject_Release, @@ -365,7 +365,7 @@ static HRESULT WINAPI OleDocument_EnumViews(IOleDocument *iface, IEnumOleDocumen return E_NOTIMPL; } -static IOleDocumentVtbl OleDocumentVtbl = { +static const IOleDocumentVtbl OleDocumentVtbl = { OleDocument_QueryInterface, OleDocument_AddRef, OleDocument_Release, @@ -454,7 +454,7 @@ static HRESULT WINAPI OleInPlaceActiveObject_EnableModeless(IOleInPlaceActiveObj return E_NOTIMPL; } -static IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = { +static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = { OleInPlaceActiveObject_QueryInterface, OleInPlaceActiveObject_AddRef, OleInPlaceActiveObject_Release, diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 81c69b06cac..2f78fbcb0d7 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -101,7 +101,7 @@ static HRESULT WINAPI PersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoni return E_NOTIMPL; } -static IPersistMonikerVtbl PersistMonikerVtbl = { +static const IPersistMonikerVtbl PersistMonikerVtbl = { PersistMoniker_QueryInterface, PersistMoniker_AddRef, PersistMoniker_Release, @@ -144,7 +144,7 @@ static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPER return E_NOTIMPL; } -static IMonikerPropVtbl MonikerPropVtbl = { +static const IMonikerPropVtbl MonikerPropVtbl = { MonikerProp_QueryInterface, MonikerProp_AddRef, MonikerProp_Release, @@ -217,7 +217,7 @@ static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *iface, LPOLESTR *pszF return E_NOTIMPL; } -static IPersistFileVtbl PersistFileVtbl = { +static const IPersistFileVtbl PersistFileVtbl = { PersistFile_QueryInterface, PersistFile_AddRef, PersistFile_Release, diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c index ed9b4075844..9f9ba609f03 100644 --- a/dlls/mshtml/view.c +++ b/dlls/mshtml/view.c @@ -355,7 +355,7 @@ static HRESULT WINAPI OleDocumentView_Clone(IOleDocumentView *iface, IOleInPlace return E_NOTIMPL; } -static IOleDocumentViewVtbl OleDocumentViewVtbl = { +static const IOleDocumentViewVtbl OleDocumentViewVtbl = { OleDocumentView_QueryInterface, OleDocumentView_AddRef, OleDocumentView_Release, diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index d7ce2c01d60..2761f3aa9e4 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -1264,7 +1264,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) typedef struct tagIClassFactoryImpl { - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; } IClassFactoryImpl; static HRESULT WINAPI MsiCF_QueryInterface(LPCLASSFACTORY iface, @@ -1302,7 +1302,7 @@ static HRESULT WINAPI MsiCF_LockServer(LPCLASSFACTORY iface, BOOL dolock) return S_OK; } -static IClassFactoryVtbl MsiCF_Vtbl = +static const IClassFactoryVtbl MsiCF_Vtbl = { MsiCF_QueryInterface, MsiCF_AddRef,