diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index 35054668891..2ce5225424d 100644 --- a/dlls/amstream/amstream.c +++ b/dlls/amstream/amstream.c @@ -39,7 +39,7 @@ typedef struct { ULONG ref; } IAMMultiMediaStreamImpl; -static struct IAMMultiMediaStreamVtbl AM_Vtbl; +static const struct IAMMultiMediaStreamVtbl AM_Vtbl; HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) { @@ -247,7 +247,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream* iface, return E_NOTIMPL; } -static IAMMultiMediaStreamVtbl AM_Vtbl = +static const IAMMultiMediaStreamVtbl AM_Vtbl = { IAMMultiMediaStreamImpl_QueryInterface, IAMMultiMediaStreamImpl_AddRef, diff --git a/dlls/amstream/main.c b/dlls/amstream/main.c index e31558ed1a7..161de18f806 100644 --- a/dlls/amstream/main.c +++ b/dlls/amstream/main.c @@ -141,7 +141,7 @@ static HRESULT WINAPI AMCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) return S_OK; } -static IClassFactoryVtbl DSCF_Vtbl = +static const IClassFactoryVtbl DSCF_Vtbl = { AMCF_QueryInterface, AMCF_AddRef, diff --git a/dlls/atl/registrar.c b/dlls/atl/registrar.c index 069af7f0df7..b7f66091459 100644 --- a/dlls/atl/registrar.c +++ b/dlls/atl/registrar.c @@ -78,7 +78,7 @@ typedef struct rep_list_str { } rep_list; typedef struct { - IRegistrarVtbl *lpVtbl; + const IRegistrarVtbl *lpVtbl; ULONG ref; rep_list *rep; } Registrar; @@ -644,7 +644,7 @@ static HRESULT WINAPI Registrar_ResourceUnregister(IRegistrar* iface, LPCOLESTR return resource_register(This, resFileName, (LPOLESTR)nID, szType, FALSE); } -static IRegistrarVtbl RegistrarVtbl = { +static const IRegistrarVtbl RegistrarVtbl = { Registrar_QueryInterface, Registrar_AddRef, Registrar_Release, diff --git a/dlls/avifil32/acmstream.c b/dlls/avifil32/acmstream.c index 65bb5b88425..e4fba3062d2 100644 --- a/dlls/avifil32/acmstream.c +++ b/dlls/avifil32/acmstream.c @@ -54,7 +54,7 @@ static HRESULT WINAPI ACMStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp, static HRESULT WINAPI ACMStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size); static HRESULT WINAPI ACMStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen); -struct IAVIStreamVtbl iacmst = { +static const struct IAVIStreamVtbl iacmst = { ACMStream_fnQueryInterface, ACMStream_fnAddRef, ACMStream_fnRelease, @@ -73,7 +73,7 @@ struct IAVIStreamVtbl iacmst = { typedef struct _IAVIStreamImpl { /* IUnknown stuff */ - IAVIStreamVtbl *lpVtbl; + const IAVIStreamVtbl *lpVtbl; DWORD ref; /* IAVIStream stuff */ diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index 55e32680720..ff860d7cf09 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -69,7 +69,7 @@ static HRESULT WINAPI IAVIFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpDat static HRESULT WINAPI IAVIFile_fnEndRecord(IAVIFile*iface); static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam); -struct IAVIFileVtbl iavift = { +static const struct IAVIFileVtbl iavift = { IAVIFile_fnQueryInterface, IAVIFile_fnAddRef, IAVIFile_fnRelease, @@ -92,7 +92,7 @@ static HRESULT WINAPI IPersistFile_fnSave(IPersistFile*iface,LPCOLESTR pszFileNa static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile*iface,LPCOLESTR pszFileName); static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile*iface,LPOLESTR*ppszFileName); -struct IPersistFileVtbl ipersistft = { +static const struct IPersistFileVtbl ipersistft = { IPersistFile_fnQueryInterface, IPersistFile_fnAddRef, IPersistFile_fnRelease, @@ -119,7 +119,7 @@ static HRESULT WINAPI IAVIStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp static HRESULT WINAPI IAVIStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size); static HRESULT WINAPI IAVIStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen); -struct IAVIStreamVtbl iavist = { +static const struct IAVIStreamVtbl iavist = { IAVIStream_fnQueryInterface, IAVIStream_fnAddRef, IAVIStream_fnRelease, @@ -140,7 +140,7 @@ typedef struct _IAVIFileImpl IAVIFileImpl; typedef struct _IPersistFileImpl { /* IUnknown stuff */ - IPersistFileVtbl *lpVtbl; + const IPersistFileVtbl *lpVtbl; /* IPersistFile stuff */ IAVIFileImpl *paf; @@ -148,7 +148,7 @@ typedef struct _IPersistFileImpl { typedef struct _IAVIStreamImpl { /* IUnknown stuff */ - IAVIStreamVtbl *lpVtbl; + const IAVIStreamVtbl *lpVtbl; DWORD ref; /* IAVIStream stuff */ @@ -177,7 +177,7 @@ typedef struct _IAVIStreamImpl { struct _IAVIFileImpl { /* IUnknown stuff */ - IAVIFileVtbl *lpVtbl; + const IAVIFileVtbl *lpVtbl; DWORD ref; /* IAVIFile stuff... */ diff --git a/dlls/avifil32/editstream.c b/dlls/avifil32/editstream.c index 4f284ab50df..3f7d9bd9a66 100644 --- a/dlls/avifil32/editstream.c +++ b/dlls/avifil32/editstream.c @@ -80,7 +80,7 @@ static HRESULT WINAPI IAVIEditStream_fnClone(IAVIEditStream*iface, static HRESULT WINAPI IAVIEditStream_fnSetInfo(IAVIEditStream*iface, LPAVISTREAMINFOW asi,LONG size); -struct IAVIEditStreamVtbl ieditstream = { +static const struct IAVIEditStreamVtbl ieditstream = { IAVIEditStream_fnQueryInterface, IAVIEditStream_fnAddRef, IAVIEditStream_fnRelease, @@ -115,7 +115,7 @@ static HRESULT WINAPI IEditAVIStream_fnWriteData(IAVIStream*iface,DWORD fcc, LPVOID lp,LONG size); static HRESULT WINAPI IEditAVIStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen); -struct IAVIStreamVtbl ieditstast = { +static const struct IAVIStreamVtbl ieditstast = { IEditAVIStream_fnQueryInterface, IEditAVIStream_fnAddRef, IEditAVIStream_fnRelease, @@ -137,7 +137,7 @@ static ULONG WINAPI IEditStreamInternal_fnAddRef(IEditStreamInternal*iface); static ULONG WINAPI IEditStreamInternal_fnRelease(IEditStreamInternal*iface); static HRESULT WINAPI IEditStreamInternal_fnGetEditStreamImpl(IEditStreamInternal*iface,LPVOID*ppimpl); -struct IEditStreamInternalVtbl ieditstreaminternal = { +static const struct IEditStreamInternalVtbl ieditstreaminternal = { IEditStreamInternal_fnQueryInterface, IEditStreamInternal_fnAddRef, IEditStreamInternal_fnRelease, @@ -148,7 +148,7 @@ typedef struct _IAVIEditStreamImpl IAVIEditStreamImpl; typedef struct _IEditAVIStreamImpl { /* IUnknown stuff */ - IAVIStreamVtbl *lpVtbl; + const IAVIStreamVtbl *lpVtbl; /* IAVIStream stuff */ IAVIEditStreamImpl *pae; @@ -156,7 +156,7 @@ typedef struct _IEditAVIStreamImpl { typedef struct _IEditStreamInternalImpl { /* IUnknown stuff */ - IEditStreamInternalVtbl *lpVtbl; + const IEditStreamInternalVtbl *lpVtbl; /* IEditStreamInternal stuff */ IAVIEditStreamImpl *pae; @@ -164,7 +164,7 @@ typedef struct _IEditStreamInternalImpl { struct _IAVIEditStreamImpl { /* IUnknown stuff */ - IAVIEditStreamVtbl *lpVtbl; + const IAVIEditStreamVtbl *lpVtbl; DWORD ref; /* IAVIEditStream stuff */ diff --git a/dlls/avifil32/factory.c b/dlls/avifil32/factory.c index b64a3599374..2dc53aea576 100644 --- a/dlls/avifil32/factory.c +++ b/dlls/avifil32/factory.c @@ -50,7 +50,7 @@ static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface); static HRESULT WINAPI IClassFactory_fnCreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj); static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface,BOOL dolock); -static IClassFactoryVtbl iclassfact = { +static const IClassFactoryVtbl iclassfact = { IClassFactory_fnQueryInterface, IClassFactory_fnAddRef, IClassFactory_fnRelease, @@ -61,7 +61,7 @@ static IClassFactoryVtbl iclassfact = { typedef struct { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD dwRef; CLSID clsid; diff --git a/dlls/avifil32/getframe.c b/dlls/avifil32/getframe.c index a9f71a1df6e..3ff4910708f 100644 --- a/dlls/avifil32/getframe.c +++ b/dlls/avifil32/getframe.c @@ -54,7 +54,7 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface, LPVOID lpBits, INT x, INT y, INT dx, INT dy); -struct IGetFrameVtbl igetframeVtbl = { +static const struct IGetFrameVtbl igetframeVtbl = { IGetFrame_fnQueryInterface, IGetFrame_fnAddRef, IGetFrame_fnRelease, @@ -66,7 +66,7 @@ struct IGetFrameVtbl igetframeVtbl = { typedef struct _IGetFrameImpl { /* IUnknown stuff */ - IGetFrameVtbl *lpVtbl; + const IGetFrameVtbl *lpVtbl; DWORD ref; /* IGetFrame stuff */ diff --git a/dlls/avifil32/icmstream.c b/dlls/avifil32/icmstream.c index e0d8c21ca13..6d375cec322 100644 --- a/dlls/avifil32/icmstream.c +++ b/dlls/avifil32/icmstream.c @@ -57,7 +57,7 @@ static HRESULT WINAPI ICMStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp, static HRESULT WINAPI ICMStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size); static HRESULT WINAPI ICMStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen); -struct IAVIStreamVtbl iicmst = { +static const struct IAVIStreamVtbl iicmst = { ICMStream_fnQueryInterface, ICMStream_fnAddRef, ICMStream_fnRelease, @@ -76,7 +76,7 @@ struct IAVIStreamVtbl iicmst = { typedef struct _IAVIStreamImpl { /* IUnknown stuff */ - IAVIStreamVtbl *lpVtbl; + const IAVIStreamVtbl *lpVtbl; DWORD ref; /* IAVIStream stuff */ diff --git a/dlls/avifil32/tmpfile.c b/dlls/avifil32/tmpfile.c index b758c0268b0..b0b6c435323 100644 --- a/dlls/avifil32/tmpfile.c +++ b/dlls/avifil32/tmpfile.c @@ -50,7 +50,7 @@ static HRESULT WINAPI ITmpFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpDat static HRESULT WINAPI ITmpFile_fnEndRecord(IAVIFile*iface); static HRESULT WINAPI ITmpFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam); -struct IAVIFileVtbl itmpft = { +static const struct IAVIFileVtbl itmpft = { ITmpFile_fnQueryInterface, ITmpFile_fnAddRef, ITmpFile_fnRelease, @@ -65,7 +65,7 @@ struct IAVIFileVtbl itmpft = { typedef struct _ITmpFileImpl { /* IUnknown stuff */ - IAVIFileVtbl *lpVtbl; + const IAVIFileVtbl *lpVtbl; DWORD ref; /* IAVIFile stuff */ diff --git a/dlls/avifil32/wavfile.c b/dlls/avifil32/wavfile.c index 34e1a88505a..d14563fe9e5 100644 --- a/dlls/avifil32/wavfile.c +++ b/dlls/avifil32/wavfile.c @@ -99,7 +99,7 @@ static HRESULT WINAPI IAVIFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpDat static HRESULT WINAPI IAVIFile_fnEndRecord(IAVIFile*iface); static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam); -struct IAVIFileVtbl iwavft = { +static const struct IAVIFileVtbl iwavft = { IAVIFile_fnQueryInterface, IAVIFile_fnAddRef, IAVIFile_fnRelease, @@ -122,7 +122,7 @@ static HRESULT WINAPI IPersistFile_fnSave(IPersistFile*iface,LPCOLESTR pszFileNa static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile*iface,LPCOLESTR pszFileName); static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile*iface,LPOLESTR*ppszFileName); -struct IPersistFileVtbl iwavpft = { +static const struct IPersistFileVtbl iwavpft = { IPersistFile_fnQueryInterface, IPersistFile_fnAddRef, IPersistFile_fnRelease, @@ -149,7 +149,7 @@ static HRESULT WINAPI IAVIStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp static HRESULT WINAPI IAVIStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size); static HRESULT WINAPI IAVIStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen); -struct IAVIStreamVtbl iwavst = { +static const struct IAVIStreamVtbl iwavst = { IAVIStream_fnQueryInterface, IAVIStream_fnAddRef, IAVIStream_fnRelease, @@ -170,7 +170,7 @@ typedef struct _IAVIFileImpl IAVIFileImpl; typedef struct _IPersistFileImpl { /* IUnknown stuff */ - IPersistFileVtbl *lpVtbl; + const IPersistFileVtbl *lpVtbl; /* IPersistFile stuff */ IAVIFileImpl *paf; @@ -178,7 +178,7 @@ typedef struct _IPersistFileImpl { typedef struct _IAVIStreamImpl { /* IUnknown stuff */ - IAVIStreamVtbl *lpVtbl; + const IAVIStreamVtbl *lpVtbl; /* IAVIStream stuff */ IAVIFileImpl *paf; @@ -186,7 +186,7 @@ typedef struct _IAVIStreamImpl { struct _IAVIFileImpl { /* IUnknown stuff */ - IAVIFileVtbl *lpVtbl; + const IAVIFileVtbl *lpVtbl; DWORD ref; /* IAVIFile, IAVIStream stuff... */ diff --git a/dlls/comcat/comcat_private.h b/dlls/comcat/comcat_private.h index 204e04f9fe0..870d1d394ff 100644 --- a/dlls/comcat/comcat_private.h +++ b/dlls/comcat/comcat_private.h @@ -46,7 +46,7 @@ extern DWORD dll_ref; typedef struct { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; } ClassFactoryImpl; @@ -58,15 +58,15 @@ extern ClassFactoryImpl COMCAT_ClassFactory; typedef struct { /* IUnknown fields */ - IUnknownVtbl *unkVtbl; - ICatRegisterVtbl *regVtbl; - ICatInformationVtbl *infVtbl; + const IUnknownVtbl *unkVtbl; + const ICatRegisterVtbl *regVtbl; + const ICatInformationVtbl *infVtbl; DWORD ref; } ComCatMgrImpl; -extern ComCatMgrImpl COMCAT_ComCatMgr; -extern ICatRegisterVtbl COMCAT_ICatRegister_Vtbl; -extern ICatInformationVtbl COMCAT_ICatInformation_Vtbl; +extern const ComCatMgrImpl COMCAT_ComCatMgr; +extern const ICatRegisterVtbl COMCAT_ICatRegister_Vtbl; +extern const ICatInformationVtbl COMCAT_ICatInformation_Vtbl; /********************************************************************** * Global string constant declarations diff --git a/dlls/comcat/factory.c b/dlls/comcat/factory.c index f793b94f8e4..41d45d0d403 100644 --- a/dlls/comcat/factory.c +++ b/dlls/comcat/factory.c @@ -134,7 +134,7 @@ static HRESULT WINAPI COMCAT_IClassFactory_LockServer( /********************************************************************** * IClassFactory_Vtbl */ -static IClassFactoryVtbl IClassFactory_Vtbl = +static const IClassFactoryVtbl IClassFactory_Vtbl = { COMCAT_IClassFactory_QueryInterface, COMCAT_IClassFactory_AddRef, diff --git a/dlls/comcat/information.c b/dlls/comcat/information.c index 3d67004bf31..e4a7f86a264 100644 --- a/dlls/comcat/information.c +++ b/dlls/comcat/information.c @@ -236,7 +236,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumImplCategoriesOfClass( LPENUMCATID *ppenumCATID) { /* ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface); */ - WCHAR postfix[24] = { '\\', 'I', 'm', 'p', 'l', 'e', 'm', 'e', + static const WCHAR postfix[24] = { '\\', 'I', 'm', 'p', 'l', 'e', 'm', 'e', 'n', 't', 'e', 'd', ' ', 'C', 'a', 't', 'e', 'g', 'o', 'r', 'i', 'e', 's', 0 }; @@ -259,7 +259,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumReqCategoriesOfClass( LPENUMCATID *ppenumCATID) { /* ICOM_THIS_MULTI(ComCatMgrImpl, infVtbl, iface); */ - WCHAR postfix[21] = { '\\', 'R', 'e', 'q', 'u', 'i', 'r', 'e', + static const WCHAR postfix[21] = { '\\', 'R', 'e', 'q', 'u', 'i', 'r', 'e', 'd', ' ', 'C', 'a', 't', 'e', 'g', 'o', 'r', 'i', 'e', 's', 0 }; @@ -276,7 +276,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_EnumReqCategoriesOfClass( /********************************************************************** * COMCAT_ICatInformation_Vtbl */ -ICatInformationVtbl COMCAT_ICatInformation_Vtbl = +const ICatInformationVtbl COMCAT_ICatInformation_Vtbl = { COMCAT_ICatInformation_QueryInterface, COMCAT_ICatInformation_AddRef, @@ -297,7 +297,7 @@ ICatInformationVtbl COMCAT_ICatInformation_Vtbl = */ typedef struct { - IEnumCATEGORYINFOVtbl *lpVtbl; + const IEnumCATEGORYINFOVtbl *lpVtbl; DWORD ref; LCID lcid; HKEY key; @@ -451,7 +451,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Clone( return S_OK; } -IEnumCATEGORYINFOVtbl COMCAT_IEnumCATEGORYINFO_Vtbl = +static const IEnumCATEGORYINFOVtbl COMCAT_IEnumCATEGORYINFO_Vtbl = { COMCAT_IEnumCATEGORYINFO_QueryInterface, COMCAT_IEnumCATEGORYINFO_AddRef, @@ -601,9 +601,9 @@ static HRESULT COMCAT_IsClassOfCategories( */ typedef struct { - IEnumGUIDVtbl *lpVtbl; + const IEnumGUIDVtbl *lpVtbl; DWORD ref; - struct class_categories const *categories; + const struct class_categories *categories; HKEY key; DWORD next_index; } CLSID_IEnumGUIDImpl; @@ -759,7 +759,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone( return S_OK; } -IEnumGUIDVtbl COMCAT_CLSID_IEnumGUID_Vtbl = +static const IEnumGUIDVtbl COMCAT_CLSID_IEnumGUID_Vtbl = { COMCAT_CLSID_IEnumGUID_QueryInterface, COMCAT_CLSID_IEnumGUID_AddRef, @@ -777,7 +777,7 @@ static LPENUMGUID COMCAT_CLSID_IEnumGUID_Construct( This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CLSID_IEnumGUIDImpl)); if (This) { - WCHAR keyname[6] = { 'C', 'L', 'S', 'I', 'D', 0 }; + static const WCHAR keyname[] = { 'C', 'L', 'S', 'I', 'D', 0 }; This->lpVtbl = &COMCAT_CLSID_IEnumGUID_Vtbl; This->categories = categories; @@ -794,7 +794,7 @@ static LPENUMGUID COMCAT_CLSID_IEnumGUID_Construct( */ typedef struct { - IEnumGUIDVtbl *lpVtbl; + const IEnumGUIDVtbl *lpVtbl; DWORD ref; WCHAR keyname[68]; HKEY key; @@ -934,7 +934,7 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Clone( return S_OK; } -IEnumGUIDVtbl COMCAT_CATID_IEnumGUID_Vtbl = +static const IEnumGUIDVtbl COMCAT_CATID_IEnumGUID_Vtbl = { COMCAT_CATID_IEnumGUID_QueryInterface, COMCAT_CATID_IEnumGUID_AddRef, diff --git a/dlls/comcat/manager.c b/dlls/comcat/manager.c index f6d5d6f2572..5a4861fff53 100644 --- a/dlls/comcat/manager.c +++ b/dlls/comcat/manager.c @@ -40,19 +40,19 @@ static HRESULT WINAPI COMCAT_IUnknown_QueryInterface( if (This == NULL || ppvObj == NULL) return E_POINTER; if (IsEqualGUID(riid, &IID_IUnknown)) { - *ppvObj = (LPVOID)&This->unkVtbl; + *ppvObj = &This->unkVtbl; COMCAT_IUnknown_AddRef(iface); return S_OK; } if (IsEqualGUID(riid, &IID_ICatRegister)) { - *ppvObj = (LPVOID)&This->regVtbl; + *ppvObj = &This->regVtbl; COMCAT_IUnknown_AddRef(iface); return S_OK; } if (IsEqualGUID(riid, &IID_ICatInformation)) { - *ppvObj = (LPVOID)&This->infVtbl; + *ppvObj = &This->infVtbl; COMCAT_IUnknown_AddRef(iface); return S_OK; } @@ -101,7 +101,7 @@ static ULONG WINAPI COMCAT_IUnknown_Release(LPUNKNOWN iface) /********************************************************************** * COMCAT_IUnknown_Vtbl */ -static IUnknownVtbl COMCAT_IUnknown_Vtbl = +static const IUnknownVtbl COMCAT_IUnknown_Vtbl = { COMCAT_IUnknown_QueryInterface, COMCAT_IUnknown_AddRef, @@ -111,7 +111,7 @@ static IUnknownVtbl COMCAT_IUnknown_Vtbl = /********************************************************************** * static ComCatMgr instance */ -ComCatMgrImpl COMCAT_ComCatMgr = +const ComCatMgrImpl COMCAT_ComCatMgr = { &COMCAT_IUnknown_Vtbl, &COMCAT_ICatRegister_Vtbl, diff --git a/dlls/comcat/register.c b/dlls/comcat/register.c index dee15c72624..047a661c6bc 100644 --- a/dlls/comcat/register.c +++ b/dlls/comcat/register.c @@ -236,7 +236,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_UnRegisterClassReqCategories( /********************************************************************** * COMCAT_ICatRegister_Vtbl */ -ICatRegisterVtbl COMCAT_ICatRegister_Vtbl = +const ICatRegisterVtbl COMCAT_ICatRegister_Vtbl = { COMCAT_ICatRegister_QueryInterface, COMCAT_ICatRegister_AddRef, diff --git a/dlls/commdlg/filedlgbrowser.c b/dlls/commdlg/filedlgbrowser.c index 9af0aab0539..39e0ca563e0 100644 --- a/dlls/commdlg/filedlgbrowser.c +++ b/dlls/commdlg/filedlgbrowser.c @@ -47,9 +47,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg); typedef struct { - IShellBrowserVtbl * lpVtbl; - ICommDlgBrowserVtbl * lpVtblCommDlgBrowser; - IServiceProviderVtbl* lpVtblServiceProvider; + const IShellBrowserVtbl *lpVtbl; + const ICommDlgBrowserVtbl *lpVtblCommDlgBrowser; + const IServiceProviderVtbl *lpVtblServiceProvider; DWORD ref; /* Reference counter */ HWND hwndOwner; /* Owner dialog of the interface */ @@ -58,9 +58,9 @@ typedef struct /************************************************************************** * vtable */ -static IShellBrowserVtbl IShellBrowserImpl_Vtbl; -static ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl; -static IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl; +static const IShellBrowserVtbl IShellBrowserImpl_Vtbl; +static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl; +static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl; /************************************************************************** * Local Prototypes @@ -689,7 +689,7 @@ HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface, return E_NOTIMPL; } -static IShellBrowserVtbl IShellBrowserImpl_Vtbl = +static const IShellBrowserVtbl IShellBrowserImpl_Vtbl = { /* IUnknown */ IShellBrowserImpl_QueryInterface, @@ -914,7 +914,7 @@ HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *iface, IS return S_OK; } -static ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl = +static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl = { /* IUnknown */ IShellBrowserImpl_ICommDlgBrowser_QueryInterface, @@ -1003,7 +1003,7 @@ HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryService( } -static IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl = +static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl = { /* IUnknown */ IShellBrowserImpl_IServiceProvider_QueryInterface, diff --git a/dlls/d3d8/basetexture.c b/dlls/d3d8/basetexture.c index 2b45e622ea8..cbaa245de3a 100644 --- a/dlls/d3d8/basetexture.c +++ b/dlls/d3d8/basetexture.c @@ -130,7 +130,7 @@ DWORD WINAPI IDirect3DBaseTexture8Impl_GetLevelCount(LPDIRECT3DBASETEX return This->levels; } -IDirect3DBaseTexture8Vtbl Direct3DBaseTexture8_Vtbl = +static const IDirect3DBaseTexture8Vtbl Direct3DBaseTexture8_Vtbl = { IDirect3DBaseTexture8Impl_QueryInterface, IDirect3DBaseTexture8Impl_AddRef, diff --git a/dlls/d3d8/cubetexture.c b/dlls/d3d8/cubetexture.c index 9d3b1c1d112..b3822436e1a 100644 --- a/dlls/d3d8/cubetexture.c +++ b/dlls/d3d8/cubetexture.c @@ -279,7 +279,7 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl_AddDirtyRect(LPDIRECT3DCUBETEXT } -IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl = +const IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl = { IDirect3DCubeTexture8Impl_QueryInterface, IDirect3DCubeTexture8Impl_AddRef, diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index 86cd98a2cc2..76473d9595d 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -274,7 +274,7 @@ struct PLIGHTINFOEL { /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3D8Vtbl Direct3D8_Vtbl; +extern const IDirect3D8Vtbl Direct3D8_Vtbl; /***************************************************************************** * IDirect3D implementation structure @@ -282,7 +282,7 @@ extern IDirect3D8Vtbl Direct3D8_Vtbl; struct IDirect3D8Impl { /* IUnknown fields */ - IDirect3D8Vtbl *lpVtbl; + const IDirect3D8Vtbl *lpVtbl; DWORD ref; /* The WineD3D device */ @@ -327,7 +327,7 @@ extern HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adap /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl; +extern const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl; /***************************************************************************** * IDirect3DDevice8 implementation structure @@ -335,7 +335,7 @@ extern IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl; struct IDirect3DDevice8Impl { /* IUnknown fields */ - IDirect3DDevice8Vtbl *lpVtbl; + const IDirect3DDevice8Vtbl *lpVtbl; DWORD ref; /* IDirect3DDevice8 fields */ @@ -522,7 +522,7 @@ extern HRESULT WINAPI IDirect3DDevice8Impl_ActiveRender(LPDIRECT3DDEVICE8 ifac /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl; +extern const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl; /***************************************************************************** * IDirect3DVolume8 implementation structure @@ -530,7 +530,7 @@ extern IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl; struct IDirect3DVolume8Impl { /* IUnknown fields */ - IDirect3DVolume8Vtbl *lpVtbl; + const IDirect3DVolume8Vtbl *lpVtbl; DWORD ref; /* IDirect3DVolume8 fields */ @@ -576,7 +576,7 @@ extern HRESULT WINAPI IDirect3DVolume8Impl_AddDirtyBox(LPDIRECT3DVOLUME8 iface, /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl; +extern const IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl; /***************************************************************************** * IDirect3DSwapChain8 implementation structure @@ -584,7 +584,7 @@ extern IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl; struct IDirect3DSwapChain8Impl { /* IUnknown fields */ - IDirect3DSwapChain8Vtbl *lpVtbl; + const IDirect3DSwapChain8Vtbl *lpVtbl; DWORD ref; /* IDirect3DSwapChain8 fields */ @@ -615,7 +615,7 @@ extern HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN8 /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl; +extern const IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl; /***************************************************************************** * IDirect3DSurface8 implementation structure @@ -623,7 +623,7 @@ extern IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl; struct IDirect3DSurface8Impl { /* IUnknown fields */ - IDirect3DSurface8Vtbl *lpVtbl; + const IDirect3DSurface8Vtbl *lpVtbl; DWORD ref; /* IDirect3DSurface8 fields */ @@ -675,7 +675,7 @@ extern HRESULT WINAPI IDirect3DSurface8Impl_AddDirtyRect(LPDIRECT3DSURFACE8 ifac /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DResource8Vtbl Direct3DResource8_Vtbl; +extern const IDirect3DResource8Vtbl Direct3DResource8_Vtbl; /***************************************************************************** * IDirect3DResource8 implementation structure @@ -683,7 +683,7 @@ extern IDirect3DResource8Vtbl Direct3DResource8_Vtbl; struct IDirect3DResource8Impl { /* IUnknown fields */ - IDirect3DResource8Vtbl *lpVtbl; + const IDirect3DResource8Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource8 fields */ @@ -717,7 +717,7 @@ extern D3DPOOL WINAPI IDirect3DResource8Impl_GetPool(LPDIRECT3DRESOURCE8 /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl; +extern const IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl; /***************************************************************************** * IDirect3DVertexBuffer8 implementation structure @@ -725,7 +725,7 @@ extern IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl; struct IDirect3DVertexBuffer8Impl { /* IUnknown fields */ - IDirect3DVertexBuffer8Vtbl *lpVtbl; + const IDirect3DVertexBuffer8Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource8 fields */ @@ -765,7 +765,7 @@ extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_GetDesc(LPDIRECT3DVERTE /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl; +extern const IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl; /***************************************************************************** * IDirect3DIndexBuffer8 implementation structure @@ -773,7 +773,7 @@ extern IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl; struct IDirect3DIndexBuffer8Impl { /* IUnknown fields */ - IDirect3DIndexBuffer8Vtbl *lpVtbl; + const IDirect3DIndexBuffer8Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource8 fields */ @@ -813,7 +813,7 @@ extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_GetDesc(LPDIRECT3DINDEXB /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DBaseTexture8Vtbl Direct3DBaseTexture8_Vtbl; +extern const IDirect3DBaseTexture8Vtbl Direct3DBaseTexture8_Vtbl; /***************************************************************************** * IDirect3DBaseTexture8 implementation structure @@ -821,7 +821,7 @@ extern IDirect3DBaseTexture8Vtbl Direct3DBaseTexture8_Vtbl; struct IDirect3DBaseTexture8Impl { /* IUnknown fields */ - IDirect3DBaseTexture8Vtbl *lpVtbl; + const IDirect3DBaseTexture8Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource8 fields */ @@ -870,7 +870,7 @@ extern BOOL WINAPI IDirect3DBaseTexture8Impl_SetDirty(LPDIRECT3DBASET /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl; +extern const IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl; /***************************************************************************** * IDirect3DCubeTexture8 implementation structure @@ -878,7 +878,7 @@ extern IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl; struct IDirect3DCubeTexture8Impl { /* IUnknown fields */ - IDirect3DCubeTexture8Vtbl *lpVtbl; + const IDirect3DCubeTexture8Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource8 fields */ @@ -932,7 +932,7 @@ extern HRESULT WINAPI IDirect3DCubeTexture8Impl_AddDirtyRect(LPDIRECT3DC /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl; +extern const IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl; /***************************************************************************** * IDirect3DTexture8 implementation structure @@ -940,7 +940,7 @@ extern IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl; struct IDirect3DTexture8Impl { /* IUnknown fields */ - IDirect3DTexture8Vtbl *lpVtbl; + const IDirect3DTexture8Vtbl *lpVtbl; DWORD ref; /* IDirect3DResourc8 fields */ @@ -995,7 +995,7 @@ extern HRESULT WINAPI IDirect3DTexture8Impl_AddDirtyRect(LPDIRECT3DTEXTU /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl; +extern const IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl; /***************************************************************************** * IDirect3DVolumeTexture8 implementation structure @@ -1003,7 +1003,7 @@ extern IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl; struct IDirect3DVolumeTexture8Impl { /* IUnknown fields */ - IDirect3DVolumeTexture8Vtbl *lpVtbl; + const IDirect3DVolumeTexture8Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource8 fields */ @@ -1084,14 +1084,14 @@ typedef struct SAVEDSTATES { /***************************************************************************** * Predeclare the interface implementation structures */ -/*extern IDirect3DStateBlock9Vtbl Direct3DStateBlock9_Vtbl;*/ +/*extern const IDirect3DStateBlock9Vtbl Direct3DStateBlock9_Vtbl;*/ /***************************************************************************** * IDirect3DStateBlock implementation structure */ struct IDirect3DStateBlockImpl { /* IUnknown fields */ - /*IDirect3DStateBlock9Vtbl *lpVtbl;*/ + /*const IDirect3DStateBlock9Vtbl *lpVtbl;*/ DWORD ref; /* The device, to be replaced by an IDirect3DDeviceImpl */ @@ -1173,14 +1173,14 @@ extern HRESULT WINAPI IDirect3DDeviceImpl_CaptureStateBlock(IDirect3DDevice8Impl /***************************************************************************** * Predeclare the interface implementation structures */ -/*extern IDirect3DVertexShaderDeclaration9Vtbl Direct3DVertexShaderDeclaration9_Vtbl;*/ +/*extern const IDirect3DVertexShaderDeclaration9Vtbl Direct3DVertexShaderDeclaration9_Vtbl;*/ /***************************************************************************** * IDirect3DVertexShaderDeclaration implementation structure */ struct IDirect3DVertexShaderDeclarationImpl { /* IUnknown fields */ - /*IDirect3DVertexShaderDeclaration9Vtbl *lpVtbl;*/ + /*const IDirect3DVertexShaderDeclaration9Vtbl *lpVtbl;*/ DWORD ref; /* The device, to be replaced by an IDirect3DDeviceImpl */ @@ -1210,13 +1210,13 @@ extern HRESULT WINAPI IDirect3DDeviceImpl_CreateVertexShaderDeclaration8(IDirect /***************************************************************************** * Predeclare the interface implementation structures */ -/*extern IDirect3DVertexShader9Vtbl Direct3DVertexShader9_Vtbl;*/ +/*extern const IDirect3DVertexShader9Vtbl Direct3DVertexShader9_Vtbl;*/ /***************************************************************************** * IDirect3DVertexShader implementation structure */ struct IDirect3DVertexShaderImpl { - /*IDirect3DVertexShader9Vtbl *lpVtbl;*/ + /*const IDirect3DVertexShader9Vtbl *lpVtbl;*/ DWORD ref; /* The device, to be replaced by an IDirect3DDeviceImpl */ @@ -1259,13 +1259,13 @@ extern HRESULT WINAPI IDirect3DDeviceImpl_FillVertexShaderInputArbHW(IDirect3DDe /***************************************************************************** * Predeclare the interface implementation structures */ -/*extern IDirect3DPixelShader9Vtbl Direct3DPixelShader9_Vtbl;*/ +/*extern const IDirect3DPixelShader9Vtbl Direct3DPixelShader9_Vtbl;*/ /***************************************************************************** * IDirect3DPixelShader implementation structure */ struct IDirect3DPixelShaderImpl { - /*IDirect3DPixelShader9Vtbl *lpVtbl;*/ + /*const IDirect3DPixelShader9Vtbl *lpVtbl;*/ DWORD ref; /* The device, to be replaced by an IDirect3DDeviceImpl */ diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index d48ecc9bd0e..f1328ef84a7 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -4349,7 +4349,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 iface, U } -IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl = +const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl = { IDirect3DDevice8Impl_QueryInterface, IDirect3DDevice8Impl_AddRef, diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index 0e1657c3da6..52ed4218538 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c @@ -828,7 +828,7 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface, return D3D_OK; } -IDirect3D8Vtbl Direct3D8_Vtbl = +const IDirect3D8Vtbl Direct3D8_Vtbl = { IDirect3D8Impl_QueryInterface, IDirect3D8Impl_AddRef, diff --git a/dlls/d3d8/indexbuffer.c b/dlls/d3d8/indexbuffer.c index 1aa3a597c4e..c865eb66278 100644 --- a/dlls/d3d8/indexbuffer.c +++ b/dlls/d3d8/indexbuffer.c @@ -130,7 +130,7 @@ HRESULT WINAPI IDirect3DIndexBuffer8Impl_GetDesc(LPDIRECT3DINDEXBUFFER8 return D3D_OK; } -IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl = +const IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl = { IDirect3DIndexBuffer8Impl_QueryInterface, IDirect3DIndexBuffer8Impl_AddRef, diff --git a/dlls/d3d8/resource.c b/dlls/d3d8/resource.c index 0e34f3f0c17..496fc6b561a 100644 --- a/dlls/d3d8/resource.c +++ b/dlls/d3d8/resource.c @@ -132,7 +132,7 @@ D3DPOOL WINAPI IDirect3DResource8Impl_GetPool(LPDIRECT3DRESOURCE8 iface) { } } -IDirect3DResource8Vtbl Direct3DResource8_Vtbl = +const IDirect3DResource8Vtbl Direct3DResource8_Vtbl = { IDirect3DResource8Impl_QueryInterface, IDirect3DResource8Impl_AddRef, diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c index fd5823336c8..1b182a35fc4 100644 --- a/dlls/d3d8/surface.c +++ b/dlls/d3d8/surface.c @@ -468,7 +468,7 @@ unlock_end: } -IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl = +const IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl = { IDirect3DSurface8Impl_QueryInterface, IDirect3DSurface8Impl_AddRef, diff --git a/dlls/d3d8/swapchain.c b/dlls/d3d8/swapchain.c index 2485d8d498f..51e8df9513b 100644 --- a/dlls/d3d8/swapchain.c +++ b/dlls/d3d8/swapchain.c @@ -91,7 +91,7 @@ HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN8 iface, return D3D_OK; } -IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl = +const IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl = { IDirect3DSwapChain8Impl_QueryInterface, IDirect3DSwapChain8Impl_AddRef, diff --git a/dlls/d3d8/texture.c b/dlls/d3d8/texture.c index 0a2c2db9468..e98c1566496 100644 --- a/dlls/d3d8/texture.c +++ b/dlls/d3d8/texture.c @@ -235,7 +235,7 @@ HRESULT WINAPI IDirect3DTexture8Impl_AddDirtyRect(LPDIRECT3DTEXTURE8 ifa } -IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl = +const IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl = { IDirect3DTexture8Impl_QueryInterface, IDirect3DTexture8Impl_AddRef, diff --git a/dlls/d3d8/vertexbuffer.c b/dlls/d3d8/vertexbuffer.c index 04572533c5a..2c9dbe6a25a 100644 --- a/dlls/d3d8/vertexbuffer.c +++ b/dlls/d3d8/vertexbuffer.c @@ -135,7 +135,7 @@ HRESULT WINAPI IDirect3DVertexBuffer8Impl_GetDesc(LPDIRECT3DVERTEXBUFFER return D3D_OK; } -IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl = +const IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl = { IDirect3DVertexBuffer8Impl_QueryInterface, IDirect3DVertexBuffer8Impl_AddRef, diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c index 79d71dde408..0ec1d6c72c8 100644 --- a/dlls/d3d8/volume.c +++ b/dlls/d3d8/volume.c @@ -192,7 +192,7 @@ HRESULT WINAPI IDirect3DVolume8Impl_UnlockBox(LPDIRECT3DVOLUME8 iface) { } -IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl = +const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl = { IDirect3DVolume8Impl_QueryInterface, IDirect3DVolume8Impl_AddRef, diff --git a/dlls/d3d8/volumetexture.c b/dlls/d3d8/volumetexture.c index ea40afb0ac0..1ff17572c06 100644 --- a/dlls/d3d8/volumetexture.c +++ b/dlls/d3d8/volumetexture.c @@ -261,7 +261,7 @@ HRESULT WINAPI IDirect3DVolumeTexture8Impl_AddDirtyBox(LPDIRECT3DVOLUMET } -IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl = +const IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl = { IDirect3DVolumeTexture8Impl_QueryInterface, IDirect3DVolumeTexture8Impl_AddRef, diff --git a/dlls/d3d9/basetexture.c b/dlls/d3d9/basetexture.c index 158194ff513..b8a550e9864 100644 --- a/dlls/d3d9/basetexture.c +++ b/dlls/d3d9/basetexture.c @@ -149,7 +149,7 @@ void WINAPI IDirect3DBaseTexture9Impl_GenerateMipSubLevels(LPDIRECT3DBASETEXTURE return IWineD3DBaseTexture_GenerateMipSubLevels(This->wineD3DBaseTexture); } -IDirect3DBaseTexture9Vtbl Direct3DBaseTexture9_Vtbl = +const IDirect3DBaseTexture9Vtbl Direct3DBaseTexture9_Vtbl = { IDirect3DBaseTexture9Impl_QueryInterface, IDirect3DBaseTexture9Impl_AddRef, diff --git a/dlls/d3d9/cubetexture.c b/dlls/d3d9/cubetexture.c index 00d95ea1cbd..553aa4a23b6 100644 --- a/dlls/d3d9/cubetexture.c +++ b/dlls/d3d9/cubetexture.c @@ -207,7 +207,7 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl_AddDirtyRect(LPDIRECT3DCUBETEXTURE9 if } -IDirect3DCubeTexture9Vtbl Direct3DCubeTexture9_Vtbl = +const IDirect3DCubeTexture9Vtbl Direct3DCubeTexture9_Vtbl = { IDirect3DCubeTexture9Impl_QueryInterface, IDirect3DCubeTexture9Impl_AddRef, diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 13a184fa9de..87640d1e633 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -183,7 +183,7 @@ typedef struct D3DSHADERVECTORI { /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3D9Vtbl Direct3D9_Vtbl; +extern const IDirect3D9Vtbl Direct3D9_Vtbl; /***************************************************************************** * IDirect3D implementation structure @@ -191,7 +191,7 @@ extern IDirect3D9Vtbl Direct3D9_Vtbl; struct IDirect3D9Impl { /* IUnknown fields */ - IDirect3D9Vtbl *lpVtbl; + const IDirect3D9Vtbl *lpVtbl; DWORD ref; /* The WineD3D device */ @@ -228,7 +228,7 @@ extern HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adap /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl; +extern const IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl; /***************************************************************************** * IDirect3DDevice9 implementation structure @@ -236,7 +236,7 @@ extern IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl; struct IDirect3DDevice9Impl { /* IUnknown fields */ - IDirect3DDevice9Vtbl *lpVtbl; + const IDirect3DDevice9Vtbl *lpVtbl; DWORD ref; /* IDirect3DDevice9 fields */ @@ -435,7 +435,7 @@ extern HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9 iface /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl; +extern const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl; /***************************************************************************** * IDirect3DVolume9 implementation structure @@ -443,7 +443,7 @@ extern IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl; struct IDirect3DVolume9Impl { /* IUnknown fields */ - IDirect3DVolume9Vtbl *lpVtbl; + const IDirect3DVolume9Vtbl *lpVtbl; DWORD ref; /* IDirect3DVolume9 fields */ @@ -473,7 +473,7 @@ extern HRESULT WINAPI IDirect3DVolume9Impl_UnlockBox(LPDIRECT3DVOLUME9 iface); /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DSwapChain9Vtbl Direct3DSwapChain9_Vtbl; +extern const IDirect3DSwapChain9Vtbl Direct3DSwapChain9_Vtbl; /***************************************************************************** * IDirect3DSwapChain9 implementation structure @@ -481,7 +481,7 @@ extern IDirect3DSwapChain9Vtbl Direct3DSwapChain9_Vtbl; struct IDirect3DSwapChain9Impl { /* IUnknown fields */ - IDirect3DSwapChain9Vtbl *lpVtbl; + const IDirect3DSwapChain9Vtbl *lpVtbl; DWORD ref; /* IDirect3DSwapChain9 fields */ @@ -514,7 +514,7 @@ extern HRESULT WINAPI IDirect3DSwapChain9Impl_GetPresentParameters(LPDIRECT3DSWA /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DResource9Vtbl Direct3DResource9_Vtbl; +extern const IDirect3DResource9Vtbl Direct3DResource9_Vtbl; /***************************************************************************** * IDirect3DResource9 implementation structure @@ -522,7 +522,7 @@ extern IDirect3DResource9Vtbl Direct3DResource9_Vtbl; struct IDirect3DResource9Impl { /* IUnknown fields */ - IDirect3DResource9Vtbl *lpVtbl; + const IDirect3DResource9Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource9 fields */ @@ -552,7 +552,7 @@ extern D3DRESOURCETYPE WINAPI IDirect3DResource9Impl_GetType(LPDIRECT3DRESOURCE9 /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DSurface9Vtbl Direct3DSurface9_Vtbl; +extern const IDirect3DSurface9Vtbl Direct3DSurface9_Vtbl; /***************************************************************************** * IDirect3DSurface9 implementation structure @@ -560,7 +560,7 @@ extern IDirect3DSurface9Vtbl Direct3DSurface9_Vtbl; struct IDirect3DSurface9Impl { /* IUnknown fields */ - IDirect3DSurface9Vtbl *lpVtbl; + const IDirect3DSurface9Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource9 fields */ @@ -599,7 +599,7 @@ extern HRESULT WINAPI IDirect3DSurface9Impl_ReleaseDC(LPDIRECT3DSURFACE9 iface, /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DVertexBuffer9Vtbl Direct3DVertexBuffer9_Vtbl; +extern const IDirect3DVertexBuffer9Vtbl Direct3DVertexBuffer9_Vtbl; /***************************************************************************** * IDirect3DVertexBuffer9 implementation structure @@ -607,7 +607,7 @@ extern IDirect3DVertexBuffer9Vtbl Direct3DVertexBuffer9_Vtbl; struct IDirect3DVertexBuffer9Impl { /* IUnknown fields */ - IDirect3DVertexBuffer9Vtbl *lpVtbl; + const IDirect3DVertexBuffer9Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource9 fields */ @@ -642,7 +642,7 @@ extern HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetDesc(LPDIRECT3DVERTE /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DIndexBuffer9Vtbl Direct3DIndexBuffer9_Vtbl; +extern const IDirect3DIndexBuffer9Vtbl Direct3DIndexBuffer9_Vtbl; /***************************************************************************** * IDirect3DIndexBuffer9 implementation structure @@ -650,7 +650,7 @@ extern IDirect3DIndexBuffer9Vtbl Direct3DIndexBuffer9_Vtbl; struct IDirect3DIndexBuffer9Impl { /* IUnknown fields */ - IDirect3DIndexBuffer9Vtbl *lpVtbl; + const IDirect3DIndexBuffer9Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource9 fields */ @@ -685,7 +685,7 @@ extern HRESULT WINAPI IDirect3DIndexBuffer9Impl_GetDesc(LPDIRECT3DINDEXB /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DBaseTexture9Vtbl Direct3DBaseTexture9_Vtbl; +extern const IDirect3DBaseTexture9Vtbl Direct3DBaseTexture9_Vtbl; /***************************************************************************** * IDirect3DBaseTexture9 implementation structure @@ -693,7 +693,7 @@ extern IDirect3DBaseTexture9Vtbl Direct3DBaseTexture9_Vtbl; struct IDirect3DBaseTexture9Impl { /* IUnknown fields */ - IDirect3DBaseTexture9Vtbl *lpVtbl; + const IDirect3DBaseTexture9Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource9 fields */ @@ -731,7 +731,7 @@ extern void WINAPI IDirect3DBaseTexture9Impl_GenerateMipSubLevels(LPD /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DCubeTexture9Vtbl Direct3DCubeTexture9_Vtbl; +extern const IDirect3DCubeTexture9Vtbl Direct3DCubeTexture9_Vtbl; /***************************************************************************** * IDirect3DCubeTexture9 implementation structure @@ -739,7 +739,7 @@ extern IDirect3DCubeTexture9Vtbl Direct3DCubeTexture9_Vtbl; struct IDirect3DCubeTexture9Impl { /* IUnknown fields */ - IDirect3DCubeTexture9Vtbl *lpVtbl; + const IDirect3DCubeTexture9Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource9 fields */ @@ -784,7 +784,7 @@ extern HRESULT WINAPI IDirect3DCubeTexture9Impl_AddDirtyRect(LPDIRECT3DC /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DTexture9Vtbl Direct3DTexture9_Vtbl; +extern const IDirect3DTexture9Vtbl Direct3DTexture9_Vtbl; /***************************************************************************** * IDirect3DTexture9 implementation structure @@ -792,7 +792,7 @@ extern IDirect3DTexture9Vtbl Direct3DTexture9_Vtbl; struct IDirect3DTexture9Impl { /* IUnknown fields */ - IDirect3DTexture9Vtbl *lpVtbl; + const IDirect3DTexture9Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource9 fields */ @@ -838,7 +838,7 @@ extern HRESULT WINAPI IDirect3DTexture9Impl_AddDirtyRect(LPDIRECT3DTEXTU /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DVolumeTexture9Vtbl Direct3DVolumeTexture9_Vtbl; +extern const IDirect3DVolumeTexture9Vtbl Direct3DVolumeTexture9_Vtbl; /***************************************************************************** * IDirect3DVolumeTexture9 implementation structure @@ -846,7 +846,7 @@ extern IDirect3DVolumeTexture9Vtbl Direct3DVolumeTexture9_Vtbl; struct IDirect3DVolumeTexture9Impl { /* IUnknown fields */ - IDirect3DVolumeTexture9Vtbl *lpVtbl; + const IDirect3DVolumeTexture9Vtbl *lpVtbl; DWORD ref; /* IDirect3DResource9 fields */ @@ -891,14 +891,14 @@ extern HRESULT WINAPI IDirect3DVolumeTexture9Impl_AddDirtyBox(LPDIRECT3D /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DStateBlock9Vtbl Direct3DStateBlock9_Vtbl; +extern const IDirect3DStateBlock9Vtbl Direct3DStateBlock9_Vtbl; /***************************************************************************** * IDirect3DStateBlock9 implementation structure */ struct IDirect3DStateBlock9Impl { /* IUnknown fields */ - IDirect3DStateBlock9Vtbl *lpVtbl; + const IDirect3DStateBlock9Vtbl *lpVtbl; DWORD ref; /* IDirect3DStateBlock9 fields */ @@ -989,14 +989,14 @@ extern HRESULT WINAPI IDirect3DStateBlock9Impl_Apply(LPDIRECT3DSTATEBLOC /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DVertexDeclaration9Vtbl Direct3DVertexDeclaration9_Vtbl; +extern const IDirect3DVertexDeclaration9Vtbl Direct3DVertexDeclaration9_Vtbl; /***************************************************************************** * IDirect3DVertexShaderDeclaration implementation structure */ struct IDirect3DVertexDeclaration9Impl { /* IUnknown fields */ - IDirect3DVertexDeclaration9Vtbl *lpVtbl; + const IDirect3DVertexDeclaration9Vtbl *lpVtbl; DWORD ref; /* IDirect3DVertexDeclaration9 fields */ @@ -1020,14 +1020,14 @@ extern HRESULT WINAPI IDirect3DVertexDeclaration9Impl_GetDeclaration(LPDIR /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DVertexShader9Vtbl Direct3DVertexShader9_Vtbl; +extern const IDirect3DVertexShader9Vtbl Direct3DVertexShader9_Vtbl; /***************************************************************************** * IDirect3DVertexShader implementation structure */ struct IDirect3DVertexShader9Impl { /* IUnknown fields */ - IDirect3DVertexShader9Vtbl *lpVtbl; + const IDirect3DVertexShader9Vtbl *lpVtbl; DWORD ref; /* IDirect3DVertexDeclaration9 fields */ @@ -1062,14 +1062,14 @@ extern HRESULT WINAPI IDirect3DVertexShader9Impl_GetFunction(LPDIRECT3DV /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DPixelShader9Vtbl Direct3DPixelShader9_Vtbl; +extern const IDirect3DPixelShader9Vtbl Direct3DPixelShader9_Vtbl; /***************************************************************************** * IDirect3DPixelShader implementation structure */ struct IDirect3DPixelShader9Impl { /* IUnknown fields */ - IDirect3DPixelShader9Vtbl *lpVtbl; + const IDirect3DPixelShader9Vtbl *lpVtbl; DWORD ref; /* IDirect3DPixelShader9 fields */ @@ -1103,14 +1103,14 @@ extern HRESULT WINAPI IDirect3DPixelShader9Impl_GetFunction(LPDIRECT3DPI /***************************************************************************** * Predeclare the interface implementation structures */ -extern IDirect3DQuery9Vtbl Direct3DQuery9_Vtbl; +extern const IDirect3DQuery9Vtbl Direct3DQuery9_Vtbl; /***************************************************************************** * IDirect3DPixelShader implementation structure */ typedef struct IDirect3DQuery9Impl { /* IUnknown fields */ - IDirect3DQuery9Vtbl *lpVtbl; + const IDirect3DQuery9Vtbl *lpVtbl; DWORD ref; /* IDirect3DQuery9 fields */ diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index f604b56bca1..5907e00956d 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -775,7 +775,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_DeletePatch(LPDIRECT3DDEVICE9 iface, UINT return IWineD3DDevice_DeletePatch(This->WineD3DDevice, Handle); } -IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl = +const IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl = { IDirect3DDevice9Impl_QueryInterface, IDirect3DDevice9Impl_AddRef, diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index 72c2a23e8d8..80d3994dc1b 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -229,7 +229,7 @@ HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapter, D3 return IWineD3D_CreateDevice(This->WineD3D, Adapter, DeviceType, hFocusWindow, BehaviourFlags, &localParameters, &object->WineD3DDevice, (IUnknown *)object, D3D9CB_CreateRenderTarget); } -IDirect3D9Vtbl Direct3D9_Vtbl = +const IDirect3D9Vtbl Direct3D9_Vtbl = { IDirect3D9Impl_QueryInterface, IDirect3D9Impl_AddRef, diff --git a/dlls/d3d9/indexbuffer.c b/dlls/d3d9/indexbuffer.c index 2315e6267ca..7d018aa7843 100644 --- a/dlls/d3d9/indexbuffer.c +++ b/dlls/d3d9/indexbuffer.c @@ -131,7 +131,7 @@ HRESULT WINAPI IDirect3DIndexBuffer9Impl_GetDesc(LPDIRECT3DINDEXBUFFER9 } -IDirect3DIndexBuffer9Vtbl Direct3DIndexBuffer9_Vtbl = +const IDirect3DIndexBuffer9Vtbl Direct3DIndexBuffer9_Vtbl = { IDirect3DIndexBuffer9Impl_QueryInterface, IDirect3DIndexBuffer9Impl_AddRef, diff --git a/dlls/d3d9/pixelshader.c b/dlls/d3d9/pixelshader.c index ff2f1335cd8..62317d0af3f 100644 --- a/dlls/d3d9/pixelshader.c +++ b/dlls/d3d9/pixelshader.c @@ -76,7 +76,7 @@ HRESULT WINAPI IDirect3DPixelShader9Impl_GetFunction(LPDIRECT3DPIXELSHADER9 ifac } -IDirect3DPixelShader9Vtbl Direct3DPixelShader9_Vtbl = +const IDirect3DPixelShader9Vtbl Direct3DPixelShader9_Vtbl = { IDirect3DPixelShader9Impl_QueryInterface, IDirect3DPixelShader9Impl_AddRef, diff --git a/dlls/d3d9/query.c b/dlls/d3d9/query.c index e8af3f303fa..432a5b9326f 100644 --- a/dlls/d3d9/query.c +++ b/dlls/d3d9/query.c @@ -104,7 +104,7 @@ HRESULT WINAPI IDirect3DQuery9Impl_GetData(LPDIRECT3DQUERY9 iface, void* pData, } -IDirect3DQuery9Vtbl Direct3DQuery9_Vtbl = +const IDirect3DQuery9Vtbl Direct3DQuery9_Vtbl = { IDirect3DQuery9Impl_QueryInterface, IDirect3DQuery9Impl_AddRef, diff --git a/dlls/d3d9/resource.c b/dlls/d3d9/resource.c index 6285af228ed..888c5756d5e 100644 --- a/dlls/d3d9/resource.c +++ b/dlls/d3d9/resource.c @@ -118,7 +118,7 @@ D3DRESOURCETYPE WINAPI IDirect3DResource9Impl_GetType(LPDIRECT3DRESOURCE9 iface) } -IDirect3DResource9Vtbl Direct3DResource9_Vtbl = +const IDirect3DResource9Vtbl Direct3DResource9_Vtbl = { IDirect3DResource9Impl_QueryInterface, IDirect3DResource9Impl_AddRef, diff --git a/dlls/d3d9/stateblock.c b/dlls/d3d9/stateblock.c index 81ad2f7f94f..22b0113ab2f 100644 --- a/dlls/d3d9/stateblock.c +++ b/dlls/d3d9/stateblock.c @@ -82,7 +82,7 @@ HRESULT WINAPI IDirect3DStateBlock9Impl_Apply(LPDIRECT3DSTATEBLOCK9 iface) { } -IDirect3DStateBlock9Vtbl Direct3DStateBlock9_Vtbl = +const IDirect3DStateBlock9Vtbl Direct3DStateBlock9_Vtbl = { IDirect3DStateBlock9Impl_QueryInterface, IDirect3DStateBlock9Impl_AddRef, diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c index 0f6fb739e9a..0d2ba7766e1 100644 --- a/dlls/d3d9/surface.c +++ b/dlls/d3d9/surface.c @@ -204,7 +204,7 @@ HRESULT WINAPI IDirect3DSurface9Impl_ReleaseDC(LPDIRECT3DSURFACE9 iface, HDC hdc } -IDirect3DSurface9Vtbl Direct3DSurface9_Vtbl = +const IDirect3DSurface9Vtbl Direct3DSurface9_Vtbl = { IDirect3DSurface9Impl_QueryInterface, IDirect3DSurface9Impl_AddRef, diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c index 9feb42bfd75..93ce2914825 100644 --- a/dlls/d3d9/swapchain.c +++ b/dlls/d3d9/swapchain.c @@ -111,7 +111,7 @@ HRESULT WINAPI IDirect3DSwapChain9Impl_GetPresentParameters(LPDIRECT3DSWAPCHAIN9 } -IDirect3DSwapChain9Vtbl Direct3DSwapChain9_Vtbl = +const IDirect3DSwapChain9Vtbl Direct3DSwapChain9_Vtbl = { IDirect3DSwapChain9Impl_QueryInterface, IDirect3DSwapChain9Impl_AddRef, diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index 07d193346d6..141378e7933 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -185,7 +185,7 @@ HRESULT WINAPI IDirect3DTexture9Impl_AddDirtyRect(LPDIRECT3DTEXTURE9 iface, CONS return IWineD3DTexture_AddDirtyRect(This->wineD3DTexture, pDirtyRect); } -IDirect3DTexture9Vtbl Direct3DTexture9_Vtbl = +const IDirect3DTexture9Vtbl Direct3DTexture9_Vtbl = { IDirect3DTexture9Impl_QueryInterface, IDirect3DTexture9Impl_AddRef, diff --git a/dlls/d3d9/vertexbuffer.c b/dlls/d3d9/vertexbuffer.c index 8a8a39d1184..9c6338ba779 100644 --- a/dlls/d3d9/vertexbuffer.c +++ b/dlls/d3d9/vertexbuffer.c @@ -132,7 +132,7 @@ HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetDesc(LPDIRECT3DVERTEXBUFFER9 iface, return IWineD3DVertexBuffer_GetDesc(This->wineD3DVertexBuffer, pDesc); } -IDirect3DVertexBuffer9Vtbl Direct3DVertexBuffer9_Vtbl = +const IDirect3DVertexBuffer9Vtbl Direct3DVertexBuffer9_Vtbl = { IDirect3DVertexBuffer9Impl_QueryInterface, IDirect3DVertexBuffer9Impl_AddRef, diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c index 5619533eb9d..0fc3d4ba36c 100644 --- a/dlls/d3d9/vertexdeclaration.c +++ b/dlls/d3d9/vertexdeclaration.c @@ -77,7 +77,7 @@ HRESULT WINAPI IDirect3DVertexDeclaration9Impl_GetDeclaration(LPDIRECT3DVERTEXDE } -IDirect3DVertexDeclaration9Vtbl Direct3DVertexDeclaration9_Vtbl = +const IDirect3DVertexDeclaration9Vtbl Direct3DVertexDeclaration9_Vtbl = { IDirect3DVertexDeclaration9Impl_QueryInterface, IDirect3DVertexDeclaration9Impl_AddRef, diff --git a/dlls/d3d9/vertexshader.c b/dlls/d3d9/vertexshader.c index b11ce5e3ac7..e16921c0b4a 100644 --- a/dlls/d3d9/vertexshader.c +++ b/dlls/d3d9/vertexshader.c @@ -76,7 +76,7 @@ HRESULT WINAPI IDirect3DVertexShader9Impl_GetFunction(LPDIRECT3DVERTEXSHADER9 if } -IDirect3DVertexShader9Vtbl Direct3DVertexShader9_Vtbl = +const IDirect3DVertexShader9Vtbl Direct3DVertexShader9_Vtbl = { IDirect3DVertexShader9Impl_QueryInterface, IDirect3DVertexShader9Impl_AddRef, diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c index 1f551e8eec9..f788a309875 100644 --- a/dlls/d3d9/volume.c +++ b/dlls/d3d9/volume.c @@ -139,7 +139,7 @@ HRESULT WINAPI IDirect3DVolume9Impl_UnlockBox(LPDIRECT3DVOLUME9 iface) { return IWineD3DVolume_UnlockBox(This->wineD3DVolume); } -IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl = +const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl = { IDirect3DVolume9Impl_QueryInterface, IDirect3DVolume9Impl_AddRef, diff --git a/dlls/d3d9/volumetexture.c b/dlls/d3d9/volumetexture.c index b7d4ea759a5..c6e401fc665 100644 --- a/dlls/d3d9/volumetexture.c +++ b/dlls/d3d9/volumetexture.c @@ -204,7 +204,7 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_AddDirtyBox(LPDIRECT3DVOLUMETEXTURE9 } -IDirect3DVolumeTexture9Vtbl Direct3DVolumeTexture9_Vtbl = +const IDirect3DVolumeTexture9Vtbl Direct3DVolumeTexture9_Vtbl = { IDirect3DVolumeTexture9Impl_QueryInterface, IDirect3DVolumeTexture9Impl_AddRef, diff --git a/dlls/d3dx8/d3dx8core_private.h b/dlls/d3dx8/d3dx8core_private.h index 2e1557b3476..7ce85b12635 100644 --- a/dlls/d3dx8/d3dx8core_private.h +++ b/dlls/d3dx8/d3dx8core_private.h @@ -38,7 +38,7 @@ typedef struct ID3DXFontImpl ID3DXFontImpl; /***************************************************************************** * Predeclare the interface implementation structures */ -extern ID3DXBufferVtbl D3DXBuffer_Vtbl; +extern const ID3DXBufferVtbl D3DXBuffer_Vtbl; /***************************************************************************** * ID3DXBufferImpl implementation structure @@ -46,7 +46,7 @@ extern ID3DXBufferVtbl D3DXBuffer_Vtbl; struct ID3DXBufferImpl { /* IUnknown fields */ - ID3DXBufferVtbl *lpVtbl; + const ID3DXBufferVtbl *lpVtbl; DWORD ref; /* ID3DXBuffer fields */ @@ -70,7 +70,7 @@ extern DWORD WINAPI ID3DXBufferImpl_GetBufferSize(LPD3DXBUFFER iface); /***************************************************************************** * Predeclare the interface implementation structures */ -extern ID3DXFontVtbl D3DXFont_Vtbl; +extern const ID3DXFontVtbl D3DXFont_Vtbl; /***************************************************************************** * ID3DXFontImpl implementation structure @@ -78,7 +78,7 @@ extern ID3DXFontVtbl D3DXFont_Vtbl; struct ID3DXFontImpl { /* IUnknown fields */ - ID3DXFontVtbl *lpVtbl; + const ID3DXFontVtbl *lpVtbl; DWORD ref; /* ID3DXFont fields */ diff --git a/dlls/d3dx8/d3dxbuffer.c b/dlls/d3dx8/d3dxbuffer.c index e73d9c8234b..bc25570d3fe 100644 --- a/dlls/d3dx8/d3dxbuffer.c +++ b/dlls/d3dx8/d3dxbuffer.c @@ -82,7 +82,7 @@ DWORD WINAPI ID3DXBufferImpl_GetBufferSize(LPD3DXBUFFER iface) { return This->bufferSize; } -ID3DXBufferVtbl D3DXBuffer_Vtbl = +const ID3DXBufferVtbl D3DXBuffer_Vtbl = { ID3DXBufferImpl_QueryInterface, ID3DXBufferImpl_AddRef, diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index 75d58a9dbc6..82bcebdc538 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -34,13 +34,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dxof); -static struct IDirectXFileVtbl IDirectXFile_Vtbl; -static struct IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl; -static struct IDirectXFileDataVtbl IDirectXFileData_Vtbl; -static struct IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl; -static struct IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl; -static struct IDirectXFileObjectVtbl IDirectXFileObject_Vtbl; -static struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl; +static const struct IDirectXFileVtbl IDirectXFile_Vtbl; +static const struct IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl; +static const struct IDirectXFileDataVtbl IDirectXFileData_Vtbl; +static const struct IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl; +static const struct IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl; +static const struct IDirectXFileObjectVtbl IDirectXFileObject_Vtbl; +static const struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl; HRESULT IDirectXFileImpl_Create(IUnknown* pUnkOuter, LPVOID* ppObj) { @@ -142,7 +142,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP return S_FALSE; } -static IDirectXFileVtbl IDirectXFile_Vtbl = +static const IDirectXFileVtbl IDirectXFile_Vtbl = { IDirectXFileImpl_QueryInterface, IDirectXFileImpl_AddRef, @@ -259,7 +259,7 @@ static HRESULT WINAPI IDirectXFileBinaryImpl_Read(IDirectXFileBinary* iface, LPV return S_FALSE; } -static IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl = +static const IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl = { IDirectXFileBinaryImpl_QueryInterface, IDirectXFileBinaryImpl_AddRef, @@ -405,7 +405,7 @@ static HRESULT WINAPI IDirectXFileDataImpl_AddBinaryObject(IDirectXFileData* ifa return S_FALSE; } -static IDirectXFileDataVtbl IDirectXFileData_Vtbl = +static const IDirectXFileDataVtbl IDirectXFileData_Vtbl = { IDirectXFileDataImpl_QueryInterface, IDirectXFileDataImpl_AddRef, @@ -508,7 +508,7 @@ static HRESULT WINAPI IDirectXFileDataReferenceImpl_Resolve(IDirectXFileDataRefe return S_FALSE; } -static IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl = +static const IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl = { IDirectXFileDataReferenceImpl_QueryInterface, IDirectXFileDataReferenceImpl_AddRef, @@ -612,7 +612,7 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectByName(IDirectXFil return S_FALSE; } -static IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl = +static const IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl = { IDirectXFileEnumObjectImpl_QueryInterface, IDirectXFileEnumObjectImpl_AddRef, @@ -699,7 +699,7 @@ static HRESULT WINAPI IDirectXFileObjectImpl_GetId(IDirectXFileObject* iface, LP return S_FALSE; } -static IDirectXFileObjectVtbl IDirectXFileObject_Vtbl = +static const IDirectXFileObjectVtbl IDirectXFileObject_Vtbl = { IDirectXFileObjectImpl_QueryInterface, IDirectXFileObjectImpl_AddRef, @@ -793,7 +793,7 @@ static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveData(IDirectXFileSaveObject return S_FALSE; } -static IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl = +static const IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl = { IDirectXFileSaveObjectImpl_QueryInterface, IDirectXFileSaveObjectImpl_AddRef, diff --git a/dlls/d3dxof/d3dxof_private.h b/dlls/d3dxof/d3dxof_private.h index 4b2ae38562f..e3eaa75bc1b 100644 --- a/dlls/d3dxof/d3dxof_private.h +++ b/dlls/d3dxof/d3dxof_private.h @@ -24,6 +24,8 @@ #ifndef __D3DXOF_PRIVATE_INCLUDED__ #define __D3DXOF_PRIVATE_INCLUDED__ +#define CONST_VTABLE + #include #include "windef.h" diff --git a/dlls/d3dxof/main.c b/dlls/d3dxof/main.c index ad987ea3bd4..b3bdd25d1d5 100644 --- a/dlls/d3dxof/main.c +++ b/dlls/d3dxof/main.c @@ -137,7 +137,7 @@ static HRESULT WINAPI XFCF_LockServer(LPCLASSFACTORY iface, BOOL dolock) return S_OK; } -static IClassFactoryVtbl XFCF_Vtbl = +static const IClassFactoryVtbl XFCF_Vtbl = { XFCF_QueryInterface, XFCF_AddRef, diff --git a/dlls/ddraw/d3ddevice/mesa.c b/dlls/ddraw/d3ddevice/mesa.c index fbdb344a057..0b3d9499c07 100644 --- a/dlls/ddraw/d3ddevice/mesa.c +++ b/dlls/ddraw/d3ddevice/mesa.c @@ -29,6 +29,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -2573,7 +2576,7 @@ GL_IDirect3DDeviceImpl_7_SetViewport(LPDIRECT3DDEVICE7 iface, # define XCAST(fun) (void*) #endif -IDirect3DDevice7Vtbl VTABLE_IDirect3DDevice7 = +static const IDirect3DDevice7Vtbl VTABLE_IDirect3DDevice7 = { XCAST(QueryInterface) Main_IDirect3DDeviceImpl_7_3T_2T_1T_QueryInterface, XCAST(AddRef) Main_IDirect3DDeviceImpl_7_3T_2T_1T_AddRef, @@ -2637,7 +2640,7 @@ IDirect3DDevice7Vtbl VTABLE_IDirect3DDevice7 = # define XCAST(fun) (void*) #endif -IDirect3DDevice3Vtbl VTABLE_IDirect3DDevice3 = +static const IDirect3DDevice3Vtbl VTABLE_IDirect3DDevice3 = { XCAST(QueryInterface) Thunk_IDirect3DDeviceImpl_3_QueryInterface, XCAST(AddRef) Thunk_IDirect3DDeviceImpl_3_AddRef, @@ -2694,7 +2697,7 @@ IDirect3DDevice3Vtbl VTABLE_IDirect3DDevice3 = # define XCAST(fun) (void*) #endif -IDirect3DDevice2Vtbl VTABLE_IDirect3DDevice2 = +static const IDirect3DDevice2Vtbl VTABLE_IDirect3DDevice2 = { XCAST(QueryInterface) Thunk_IDirect3DDeviceImpl_2_QueryInterface, XCAST(AddRef) Thunk_IDirect3DDeviceImpl_2_AddRef, @@ -2742,7 +2745,7 @@ IDirect3DDevice2Vtbl VTABLE_IDirect3DDevice2 = # define XCAST(fun) (void*) #endif -IDirect3DDeviceVtbl VTABLE_IDirect3DDevice = +static const IDirect3DDeviceVtbl VTABLE_IDirect3DDevice = { XCAST(QueryInterface) Thunk_IDirect3DDeviceImpl_1_QueryInterface, XCAST(AddRef) Thunk_IDirect3DDeviceImpl_1_AddRef, diff --git a/dlls/ddraw/d3dexecutebuffer.c b/dlls/ddraw/d3dexecutebuffer.c index ad83685c7e8..3bd0664f913 100644 --- a/dlls/ddraw/d3dexecutebuffer.c +++ b/dlls/ddraw/d3dexecutebuffer.c @@ -26,6 +26,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -654,7 +657,7 @@ Main_IDirect3DExecuteBufferImpl_1_Optimize(LPDIRECT3DEXECUTEBUFFER iface, # define XCAST(fun) (void*) #endif -IDirect3DExecuteBufferVtbl VTABLE_IDirect3DExecuteBuffer = +static const IDirect3DExecuteBufferVtbl VTABLE_IDirect3DExecuteBuffer = { XCAST(QueryInterface) Main_IDirect3DExecuteBufferImpl_1_QueryInterface, XCAST(AddRef) Main_IDirect3DExecuteBufferImpl_1_AddRef, diff --git a/dlls/ddraw/d3dlight.c b/dlls/ddraw/d3dlight.c index 174a1b61bc3..2b6399ce49b 100644 --- a/dlls/ddraw/d3dlight.c +++ b/dlls/ddraw/d3dlight.c @@ -24,6 +24,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -215,7 +218,7 @@ GL_IDirect3DLightImpl_1_Release(LPDIRECT3DLIGHT iface) # define XCAST(fun) (void*) #endif -IDirect3DLightVtbl VTABLE_IDirect3DLight = +static const IDirect3DLightVtbl VTABLE_IDirect3DLight = { XCAST(QueryInterface) Main_IDirect3DLightImpl_1_QueryInterface, XCAST(AddRef) Main_IDirect3DLightImpl_1_AddRef, diff --git a/dlls/ddraw/d3dmaterial.c b/dlls/ddraw/d3dmaterial.c index 8216794c723..daeade5ad96 100644 --- a/dlls/ddraw/d3dmaterial.c +++ b/dlls/ddraw/d3dmaterial.c @@ -24,6 +24,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -332,7 +335,7 @@ static void activate(IDirect3DMaterialImpl* This) { # define XCAST(fun) (void*) #endif -IDirect3DMaterial3Vtbl VTABLE_IDirect3DMaterial3 = +static const IDirect3DMaterial3Vtbl VTABLE_IDirect3DMaterial3 = { XCAST(QueryInterface) Main_IDirect3DMaterialImpl_3_2T_1T_QueryInterface, XCAST(AddRef) Main_IDirect3DMaterialImpl_3_2T_1T_AddRef, @@ -353,7 +356,7 @@ IDirect3DMaterial3Vtbl VTABLE_IDirect3DMaterial3 = # define XCAST(fun) (void*) #endif -IDirect3DMaterial2Vtbl VTABLE_IDirect3DMaterial2 = +static const IDirect3DMaterial2Vtbl VTABLE_IDirect3DMaterial2 = { XCAST(QueryInterface) Thunk_IDirect3DMaterialImpl_2_QueryInterface, XCAST(AddRef) Thunk_IDirect3DMaterialImpl_2_AddRef, @@ -374,7 +377,7 @@ IDirect3DMaterial2Vtbl VTABLE_IDirect3DMaterial2 = # define XCAST(fun) (void*) #endif -IDirect3DMaterialVtbl VTABLE_IDirect3DMaterial = +static const IDirect3DMaterialVtbl VTABLE_IDirect3DMaterial = { XCAST(QueryInterface) Thunk_IDirect3DMaterialImpl_1_QueryInterface, XCAST(AddRef) Thunk_IDirect3DMaterialImpl_1_AddRef, diff --git a/dlls/ddraw/d3dtexture.c b/dlls/ddraw/d3dtexture.c index 2a88e78c994..633fb340a46 100644 --- a/dlls/ddraw/d3dtexture.c +++ b/dlls/ddraw/d3dtexture.c @@ -25,6 +25,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -823,7 +826,7 @@ Thunk_IDirect3DTextureImpl_1_Load(LPDIRECT3DTEXTURE iface, # define XCAST(fun) (void*) #endif -IDirect3DTexture2Vtbl VTABLE_IDirect3DTexture2 = +static const IDirect3DTexture2Vtbl VTABLE_IDirect3DTexture2 = { XCAST(QueryInterface) Thunk_IDirect3DTextureImpl_2_QueryInterface, XCAST(AddRef) Thunk_IDirect3DTextureImpl_2_AddRef, @@ -844,7 +847,7 @@ IDirect3DTexture2Vtbl VTABLE_IDirect3DTexture2 = # define XCAST(fun) (void*) #endif -IDirect3DTextureVtbl VTABLE_IDirect3DTexture = +static const IDirect3DTextureVtbl VTABLE_IDirect3DTexture = { XCAST(QueryInterface) Thunk_IDirect3DTextureImpl_1_QueryInterface, XCAST(AddRef) Thunk_IDirect3DTextureImpl_1_AddRef, diff --git a/dlls/ddraw/d3dvertexbuffer.c b/dlls/ddraw/d3dvertexbuffer.c index 7775b871e5d..5ebb1b54d34 100644 --- a/dlls/ddraw/d3dvertexbuffer.c +++ b/dlls/ddraw/d3dvertexbuffer.c @@ -21,6 +21,8 @@ #include "config.h" #include +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -475,7 +477,7 @@ GL_IDirect3DVertexBufferImpl_7_ProcessVerticesStrided(LPDIRECT3DVERTEXBUFFER7 if # define XCAST(fun) (void*) #endif -IDirect3DVertexBuffer7Vtbl VTABLE_IDirect3DVertexBuffer7 = +static const IDirect3DVertexBuffer7Vtbl VTABLE_IDirect3DVertexBuffer7 = { XCAST(QueryInterface) Main_IDirect3DVertexBufferImpl_7_1T_QueryInterface, XCAST(AddRef) Main_IDirect3DVertexBufferImpl_7_1T_AddRef, @@ -499,7 +501,7 @@ IDirect3DVertexBuffer7Vtbl VTABLE_IDirect3DVertexBuffer7 = # define XCAST(fun) (void*) #endif -IDirect3DVertexBufferVtbl VTABLE_IDirect3DVertexBuffer = +static const IDirect3DVertexBufferVtbl VTABLE_IDirect3DVertexBuffer = { XCAST(QueryInterface) Thunk_IDirect3DVertexBufferImpl_1_QueryInterface, XCAST(AddRef) Thunk_IDirect3DVertexBufferImpl_1_AddRef, diff --git a/dlls/ddraw/d3dviewport.c b/dlls/ddraw/d3dviewport.c index fd04ef2fca9..2f68ce3a6b5 100644 --- a/dlls/ddraw/d3dviewport.c +++ b/dlls/ddraw/d3dviewport.c @@ -24,6 +24,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -483,7 +486,7 @@ Main_IDirect3DViewportImpl_3_Clear2(LPDIRECT3DVIEWPORT3 iface, # define XCAST(fun) (void*) #endif -IDirect3DViewport3Vtbl VTABLE_IDirect3DViewport3 = +static const IDirect3DViewport3Vtbl VTABLE_IDirect3DViewport3 = { XCAST(QueryInterface) Main_IDirect3DViewportImpl_3_2_1_QueryInterface, XCAST(AddRef) Main_IDirect3DViewportImpl_3_2_1_AddRef, diff --git a/dlls/ddraw/dclipper/main.c b/dlls/ddraw/dclipper/main.c index 02361198338..77d4e7d3679 100644 --- a/dlls/ddraw/dclipper/main.c +++ b/dlls/ddraw/dclipper/main.c @@ -24,6 +24,8 @@ #include #include +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -42,7 +44,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); * DirectDrawCreateClipper (DDRAW.@) */ -static IDirectDrawClipperVtbl DDRAW_Clipper_VTable; +static const IDirectDrawClipperVtbl DDRAW_Clipper_VTable; HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, LPUNKNOWN pUnkOuter @@ -271,7 +273,7 @@ HRESULT WINAPI Main_DirectDrawClipper_IsClipListChanged( return DD_OK; } -static IDirectDrawClipperVtbl DDRAW_Clipper_VTable = +static const IDirectDrawClipperVtbl DDRAW_Clipper_VTable = { Main_DirectDrawClipper_QueryInterface, Main_DirectDrawClipper_AddRef, diff --git a/dlls/ddraw/ddraw/hal.c b/dlls/ddraw/ddraw/hal.c index 35ff6733e41..7e7b2f82e8a 100644 --- a/dlls/ddraw/ddraw/hal.c +++ b/dlls/ddraw/ddraw/hal.c @@ -23,6 +23,8 @@ #include #include +#define CONST_VTABLE + #include "wine/debug.h" #include "windef.h" #include "winbase.h" @@ -45,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); -static IDirectDraw7Vtbl HAL_DirectDraw_VTable; +static const IDirectDraw7Vtbl HAL_DirectDraw_VTable; static DDVERSIONDATA hal_version; static DD32BITDRIVERDATA hal_driverdata; @@ -553,7 +555,7 @@ HAL_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface, LPDWORD pNumCodes, } -static IDirectDraw7Vtbl HAL_DirectDraw_VTable = +static const IDirectDraw7Vtbl HAL_DirectDraw_VTable = { Main_DirectDraw_QueryInterface, Main_DirectDraw_AddRef, diff --git a/dlls/ddraw/ddraw/main.c b/dlls/ddraw/ddraw/main.c index 47e2ebd62c7..321a2a10caa 100644 --- a/dlls/ddraw/ddraw/main.c +++ b/dlls/ddraw/ddraw/main.c @@ -55,6 +55,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "winerror.h" #include "windef.h" #include "winbase.h" @@ -74,9 +77,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); -extern IDirectDrawVtbl DDRAW_IDirectDraw_VTable; -extern IDirectDraw2Vtbl DDRAW_IDirectDraw2_VTable; -extern IDirectDraw4Vtbl DDRAW_IDirectDraw4_VTable; +extern const IDirectDrawVtbl DDRAW_IDirectDraw_VTable; +extern const IDirectDraw2Vtbl DDRAW_IDirectDraw2_VTable; +extern const IDirectDraw4Vtbl DDRAW_IDirectDraw4_VTable; static void DDRAW_UnsubclassWindow(IDirectDrawImpl* This); @@ -1437,7 +1440,7 @@ void Uninit_DirectDraw_final_release(IDirectDrawImpl *This) Main_DirectDraw_final_release(This); } -static IDirectDraw7Vtbl Uninit_DirectDraw_VTable; +static const IDirectDraw7Vtbl Uninit_DirectDraw_VTable; /* Not called from the vtable. */ HRESULT Uninit_DirectDraw_Construct(IDirectDrawImpl *This, BOOL ex) @@ -1677,7 +1680,7 @@ Uninit_DirectDraw_EvaluateMode(LPDIRECTDRAW7 iface, DWORD dwFlags, return DDERR_NOTINITIALIZED; } -static IDirectDraw7Vtbl Uninit_DirectDraw_VTable = +static const IDirectDraw7Vtbl Uninit_DirectDraw_VTable = { Main_DirectDraw_QueryInterface, Main_DirectDraw_AddRef, diff --git a/dlls/ddraw/ddraw/thunks.c b/dlls/ddraw/ddraw/thunks.c index 18cea35f943..f10af08d373 100644 --- a/dlls/ddraw/ddraw/thunks.c +++ b/dlls/ddraw/ddraw/thunks.c @@ -17,6 +17,8 @@ */ #include +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -942,7 +944,7 @@ IDirectDraw4Impl_GetDeviceIdentifier(LPDIRECTDRAW4 This, return hr; } -IDirectDrawVtbl DDRAW_IDirectDraw_VTable = +const IDirectDrawVtbl DDRAW_IDirectDraw_VTable = { IDirectDrawImpl_QueryInterface, IDirectDrawImpl_AddRef, @@ -969,7 +971,7 @@ IDirectDrawVtbl DDRAW_IDirectDraw_VTable = IDirectDrawImpl_WaitForVerticalBlank, }; -IDirectDraw2Vtbl DDRAW_IDirectDraw2_VTable = +const IDirectDraw2Vtbl DDRAW_IDirectDraw2_VTable = { IDirectDraw2Impl_QueryInterface, IDirectDraw2Impl_AddRef, @@ -997,7 +999,7 @@ IDirectDraw2Vtbl DDRAW_IDirectDraw2_VTable = IDirectDraw2Impl_GetAvailableVidMem }; -IDirectDraw4Vtbl DDRAW_IDirectDraw4_VTable = +const IDirectDraw4Vtbl DDRAW_IDirectDraw4_VTable = { IDirectDraw4Impl_QueryInterface, IDirectDraw4Impl_AddRef, diff --git a/dlls/ddraw/ddraw/user.c b/dlls/ddraw/ddraw/user.c index 6bc44640666..80d55f952b0 100644 --- a/dlls/ddraw/ddraw/user.c +++ b/dlls/ddraw/ddraw/user.c @@ -25,6 +25,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -42,7 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); -static IDirectDraw7Vtbl User_DirectDraw_VTable; +static const IDirectDraw7Vtbl User_DirectDraw_VTable; static const DDDEVICEIDENTIFIER2 user_device = { @@ -531,7 +534,7 @@ User_DirectDraw_SetDisplayMode(LPDIRECTDRAW7 iface, DWORD dwWidth, /* TestCooperativeLevel: generic? */ /* WaitForVerticalBlank: ??? */ -static IDirectDraw7Vtbl User_DirectDraw_VTable = +static const IDirectDraw7Vtbl User_DirectDraw_VTable = { Main_DirectDraw_QueryInterface, Main_DirectDraw_AddRef, diff --git a/dlls/ddraw/direct3d/mesa.c b/dlls/ddraw/direct3d/mesa.c index abb9d8ac9c6..7ffea97caaa 100644 --- a/dlls/ddraw/direct3d/mesa.c +++ b/dlls/ddraw/direct3d/mesa.c @@ -30,6 +30,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -318,7 +321,7 @@ static void light_released(IDirectDrawImpl *This, GLenum light_num) # define XCAST(fun) (void*) #endif -IDirect3D7Vtbl VTABLE_IDirect3D7 = +static const IDirect3D7Vtbl VTABLE_IDirect3D7 = { XCAST(QueryInterface) Thunk_IDirect3DImpl_7_QueryInterface, XCAST(AddRef) Thunk_IDirect3DImpl_7_AddRef, @@ -341,7 +344,7 @@ IDirect3D7Vtbl VTABLE_IDirect3D7 = # define XCAST(fun) (void*) #endif -IDirect3D3Vtbl VTABLE_IDirect3D3 = +static const IDirect3D3Vtbl VTABLE_IDirect3D3 = { XCAST(QueryInterface) Thunk_IDirect3DImpl_3_QueryInterface, XCAST(AddRef) Thunk_IDirect3DImpl_3_AddRef, @@ -368,7 +371,7 @@ IDirect3D3Vtbl VTABLE_IDirect3D3 = # define XCAST(fun) (void*) #endif -IDirect3D2Vtbl VTABLE_IDirect3D2 = +static const IDirect3D2Vtbl VTABLE_IDirect3D2 = { XCAST(QueryInterface) Thunk_IDirect3DImpl_2_QueryInterface, XCAST(AddRef) Thunk_IDirect3DImpl_2_AddRef, @@ -392,7 +395,7 @@ IDirect3D2Vtbl VTABLE_IDirect3D2 = # define XCAST(fun) (void*) #endif -IDirect3DVtbl VTABLE_IDirect3D = +static const IDirect3DVtbl VTABLE_IDirect3D = { XCAST(QueryInterface) Thunk_IDirect3DImpl_1_QueryInterface, XCAST(AddRef) Thunk_IDirect3DImpl_1_AddRef, diff --git a/dlls/ddraw/dpalette/hal.c b/dlls/ddraw/dpalette/hal.c index 5b37a70743d..7b602b5ba49 100644 --- a/dlls/ddraw/dpalette/hal.c +++ b/dlls/ddraw/dpalette/hal.c @@ -24,6 +24,8 @@ #include #include +#define CONST_VTABLE + #include "ddraw_private.h" #include "dpalette/main.h" #include "dpalette/hal.h" @@ -31,7 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); -static IDirectDrawPaletteVtbl DDRAW_HAL_Palette_VTable; +static const IDirectDrawPaletteVtbl DDRAW_HAL_Palette_VTable; /****************************************************************************** * IDirectDrawPalette @@ -125,7 +127,7 @@ void HAL_DirectDrawPalette_final_release(IDirectDrawPaletteImpl* This) Main_DirectDrawPalette_final_release(This); } -static IDirectDrawPaletteVtbl DDRAW_HAL_Palette_VTable = +static const IDirectDrawPaletteVtbl DDRAW_HAL_Palette_VTable = { Main_DirectDrawPalette_QueryInterface, Main_DirectDrawPalette_AddRef, diff --git a/dlls/ddraw/dpalette/main.c b/dlls/ddraw/dpalette/main.c index 9e955e71e52..c7ed112813d 100644 --- a/dlls/ddraw/dpalette/main.c +++ b/dlls/ddraw/dpalette/main.c @@ -25,6 +25,8 @@ #include #include +#define CONST_VTABLE + #include "ddraw_private.h" #include "dpalette/main.h" #include "ddraw/main.h" @@ -36,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); /* For unsigned x. 0 is not a power of 2. */ #define IS_POW_2(x) (((x) & ((x) - 1)) == 0) -static IDirectDrawPaletteVtbl DDRAW_Main_Palette_VTable; +static const IDirectDrawPaletteVtbl DDRAW_Main_Palette_VTable; /****************************************************************************** * IDirectDrawPalette @@ -271,7 +273,7 @@ Main_DirectDrawPalette_QueryInterface(LPDIRECTDRAWPALETTE iface, } } -static IDirectDrawPaletteVtbl DDRAW_Main_Palette_VTable = +static const IDirectDrawPaletteVtbl DDRAW_Main_Palette_VTable = { Main_DirectDrawPalette_QueryInterface, Main_DirectDrawPalette_AddRef, diff --git a/dlls/ddraw/dsurface/dib.c b/dlls/ddraw/dsurface/dib.c index 8f6910d79f8..5787b6fab6b 100644 --- a/dlls/ddraw/dsurface/dib.c +++ b/dlls/ddraw/dsurface/dib.c @@ -27,6 +27,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "winerror.h" #include "wine/debug.h" #include "ddraw_private.h" @@ -40,7 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); extern HBITMAP DIB_CreateDIBSection( HDC hdc, const BITMAPINFO *bmi, UINT usage, VOID **bits, HANDLE section, DWORD offset, DWORD ovr_pitch ); -static IDirectDrawSurface7Vtbl DIB_IDirectDrawSurface7_VTable; +static const IDirectDrawSurface7Vtbl DIB_IDirectDrawSurface7_VTable; /* Return the width of a DIB bitmap in bytes. DIB bitmap data is 32-bit aligned. */ inline static int get_dib_width_bytes( int width, int depth ) @@ -1408,7 +1411,7 @@ DIB_DirectDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface, /* UpdateOverlayDisplay: generic */ /* UpdateOverlayZOrder: generic */ -static IDirectDrawSurface7Vtbl DIB_IDirectDrawSurface7_VTable = +static const IDirectDrawSurface7Vtbl DIB_IDirectDrawSurface7_VTable = { Main_DirectDrawSurface_QueryInterface, Main_DirectDrawSurface_AddRef, diff --git a/dlls/ddraw/dsurface/fakezbuffer.c b/dlls/ddraw/dsurface/fakezbuffer.c index e2cfdd9b209..6281545cd8c 100644 --- a/dlls/ddraw/dsurface/fakezbuffer.c +++ b/dlls/ddraw/dsurface/fakezbuffer.c @@ -30,6 +30,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -46,7 +49,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); -static IDirectDrawSurface7Vtbl FakeZBuffer_IDirectDrawSurface7_VTable; +static const IDirectDrawSurface7Vtbl FakeZBuffer_IDirectDrawSurface7_VTable; #ifdef HAVE_OPENGL static void zbuffer_lock_update(IDirectDrawSurfaceImpl* This, LPCRECT pRect, DWORD dwFlags) @@ -259,7 +262,7 @@ FakeZBuffer_DirectDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface, } -static IDirectDrawSurface7Vtbl FakeZBuffer_IDirectDrawSurface7_VTable= +static const IDirectDrawSurface7Vtbl FakeZBuffer_IDirectDrawSurface7_VTable= { Main_DirectDrawSurface_QueryInterface, Main_DirectDrawSurface_AddRef, diff --git a/dlls/ddraw/dsurface/gamma.c b/dlls/ddraw/dsurface/gamma.c index 53953a31570..c6af6d030b5 100644 --- a/dlls/ddraw/dsurface/gamma.c +++ b/dlls/ddraw/dsurface/gamma.c @@ -23,6 +23,8 @@ #include #include +#define CONST_VTABLE + #include "wine/debug.h" #include "ddraw_private.h" #include "dsurface/main.h" @@ -70,7 +72,7 @@ DirectDrawGammaControl_SetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlag return This->set_gamma_ramp(This, dwFlags, lpGammaRamp); } -IDirectDrawGammaControlVtbl DDRAW_IDDGC_VTable = +const IDirectDrawGammaControlVtbl DDRAW_IDDGC_VTable = { DirectDrawGammaControl_QueryInterface, DirectDrawGammaControl_AddRef, diff --git a/dlls/ddraw/dsurface/hal.c b/dlls/ddraw/dsurface/hal.c index b9293ef8fe4..e9183155a50 100644 --- a/dlls/ddraw/dsurface/hal.c +++ b/dlls/ddraw/dsurface/hal.c @@ -24,6 +24,9 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT + +#define CONST_VTABLE + #include "wine/debug.h" #include "ddraw_private.h" #include "ddraw/user.h" @@ -35,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); -static IDirectDrawSurface7Vtbl HAL_IDirectDrawSurface7_VTable; +static const IDirectDrawSurface7Vtbl HAL_IDirectDrawSurface7_VTable; static HRESULT HAL_DirectDrawSurface_create_surface(IDirectDrawSurfaceImpl* This, IDirectDrawImpl* pDD) @@ -362,7 +365,7 @@ HWND HAL_DirectDrawSurface_get_display_window(IDirectDrawSurfaceImpl* This) return 0; } -static IDirectDrawSurface7Vtbl HAL_IDirectDrawSurface7_VTable = +static const IDirectDrawSurface7Vtbl HAL_IDirectDrawSurface7_VTable = { Main_DirectDrawSurface_QueryInterface, Main_DirectDrawSurface_AddRef, diff --git a/dlls/ddraw/dsurface/main.c b/dlls/ddraw/dsurface/main.c index a33e27be13b..b9e86b67bb9 100644 --- a/dlls/ddraw/dsurface/main.c +++ b/dlls/ddraw/dsurface/main.c @@ -24,6 +24,8 @@ #include #define COBJMACROS +#define CONST_VTABLE + #define NONAMELESSUNION #define NONAMELESSSTRUCT diff --git a/dlls/ddraw/dsurface/main.h b/dlls/ddraw/dsurface/main.h index 07d3b887175..415e824b3f2 100644 --- a/dlls/ddraw/dsurface/main.h +++ b/dlls/ddraw/dsurface/main.h @@ -45,7 +45,7 @@ typedef struct PrivateData DWORD size; } PrivateData; -extern IDirectDrawGammaControlVtbl DDRAW_IDDGC_VTable; +extern const IDirectDrawGammaControlVtbl DDRAW_IDDGC_VTable; /* Non-interface functions */ HRESULT diff --git a/dlls/ddraw/dsurface/thunks.c b/dlls/ddraw/dsurface/thunks.c index 0d63c597e38..a2098c30833 100644 --- a/dlls/ddraw/dsurface/thunks.c +++ b/dlls/ddraw/dsurface/thunks.c @@ -19,6 +19,8 @@ #include "config.h" #include +#define CONST_VTABLE + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -390,7 +392,7 @@ IDirectDrawSurface3Impl_SetSurfaceDesc(LPDIRECTDRAWSURFACE3 This, dwFlags); } -IDirectDrawSurface3Vtbl DDRAW_IDDS3_Thunk_VTable = +const IDirectDrawSurface3Vtbl DDRAW_IDDS3_Thunk_VTable = { IDirectDrawSurface3Impl_QueryInterface, IDirectDrawSurface3Impl_AddRef, diff --git a/dlls/ddraw/dsurface/thunks.h b/dlls/ddraw/dsurface/thunks.h index b1c39b066c2..65754b036d0 100644 --- a/dlls/ddraw/dsurface/thunks.h +++ b/dlls/ddraw/dsurface/thunks.h @@ -19,6 +19,6 @@ #ifndef DDRAW_DSURFACE_THUNKS_H_INCLUDED #define DDRAW_DSURFACE_THUNKS_H_INCLUDED -extern IDirectDrawSurface3Vtbl DDRAW_IDDS3_Thunk_VTable; +extern const IDirectDrawSurface3Vtbl DDRAW_IDDS3_Thunk_VTable; #endif diff --git a/dlls/ddraw/dsurface/user.c b/dlls/ddraw/dsurface/user.c index 04d7cdc4b40..3fadc2f9bb5 100644 --- a/dlls/ddraw/dsurface/user.c +++ b/dlls/ddraw/dsurface/user.c @@ -23,6 +23,8 @@ #include #include +#define CONST_VTABLE + #include "winerror.h" #include "wine/debug.h" #include "ddraw_private.h" @@ -52,7 +54,7 @@ static void User_copy_to_screen(IDirectDrawSurfaceImpl* This, LPCRECT rc); static HWND get_display_window(IDirectDrawSurfaceImpl* This, LPPOINT pt); -static IDirectDrawSurface7Vtbl User_IDirectDrawSurface7_VTable; +static const IDirectDrawSurface7Vtbl User_IDirectDrawSurface7_VTable; HRESULT User_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl* This, @@ -625,7 +627,7 @@ static void User_copy_from_screen(IDirectDrawSurfaceImpl* This, LPCRECT rc) } #endif -static IDirectDrawSurface7Vtbl User_IDirectDrawSurface7_VTable = +static const IDirectDrawSurface7Vtbl User_IDirectDrawSurface7_VTable = { Main_DirectDrawSurface_QueryInterface, Main_DirectDrawSurface_AddRef, diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index afa7acbe7c3..36c499654a4 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -534,7 +534,7 @@ static HRESULT WINAPI DDCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) return S_OK; } -static IClassFactoryVtbl DDCF_Vtbl = +static const IClassFactoryVtbl DDCF_Vtbl = { DDCF_QueryInterface, DDCF_AddRef, diff --git a/include/objbase.h b/include/objbase.h index b25b4a58bb3..605129606ad 100644 --- a/include/objbase.h +++ b/include/objbase.h @@ -251,8 +251,8 @@ #define CONST_VTBL const #define DECLARE_INTERFACE(iface) \ /*typedef*/ interface iface { const struct iface##Vtbl *lpVtbl; } /*iface*/; \ - typedef const struct iface##Vtbl iface##Vtbl; \ - const struct iface##Vtbl + typedef struct iface##Vtbl iface##Vtbl; \ + struct iface##Vtbl #else #undef CONST_VTBL #define CONST_VTBL