From eba47f1dfe8aa2b94023d7133dcd31875cccf201 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 6 Jun 2005 19:50:35 +0000 Subject: [PATCH] Make remaining OLE interface vtables const. --- dlls/ole32/antimoniker.c | 8 ++-- dlls/ole32/bindctx.c | 4 +- dlls/ole32/clipboard.c | 8 ++-- dlls/ole32/compositemoniker.c | 14 +++--- dlls/ole32/datacache.c | 24 +++++----- dlls/ole32/defaulthandler.c | 16 +++---- dlls/ole32/errorinfo.c | 18 +++---- dlls/ole32/filemoniker.c | 8 ++-- dlls/ole32/ftmarshal.c | 8 ++-- dlls/ole32/git.c | 8 ++-- dlls/ole32/hglobalstream.c | 4 +- dlls/ole32/ifs.c | 16 +++---- dlls/ole32/itemmoniker.c | 8 ++-- dlls/ole32/memlockbytes.c | 4 +- dlls/ole32/memlockbytes16.c | 4 +- dlls/ole32/moniker.c | 2 +- dlls/ole32/ole16.c | 12 ++--- dlls/ole32/oleobj.c | 8 ++-- dlls/ole32/oleproxy.c | 12 ++--- dlls/ole32/regsvr.c | 2 +- dlls/ole32/stg_prop.c | 8 ++-- dlls/ole32/stg_stream.c | 2 +- dlls/ole32/storage.c | 16 +++---- dlls/ole32/storage32.c | 8 ++-- dlls/ole32/storage32.h | 8 ++-- dlls/ole32/tests/marshal.c | 12 ++--- dlls/oleaut32/connpt.c | 12 ++--- dlls/oleaut32/dispatch.c | 4 +- dlls/oleaut32/oaidl_p.c | 100 +++++++++++++++++++-------------------- dlls/oleaut32/olefont.c | 33 ++++++------- dlls/oleaut32/olepicture.c | 28 +++++------ dlls/oleaut32/recinfo.c | 4 +- dlls/oleaut32/tests/safearray.c | 10 ++-- dlls/oleaut32/tests/vartype.c | 4 +- dlls/oleaut32/tmarshal.c | 14 +++--- dlls/oleaut32/typelib.c | 24 +++++----- dlls/oleaut32/typelib2.c | 16 +++---- dlls/olecli/olecli16.c | 2 +- dlls/olecli/olecli_main.c | 2 +- dlls/olesvr/olesvr_main.c | 4 +- dlls/qcap/qcap_main.c | 2 +- dlls/qcap/vfwcapture.c | 12 ++--- dlls/quartz/enummoniker.c | 6 +-- dlls/quartz/filesource.c | 10 ++-- dlls/quartz/filtergraph.c | 36 +++++++------- dlls/quartz/filtermapper.c | 12 ++--- dlls/quartz/main.c | 2 +- dlls/quartz/memallocator.c | 4 +- dlls/quartz/parser.c | 8 ++-- dlls/quartz/pin.c | 8 ++-- dlls/quartz/systemclock.c | 6 +-- dlls/quartz/videorenderer.c | 12 ++--- dlls/riched20/richole.c | 4 +- dlls/rpcrt4/cproxy.c | 6 +-- dlls/rpcrt4/cpsf.c | 2 +- dlls/rpcrt4/ndr_ole.c | 4 +- dlls/shdocvw/classinfo.c | 4 +- dlls/shdocvw/events.c | 6 +-- dlls/shdocvw/factory.c | 2 +- dlls/shdocvw/misc.c | 2 +- dlls/shdocvw/oleobject.c | 10 ++-- dlls/shdocvw/persist.c | 4 +- dlls/shdocvw/shdocvw.h | 24 +++++----- dlls/shdocvw/shdocvw_main.c | 4 +- dlls/shdocvw/webbrowser.c | 2 +- dlls/shell32/autocomplete.c | 12 ++--- dlls/shell32/cpanelfolder.c | 24 +++++----- dlls/shell32/dataobject.c | 8 ++-- dlls/shell32/dragdrophelper.c | 6 +-- dlls/shell32/enumidlist.c | 6 +-- dlls/shell32/folders.c | 18 +++---- dlls/shell32/shelllink.c | 24 +++++----- dlls/shell32/shellole.c | 12 ++--- dlls/shell32/shfldr_desktop.c | 4 +- dlls/shell32/shfldr_fs.c | 30 ++++++------ dlls/shell32/shfldr_mycomp.c | 14 +++--- dlls/shell32/shlfsbind.c | 4 +- dlls/shell32/shlview.c | 31 ++++++------ dlls/shell32/shv_bg_cmenu.c | 6 +-- dlls/shell32/shv_item_cmenu.c | 6 +-- dlls/shell32/tests/shellpath.c | 19 ++++---- dlls/shlwapi/assoc.c | 6 +-- dlls/shlwapi/istream.c | 4 +- dlls/shlwapi/regstream.c | 7 +-- dlls/urlmon/sec_mgr.c | 8 ++-- dlls/urlmon/tests/url.c | 4 +- dlls/urlmon/umon.c | 8 ++-- dlls/urlmon/urlmon_main.c | 2 +- dlls/wined3d/basetexture.c | 2 +- dlls/wined3d/cubetexture.c | 2 +- dlls/wined3d/device.c | 2 +- dlls/wined3d/directx.c | 2 +- dlls/wined3d/indexbuffer.c | 2 +- dlls/wined3d/query.c | 2 +- dlls/wined3d/resource.c | 2 +- dlls/wined3d/stateblock.c | 2 +- dlls/wined3d/surface.c | 2 +- dlls/wined3d/texture.c | 2 +- dlls/wined3d/vertexbuffer.c | 2 +- dlls/wined3d/vertexdeclaration.c | 2 +- dlls/wined3d/vertexshader.c | 2 +- dlls/wined3d/volume.c | 2 +- dlls/wined3d/volumetexture.c | 2 +- dlls/wined3d/wined3d_private.h | 64 ++++++++++++------------- dlls/winmm/winealsa/audio.c | 8 ++-- dlls/winmm/wineaudioio/audio.c | 8 ++-- dlls/winmm/winejack/audio.c | 4 +- dlls/winmm/wineoss/dscapture.c | 16 +++---- dlls/winmm/wineoss/dsrender.c | 16 +++---- 109 files changed, 551 insertions(+), 549 deletions(-) diff --git a/dlls/ole32/antimoniker.c b/dlls/ole32/antimoniker.c index f08f7aa1908..8ec451357f9 100644 --- a/dlls/ole32/antimoniker.c +++ b/dlls/ole32/antimoniker.c @@ -42,12 +42,12 @@ const CLSID CLSID_AntiMoniker = { /* AntiMoniker data structure */ typedef struct AntiMonikerImpl{ - IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ + const IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether * two monikers are equal. That's whay IROTData interface is implemented by monikers. */ - IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ + const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ ULONG ref; /* reference counter for this object */ @@ -530,7 +530,7 @@ AntiMonikerROTDataImpl_GetComparaisonData(IROTData* iface, BYTE* pbData, /********************************************************************************/ /* Virtual function table for the AntiMonikerImpl class which include IPersist,*/ /* IPersistStream and IMoniker functions. */ -static IMonikerVtbl VT_AntiMonikerImpl = +static const IMonikerVtbl VT_AntiMonikerImpl = { AntiMonikerImpl_QueryInterface, AntiMonikerImpl_AddRef, @@ -559,7 +559,7 @@ static IMonikerVtbl VT_AntiMonikerImpl = /********************************************************************************/ /* Virtual function table for the IROTData class. */ -static IROTDataVtbl VT_ROTDataImpl = +static const IROTDataVtbl VT_ROTDataImpl = { AntiMonikerROTDataImpl_QueryInterface, AntiMonikerROTDataImpl_AddRef, diff --git a/dlls/ole32/bindctx.c b/dlls/ole32/bindctx.c index 1992e62edb2..3d19e064e1a 100644 --- a/dlls/ole32/bindctx.c +++ b/dlls/ole32/bindctx.c @@ -50,7 +50,7 @@ typedef struct BindCtxObject{ /* BindCtx data strucrture */ typedef struct BindCtxImpl{ - IBindCtxVtbl *lpVtbl; /* VTable relative to the IBindCtx interface.*/ + const IBindCtxVtbl *lpVtbl; /* VTable relative to the IBindCtx interface.*/ ULONG ref; /* reference counter for this object */ @@ -474,7 +474,7 @@ static HRESULT BindCtxImpl_GetObjectIndex(BindCtxImpl* This, } /* Virtual function table for the BindCtx class. */ -static IBindCtxVtbl VT_BindCtxImpl = +static const IBindCtxVtbl VT_BindCtxImpl = { BindCtxImpl_QueryInterface, BindCtxImpl_AddRef, diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index 236416e15c8..4368ef50956 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -96,7 +96,7 @@ struct OLEClipbrd /* * List all interface VTables here */ - IDataObjectVtbl* lpvtbl1; /* IDataObject VTable */ + const IDataObjectVtbl* lpvtbl1; /* IDataObject VTable */ /* * The hidden OLE clipboard window. This window is used as the bridge between the @@ -135,7 +135,7 @@ typedef struct OLEClipbrd OLEClipbrd; typedef struct { /* IEnumFORMATETC VTable */ - IEnumFORMATETCVtbl *lpVtbl; + const IEnumFORMATETCVtbl *lpVtbl; /* IEnumFORMATETC fields */ UINT posFmt; /* current enumerator position */ @@ -250,7 +250,7 @@ static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_Clone(LPENUMFORMATETC iface, LPE /* * Virtual function table for the OLEClipbrd's exposed IDataObject interface */ -static IDataObjectVtbl OLEClipbrd_IDataObject_VTable = +static const IDataObjectVtbl OLEClipbrd_IDataObject_VTable = { OLEClipbrd_IDataObject_QueryInterface, OLEClipbrd_IDataObject_AddRef, @@ -269,7 +269,7 @@ static IDataObjectVtbl OLEClipbrd_IDataObject_VTable = /* * Virtual function table for IEnumFORMATETC interface */ -static struct IEnumFORMATETCVtbl efvt = +static const IEnumFORMATETCVtbl efvt = { OLEClipbrd_IEnumFORMATETC_QueryInterface, OLEClipbrd_IEnumFORMATETC_AddRef, diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c index cb3015cd50a..54cd7d4df5b 100644 --- a/dlls/ole32/compositemoniker.c +++ b/dlls/ole32/compositemoniker.c @@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); -const CLSID CLSID_CompositeMoniker = { +static const CLSID CLSID_CompositeMoniker = { 0x309, 0, 0, {0xC0, 0, 0, 0, 0, 0, 0, 0x46} }; @@ -46,13 +46,13 @@ const CLSID CLSID_CompositeMoniker = { /* CompositeMoniker data structure */ typedef struct CompositeMonikerImpl{ - IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ + const IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ /* The ROT (RunningObjectTable implementation) uses the IROTData * interface to test whether two monikers are equal. That's why IROTData * interface is implemented by monikers. */ - IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ + const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ ULONG ref; /* reference counter for this object */ @@ -68,7 +68,7 @@ typedef struct CompositeMonikerImpl{ /* EnumMoniker data structure */ typedef struct EnumMonikerImpl{ - IEnumMonikerVtbl *lpVtbl; /* VTable relative to the IEnumMoniker interface.*/ + const IEnumMonikerVtbl *lpVtbl; /* VTable relative to the IEnumMoniker interface.*/ ULONG ref; /* reference counter for this object */ @@ -1388,7 +1388,7 @@ EnumMonikerImpl_Clone(IEnumMoniker* iface,IEnumMoniker** ppenum) /********************************************************************************/ /* Virtual function table for the IROTData class */ -static IEnumMonikerVtbl VT_EnumMonikerImpl = +static const IEnumMonikerVtbl VT_EnumMonikerImpl = { EnumMonikerImpl_QueryInterface, EnumMonikerImpl_AddRef, @@ -1453,7 +1453,7 @@ EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ULONG tabSize, /* Virtual function table for the CompositeMonikerImpl class which includes */ /* IPersist, IPersistStream and IMoniker functions. */ -static IMonikerVtbl VT_CompositeMonikerImpl = +static const IMonikerVtbl VT_CompositeMonikerImpl = { CompositeMonikerImpl_QueryInterface, CompositeMonikerImpl_AddRef, @@ -1482,7 +1482,7 @@ static IMonikerVtbl VT_CompositeMonikerImpl = /********************************************************************************/ /* Virtual function table for the IROTData class. */ -static IROTDataVtbl VT_ROTDataImpl = +static const IROTDataVtbl VT_ROTDataImpl = { CompositeMonikerROTDataImpl_QueryInterface, CompositeMonikerROTDataImpl_AddRef, diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 298defbf89b..8ee3412a9d9 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -93,12 +93,12 @@ struct DataCache /* * List all interface VTables here */ - IDataObjectVtbl* lpvtbl1; - IUnknownVtbl* lpvtbl2; - IPersistStorageVtbl* lpvtbl3; - IViewObject2Vtbl* lpvtbl4; - IOleCache2Vtbl* lpvtbl5; - IOleCacheControlVtbl* lpvtbl6; + const IDataObjectVtbl* lpvtbl1; + const IUnknownVtbl* lpvtbl2; + const IPersistStorageVtbl* lpvtbl3; + const IViewObject2Vtbl* lpvtbl4; + const IOleCache2Vtbl* lpvtbl5; + const IOleCacheControlVtbl* lpvtbl6; /* * Reference count of this object @@ -1617,14 +1617,14 @@ static HRESULT WINAPI DataCache_OnStop( /* * Virtual function tables for the DataCache class. */ -static IUnknownVtbl DataCache_NDIUnknown_VTable = +static const IUnknownVtbl DataCache_NDIUnknown_VTable = { DataCache_NDIUnknown_QueryInterface, DataCache_NDIUnknown_AddRef, DataCache_NDIUnknown_Release }; -static IDataObjectVtbl DataCache_IDataObject_VTable = +static const IDataObjectVtbl DataCache_IDataObject_VTable = { DataCache_IDataObject_QueryInterface, DataCache_IDataObject_AddRef, @@ -1640,7 +1640,7 @@ static IDataObjectVtbl DataCache_IDataObject_VTable = DataCache_EnumDAdvise }; -static IPersistStorageVtbl DataCache_IPersistStorage_VTable = +static const IPersistStorageVtbl DataCache_IPersistStorage_VTable = { DataCache_IPersistStorage_QueryInterface, DataCache_IPersistStorage_AddRef, @@ -1654,7 +1654,7 @@ static IPersistStorageVtbl DataCache_IPersistStorage_VTable = DataCache_HandsOffStorage }; -static IViewObject2Vtbl DataCache_IViewObject2_VTable = +static const IViewObject2Vtbl DataCache_IViewObject2_VTable = { DataCache_IViewObject2_QueryInterface, DataCache_IViewObject2_AddRef, @@ -1668,7 +1668,7 @@ static IViewObject2Vtbl DataCache_IViewObject2_VTable = DataCache_GetExtent }; -static IOleCache2Vtbl DataCache_IOleCache2_VTable = +static const IOleCache2Vtbl DataCache_IOleCache2_VTable = { DataCache_IOleCache2_QueryInterface, DataCache_IOleCache2_AddRef, @@ -1682,7 +1682,7 @@ static IOleCache2Vtbl DataCache_IOleCache2_VTable = DataCache_DiscardCache }; -static IOleCacheControlVtbl DataCache_IOleCacheControl_VTable = +static const IOleCacheControlVtbl DataCache_IOleCacheControl_VTable = { DataCache_IOleCacheControl_QueryInterface, DataCache_IOleCacheControl_AddRef, diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c index 205000d3ed7..a387801fdc9 100644 --- a/dlls/ole32/defaulthandler.c +++ b/dlls/ole32/defaulthandler.c @@ -70,10 +70,10 @@ struct DefaultHandler /* * List all interface VTables here */ - IOleObjectVtbl* lpvtbl1; - IUnknownVtbl* lpvtbl2; - IDataObjectVtbl* lpvtbl3; - IRunnableObjectVtbl* lpvtbl4; + const IOleObjectVtbl* lpvtbl1; + const IUnknownVtbl* lpvtbl2; + const IDataObjectVtbl* lpvtbl3; + const IRunnableObjectVtbl* lpvtbl4; /* * Reference count of this object @@ -325,7 +325,7 @@ static HRESULT WINAPI DefaultHandler_SetContainedObject( /* * Virtual function tables for the DefaultHandler class. */ -static IOleObjectVtbl DefaultHandler_IOleObject_VTable = +static const IOleObjectVtbl DefaultHandler_IOleObject_VTable = { DefaultHandler_QueryInterface, DefaultHandler_AddRef, @@ -353,14 +353,14 @@ static IOleObjectVtbl DefaultHandler_IOleObject_VTable = DefaultHandler_SetColorScheme }; -static IUnknownVtbl DefaultHandler_NDIUnknown_VTable = +static const IUnknownVtbl DefaultHandler_NDIUnknown_VTable = { DefaultHandler_NDIUnknown_QueryInterface, DefaultHandler_NDIUnknown_AddRef, DefaultHandler_NDIUnknown_Release, }; -static IDataObjectVtbl DefaultHandler_IDataObject_VTable = +static const IDataObjectVtbl DefaultHandler_IDataObject_VTable = { DefaultHandler_IDataObject_QueryInterface, DefaultHandler_IDataObject_AddRef, @@ -376,7 +376,7 @@ static IDataObjectVtbl DefaultHandler_IDataObject_VTable = DefaultHandler_EnumDAdvise }; -static IRunnableObjectVtbl DefaultHandler_IRunnableObject_VTable = +static const IRunnableObjectVtbl DefaultHandler_IRunnableObject_VTable = { DefaultHandler_IRunnableObject_QueryInterface, DefaultHandler_IRunnableObject_AddRef, diff --git a/dlls/ole32/errorinfo.c b/dlls/ole32/errorinfo.c index f06f9052ea1..5ac51df1c3a 100644 --- a/dlls/ole32/errorinfo.c +++ b/dlls/ole32/errorinfo.c @@ -128,9 +128,9 @@ static VOID WINAPI ERRORINFO_SysFreeString(BSTR in) typedef struct ErrorInfoImpl { - IErrorInfoVtbl *lpvtei; - ICreateErrorInfoVtbl *lpvtcei; - ISupportErrorInfoVtbl *lpvtsei; + const IErrorInfoVtbl *lpvtei; + const ICreateErrorInfoVtbl *lpvtcei; + const ISupportErrorInfoVtbl *lpvtsei; DWORD ref; GUID m_Guid; @@ -140,9 +140,9 @@ typedef struct ErrorInfoImpl DWORD m_dwHelpContext; } ErrorInfoImpl; -static IErrorInfoVtbl IErrorInfoImpl_VTable; -static ICreateErrorInfoVtbl ICreateErrorInfoImpl_VTable; -static ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable; +static const IErrorInfoVtbl IErrorInfoImpl_VTable; +static const ICreateErrorInfoVtbl ICreateErrorInfoImpl_VTable; +static const ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable; /* converts an object pointer to This @@ -303,7 +303,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetHelpContext( return S_OK; } -static IErrorInfoVtbl IErrorInfoImpl_VTable = +static const IErrorInfoVtbl IErrorInfoImpl_VTable = { IErrorInfoImpl_QueryInterface, IErrorInfoImpl_AddRef, @@ -402,7 +402,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpContext( return S_OK; } -static ICreateErrorInfoVtbl ICreateErrorInfoImpl_VTable = +static const ICreateErrorInfoVtbl ICreateErrorInfoImpl_VTable = { ICreateErrorInfoImpl_QueryInterface, ICreateErrorInfoImpl_AddRef, @@ -452,7 +452,7 @@ static HRESULT WINAPI ISupportErrorInfoImpl_InterfaceSupportsErrorInfo( return (IsEqualIID(riid, &This->m_Guid)) ? S_OK : S_FALSE; } -static ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable = +static const ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable = { ISupportErrorInfoImpl_QueryInterface, ISupportErrorInfoImpl_AddRef, diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c index 27ca79c22e1..2dcb532cd1a 100644 --- a/dlls/ole32/filemoniker.c +++ b/dlls/ole32/filemoniker.c @@ -46,12 +46,12 @@ const CLSID CLSID_FileMoniker = { /* filemoniker data structure */ typedef struct FileMonikerImpl{ - IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ + const IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether * two monikers are equal. That's whay IROTData interface is implemented by monikers. */ - IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ + const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ ULONG ref; /* reference counter for this object */ @@ -1262,7 +1262,7 @@ FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData, * Virtual function table for the FileMonikerImpl class which include IPersist, * IPersistStream and IMoniker functions. */ -static IMonikerVtbl VT_FileMonikerImpl = +static const IMonikerVtbl VT_FileMonikerImpl = { FileMonikerImpl_QueryInterface, FileMonikerImpl_AddRef, @@ -1290,7 +1290,7 @@ static IMonikerVtbl VT_FileMonikerImpl = }; /* Virtual function table for the IROTData class. */ -static IROTDataVtbl VT_ROTDataImpl = +static const IROTDataVtbl VT_ROTDataImpl = { FileMonikerROTDataImpl_QueryInterface, FileMonikerROTDataImpl_AddRef, diff --git a/dlls/ole32/ftmarshal.c b/dlls/ole32/ftmarshal.c index 786d8d0fc5a..0a17b3489de 100644 --- a/dlls/ole32/ftmarshal.c +++ b/dlls/ole32/ftmarshal.c @@ -37,9 +37,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); typedef struct _FTMarshalImpl { - IUnknownVtbl *lpVtbl; + const IUnknownVtbl *lpVtbl; DWORD ref; - IMarshalVtbl *lpvtblFTM; + const IMarshalVtbl *lpvtblFTM; IUnknown *pUnkOuter; } FTMarshalImpl; @@ -93,7 +93,7 @@ static ULONG WINAPI IiFTMUnknown_fnRelease (IUnknown * iface) return 0; } -static IUnknownVtbl iunkvt = +static const IUnknownVtbl iunkvt = { IiFTMUnknown_fnQueryInterface, IiFTMUnknown_fnAddRef, @@ -208,7 +208,7 @@ static HRESULT WINAPI FTMarshalImpl_DisconnectObject (LPMARSHAL iface, DWORD dwR return S_OK; } -static IMarshalVtbl ftmvtbl = +static const IMarshalVtbl ftmvtbl = { FTMarshalImpl_QueryInterface, FTMarshalImpl_AddRef, diff --git a/dlls/ole32/git.c b/dlls/ole32/git.c index d2eccbf1cbc..f51714c8a79 100644 --- a/dlls/ole32/git.c +++ b/dlls/ole32/git.c @@ -72,7 +72,7 @@ typedef struct StdGITEntry /* Class data */ typedef struct StdGlobalInterfaceTableImpl { - IGlobalInterfaceTableVtbl *lpVtbl; + const IGlobalInterfaceTableVtbl *lpVtbl; ULONG ref; struct StdGITEntry* firstEntry; @@ -360,7 +360,7 @@ static HRESULT WINAPI GITCF_LockServer(LPCLASSFACTORY iface, BOOL fLock) return S_OK; } -static IClassFactoryVtbl GITClassFactoryVtbl = { +static const IClassFactoryVtbl GITClassFactoryVtbl = { GITCF_QueryInterface, GITCF_AddRef, GITCF_Release, @@ -368,7 +368,7 @@ static IClassFactoryVtbl GITClassFactoryVtbl = { GITCF_LockServer }; -static IClassFactoryVtbl *PGITClassFactoryVtbl = &GITClassFactoryVtbl; +static const IClassFactoryVtbl *PGITClassFactoryVtbl = &GITClassFactoryVtbl; HRESULT StdGlobalInterfaceTable_GetFactory(LPVOID *ppv) { @@ -378,7 +378,7 @@ HRESULT StdGlobalInterfaceTable_GetFactory(LPVOID *ppv) } /* Virtual function table */ -static IGlobalInterfaceTableVtbl StdGlobalInterfaceTableImpl_Vtbl = +static const IGlobalInterfaceTableVtbl StdGlobalInterfaceTableImpl_Vtbl = { StdGlobalInterfaceTable_QueryInterface, StdGlobalInterfaceTable_AddRef, diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c index a70385a2309..9895df6f176 100644 --- a/dlls/ole32/hglobalstream.c +++ b/dlls/ole32/hglobalstream.c @@ -54,7 +54,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(storage); */ struct HGLOBALStreamImpl { - IStreamVtbl *lpVtbl; /* Needs to be the first item in the struct + const IStreamVtbl *lpVtbl; /* Needs to be the first item in the struct * since we want to cast this in an IStream pointer */ /* @@ -629,7 +629,7 @@ static HRESULT WINAPI HGLOBALStreamImpl_Clone( /* * Virtual function table for the HGLOBALStreamImpl class. */ -static IStreamVtbl HGLOBALStreamImpl_Vtbl = +static const IStreamVtbl HGLOBALStreamImpl_Vtbl = { HGLOBALStreamImpl_QueryInterface, HGLOBALStreamImpl_AddRef, diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c index 3d8ffea385d..c2ba17707e0 100644 --- a/dlls/ole32/ifs.c +++ b/dlls/ole32/ifs.c @@ -47,10 +47,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(olemalloc); * *****************************************************************************/ /* set the vtable later */ -static IMallocVtbl VT_IMalloc32; +static const IMallocVtbl VT_IMalloc32; typedef struct { - IMallocVtbl *lpVtbl; + const IMallocVtbl *lpVtbl; DWORD dummy; /* nothing, we are static */ IMallocSpy * pSpy; /* the spy when active */ DWORD SpyedAllocationsLeft; /* number of spyed allocations left */ @@ -60,7 +60,7 @@ typedef struct { } _Malloc32; /* this is the static object instance */ -_Malloc32 Malloc32 = {&VT_IMalloc32, 0, NULL, 0, 0, NULL, 0}; +static _Malloc32 Malloc32 = {&VT_IMalloc32, 0, NULL, 0, 0, NULL, 0}; /* with a spy active all calls from pre to post methods are threadsave */ static CRITICAL_SECTION IMalloc32_SpyCS; @@ -344,7 +344,7 @@ static VOID WINAPI IMalloc_fnHeapMinimize(LPMALLOC iface) { } } -static IMallocVtbl VT_IMalloc32 = +static const IMallocVtbl VT_IMalloc32 = { IMalloc_fnQueryInterface, IMalloc_fnAddRefRelease, @@ -362,15 +362,15 @@ static IMallocVtbl VT_IMalloc32 = *****************************************************************************/ /* set the vtable later */ -static IMallocSpyVtbl VT_IMallocSpy; +static const IMallocSpyVtbl VT_IMallocSpy; typedef struct { - IMallocSpyVtbl *lpVtbl; + const IMallocSpyVtbl *lpVtbl; DWORD ref; } _MallocSpy; /* this is the static object instance */ -_MallocSpy MallocSpy = {&VT_IMallocSpy, 0}; +static _MallocSpy MallocSpy = {&VT_IMallocSpy, 0}; /****************************************************************************** * IMalloc32_QueryInterface [VTABLE] @@ -505,7 +505,7 @@ static void MallocSpyDumpLeaks() { TRACE("leaks: %lu\n", Malloc32.SpyedAllocationsLeft); } -static IMallocSpyVtbl VT_IMallocSpy = +static const IMallocSpyVtbl VT_IMallocSpy = { IMallocSpy_fnQueryInterface, IMallocSpy_fnAddRef, diff --git a/dlls/ole32/itemmoniker.c b/dlls/ole32/itemmoniker.c index a387619d31d..42ce0a57361 100644 --- a/dlls/ole32/itemmoniker.c +++ b/dlls/ole32/itemmoniker.c @@ -45,12 +45,12 @@ const CLSID CLSID_ItemMoniker = { /* ItemMoniker data structure */ typedef struct ItemMonikerImpl{ - IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ + const IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether * two monikers are equal. That's whay IROTData interface is implemented by monikers. */ - IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ + const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ ULONG ref; /* reference counter for this object */ @@ -113,7 +113,7 @@ static HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData* iface,B /********************************************************************************/ /* Virtual function table for the ItemMonikerImpl class which include IPersist,*/ /* IPersistStream and IMoniker functions. */ -static IMonikerVtbl VT_ItemMonikerImpl = +static const IMonikerVtbl VT_ItemMonikerImpl = { ItemMonikerImpl_QueryInterface, ItemMonikerImpl_AddRef, @@ -142,7 +142,7 @@ static IMonikerVtbl VT_ItemMonikerImpl = /********************************************************************************/ /* Virtual function table for the IROTData class. */ -static IROTDataVtbl VT_ROTDataImpl = +static const IROTDataVtbl VT_ROTDataImpl = { ItemMonikerROTDataImpl_QueryInterface, ItemMonikerROTDataImpl_AddRef, diff --git a/dlls/ole32/memlockbytes.c b/dlls/ole32/memlockbytes.c index 7d7fae56d95..c9a3a1a6f43 100644 --- a/dlls/ole32/memlockbytes.c +++ b/dlls/ole32/memlockbytes.c @@ -52,7 +52,7 @@ struct HGLOBALLockBytesImpl * Needs to be the first item in the struct * since we want to cast this in an ILockBytes pointer */ - ILockBytesVtbl *lpVtbl; + const ILockBytesVtbl *lpVtbl; /* * Reference count @@ -139,7 +139,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl_Stat( /* * Virtual function table for the HGLOBALLockBytesImpl class. */ -static ILockBytesVtbl HGLOBALLockBytesImpl_Vtbl = +static const ILockBytesVtbl HGLOBALLockBytesImpl_Vtbl = { HGLOBALLockBytesImpl_QueryInterface, HGLOBALLockBytesImpl_AddRef, diff --git a/dlls/ole32/memlockbytes16.c b/dlls/ole32/memlockbytes16.c index a2ae7a37f7c..17eaac110e7 100644 --- a/dlls/ole32/memlockbytes16.c +++ b/dlls/ole32/memlockbytes16.c @@ -52,7 +52,7 @@ struct HGLOBALLockBytesImpl16 * Needs to be the first item in the struct * since we want to cast this in an ILockBytes pointer */ - ILockBytes16Vtbl *lpVtbl; + const ILockBytes16Vtbl *lpVtbl; ULONG ref; /* @@ -176,7 +176,7 @@ HGLOBALLockBytesImpl16_Construct(HGLOBAL16 hGlobal, #undef VTENT msegvt16 = MapLS( &vt16 ); } - newLockBytes->lpVtbl = (ILockBytes16Vtbl*)msegvt16; + newLockBytes->lpVtbl = (const ILockBytes16Vtbl*)msegvt16; newLockBytes->ref = 0; /* * Initialize the support. diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c index f83b2fdad4a..816f506b872 100644 --- a/dlls/ole32/moniker.c +++ b/dlls/ole32/moniker.c @@ -716,7 +716,7 @@ HRESULT WINAPI CreateClassMoniker(REFCLSID rclsid, IMoniker ** ppmk) } /* Virtual function table for the IRunningObjectTable class. */ -static IRunningObjectTableVtbl VT_RunningObjectTableImpl = +static const IRunningObjectTableVtbl VT_RunningObjectTableImpl = { RunningObjectTableImpl_QueryInterface, RunningObjectTableImpl_AddRef, diff --git a/dlls/ole32/ole16.c b/dlls/ole32/ole16.c index aa1e7721a33..5f7ee6327cf 100644 --- a/dlls/ole32/ole16.c +++ b/dlls/ole32/ole16.c @@ -50,10 +50,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); -HTASK16 hETask = 0; -WORD Table_ETask[62]; +static HTASK16 hETask = 0; +static WORD Table_ETask[62]; -LPMALLOC16 currentMalloc16=NULL; +static LPMALLOC16 currentMalloc16=NULL; /* --- IMalloc16 implementation */ @@ -61,7 +61,7 @@ LPMALLOC16 currentMalloc16=NULL; typedef struct { /* IUnknown fields */ - IMalloc16Vtbl *lpVtbl; + const IMalloc16Vtbl *lpVtbl; DWORD ref; /* IMalloc16 fields */ } IMalloc16Impl; @@ -196,7 +196,7 @@ IMalloc16_Constructor() #undef VTENT msegvt16 = MapLS( &vt16 ); } - This->lpVtbl = (IMalloc16Vtbl*)msegvt16; + This->lpVtbl = (const IMalloc16Vtbl*)msegvt16; This->ref = 1; return (LPMALLOC16)MapLS( This ); } @@ -310,7 +310,7 @@ _xmalloc16(DWORD size, SEGPTR *ptr) { * everything we need. */ if (!K32WOWCallback16Ex( - (DWORD)((IMalloc16Vtbl*)MapSL( + (DWORD)((const IMalloc16Vtbl*)MapSL( (SEGPTR)((LPMALLOC16)MapSL((SEGPTR)mllc))->lpVtbl ) )->Alloc, WCB16_CDECL, diff --git a/dlls/ole32/oleobj.c b/dlls/ole32/oleobj.c index 2e75c571a6b..b6dd613f9fe 100644 --- a/dlls/ole32/oleobj.c +++ b/dlls/ole32/oleobj.c @@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); */ typedef struct OleAdviseHolderImpl { - IOleAdviseHolderVtbl *lpVtbl; + const IOleAdviseHolderVtbl *lpVtbl; DWORD ref; @@ -306,7 +306,7 @@ OleAdviseHolderImpl_SendOnClose (LPOLEADVISEHOLDER iface) /************************************************************************** * OleAdviseHolderImpl_VTable */ -static struct IOleAdviseHolderVtbl oahvt = +static const IOleAdviseHolderVtbl oahvt = { OleAdviseHolderImpl_QueryInterface, OleAdviseHolderImpl_AddRef, @@ -355,7 +355,7 @@ typedef struct DataAdviseConnection { typedef struct DataAdviseHolder { - IDataAdviseHolderVtbl *lpVtbl; + const IDataAdviseHolderVtbl *lpVtbl; DWORD ref; DWORD maxCons; @@ -625,7 +625,7 @@ static HRESULT WINAPI DataAdviseHolder_SendOnDataChange( /************************************************************************** * DataAdviseHolderImpl_VTable */ -static struct IDataAdviseHolderVtbl DataAdviseHolderImpl_VTable = +static const IDataAdviseHolderVtbl DataAdviseHolderImpl_VTable = { DataAdviseHolder_QueryInterface, DataAdviseHolder_AddRef, diff --git a/dlls/ole32/oleproxy.c b/dlls/ole32/oleproxy.c index 3b716560c0e..400096fbc4e 100644 --- a/dlls/ole32/oleproxy.c +++ b/dlls/ole32/oleproxy.c @@ -87,7 +87,7 @@ const CLSID CLSID_PSFactoryBuffer = { 0x00000320, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, * COM will load the appropriate interface stubs and proxies as needed. */ typedef struct _CFStub { - IRpcStubBufferVtbl *lpvtbl; + const IRpcStubBufferVtbl *lpvtbl; DWORD ref; LPUNKNOWN pUnkServer; @@ -236,7 +236,7 @@ CFStub_DebugServerRelease(LPRPCSTUBBUFFER iface,void *pv) { FIXME("(%p), stub!\n",pv); } -static IRpcStubBufferVtbl cfstubvt = { +static const IRpcStubBufferVtbl cfstubvt = { CFStub_QueryInterface, CFStub_AddRef, CFStub_Release, @@ -420,14 +420,14 @@ static HRESULT WINAPI CFProxy_LockServer(LPCLASSFACTORY iface,BOOL fLock) { return S_OK; } -static IRpcProxyBufferVtbl pspbvtbl = { +static const IRpcProxyBufferVtbl pspbvtbl = { IRpcProxyBufferImpl_QueryInterface, IRpcProxyBufferImpl_AddRef, IRpcProxyBufferImpl_Release, IRpcProxyBufferImpl_Connect, IRpcProxyBufferImpl_Disconnect }; -static IClassFactoryVtbl cfproxyvt = { +static const IClassFactoryVtbl cfproxyvt = { CFProxy_QueryInterface, CFProxy_AddRef, CFProxy_Release, @@ -959,7 +959,7 @@ PSFacBuf_CreateStub( return E_FAIL; } -static IPSFactoryBufferVtbl psfacbufvtbl = { +static const IPSFactoryBufferVtbl psfacbufvtbl = { PSFacBuf_QueryInterface, PSFacBuf_AddRef, PSFacBuf_Release, @@ -968,7 +968,7 @@ static IPSFactoryBufferVtbl psfacbufvtbl = { }; /* This is the whole PSFactoryBuffer object, just the vtableptr */ -static IPSFactoryBufferVtbl *lppsfac = &psfacbufvtbl; +static const IPSFactoryBufferVtbl *lppsfac = &psfacbufvtbl; /*********************************************************************** * DllGetClassObject [OLE32.@] diff --git a/dlls/ole32/regsvr.c b/dlls/ole32/regsvr.c index 07918c77fdb..5daef8edaae 100644 --- a/dlls/ole32/regsvr.c +++ b/dlls/ole32/regsvr.c @@ -453,7 +453,7 @@ static struct regsvr_coclass const coclass_list[] = { #define INTERFACE_ENTRY(interface, base, clsid32, clsid16) { &IID_##interface, #interface, base, sizeof(interface##Vtbl)/sizeof(void*), clsid16, clsid32 } #define STD_INTERFACE_ENTRY(interface) INTERFACE_ENTRY(interface, NULL, &CLSID_PSFactoryBuffer, NULL) -static struct regsvr_interface const interface_list[] = { +static const struct regsvr_interface interface_list[] = { STD_INTERFACE_ENTRY(IUnknown), STD_INTERFACE_ENTRY(IClassFactory), STD_INTERFACE_ENTRY(IStorage), diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index f48c58e006b..af25e31ea2a 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -147,14 +147,14 @@ static HRESULT PropertyStorage_PropVariantCopy(PROPVARIANT *prop, static HRESULT PropertyStorage_StringCopy(LPCSTR src, LCID srcCP, LPSTR *dst, LCID targetCP); -static IPropertyStorageVtbl IPropertyStorage_Vtbl; +static const IPropertyStorageVtbl IPropertyStorage_Vtbl; /*********************************************************************** * Implementation of IPropertyStorage */ typedef struct tagPropertyStorage_impl { - IPropertyStorageVtbl *vtbl; + const IPropertyStorageVtbl *vtbl; DWORD ref; CRITICAL_SECTION cs; IStream *stm; @@ -2210,7 +2210,7 @@ static HRESULT WINAPI IPropertySetStorage_fnEnum( /*********************************************************************** * vtables */ -IPropertySetStorageVtbl IPropertySetStorage_Vtbl = +const IPropertySetStorageVtbl IPropertySetStorage_Vtbl = { IPropertySetStorage_fnQueryInterface, IPropertySetStorage_fnAddRef, @@ -2221,7 +2221,7 @@ IPropertySetStorageVtbl IPropertySetStorage_Vtbl = IPropertySetStorage_fnEnum }; -static IPropertyStorageVtbl IPropertyStorage_Vtbl = +static const IPropertyStorageVtbl IPropertyStorage_Vtbl = { IPropertyStorage_fnQueryInterface, IPropertyStorage_fnAddRef, diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c index 9fa28dae9c9..928028b2597 100644 --- a/dlls/ole32/stg_stream.c +++ b/dlls/ole32/stg_stream.c @@ -819,7 +819,7 @@ static HRESULT WINAPI StgStreamImpl_Clone( /* * Virtual function table for the StgStreamImpl class. */ -static IStreamVtbl StgStreamImpl_Vtbl = +static const IStreamVtbl StgStreamImpl_Vtbl = { StgStreamImpl_QueryInterface, StgStreamImpl_AddRef, diff --git a/dlls/ole32/storage.c b/dlls/ole32/storage.c index 0e0b4858e00..715c3e60d01 100644 --- a/dlls/ole32/storage.c +++ b/dlls/ole32/storage.c @@ -91,9 +91,9 @@ static const BYTE STORAGE_magic[8] ={0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1}; #define READ_HEADER STORAGE_get_big_block(hf,-1,(LPBYTE)&sth);assert(!memcmp(STORAGE_magic,sth.magic,sizeof(STORAGE_magic))); static IStorage16Vtbl stvt16; -static IStorage16Vtbl *segstvt16 = NULL; +static const IStorage16Vtbl *segstvt16 = NULL; static IStream16Vtbl strvt16; -static IStream16Vtbl *segstrvt16 = NULL; +static const IStream16Vtbl *segstrvt16 = NULL; /*ULONG WINAPI IStorage16_AddRef(LPSTORAGE16 this);*/ static void _create_istorage16(LPSTORAGE16 *stg); @@ -955,7 +955,7 @@ STORAGE_get_free_pps_entry(HANDLE hf) { typedef struct { /* IUnknown fields */ - IStream16Vtbl *lpVtbl; + const IStream16Vtbl *lpVtbl; DWORD ref; /* IStream16 fields */ SEGPTR thisptr; /* pointer to this struct as segmented */ @@ -1413,7 +1413,7 @@ static void _create_istream16(LPSTREAM16 *str) { VTENT(Stat); VTENT(Clone); #undef VTENT - segstrvt16 = (IStream16Vtbl*)MapLS( &strvt16 ); + segstrvt16 = (const IStream16Vtbl*)MapLS( &strvt16 ); } else { #define VTENT(xfn) strvt16.xfn = IStream16_fn##xfn; VTENT(QueryInterface); @@ -1449,7 +1449,7 @@ static void _create_istream16(LPSTREAM16 *str) { typedef struct { /* IUnknown fields */ - IStreamVtbl *lpVtbl; + const IStreamVtbl *lpVtbl; DWORD ref; /* IStream32 fields */ struct storage_pps_entry stde; @@ -1503,7 +1503,7 @@ ULONG WINAPI IStream_fnRelease(IStream* iface) { typedef struct { /* IUnknown fields */ - IStorage16Vtbl *lpVtbl; + const IStorage16Vtbl *lpVtbl; DWORD ref; /* IStorage16 fields */ SEGPTR thisptr; /* pointer to this struct as segmented */ @@ -1829,7 +1829,7 @@ static void _create_istorage16(LPSTORAGE16 *stg) { VTENT(SetStateBits) VTENT(Stat) #undef VTENT - segstvt16 = (IStorage16Vtbl*)MapLS( &stvt16 ); + segstvt16 = (const IStorage16Vtbl*)MapLS( &stvt16 ); } else { #define VTENT(xfn) stvt16.xfn = IStorage16_fn##xfn; VTENT(QueryInterface) @@ -1985,7 +1985,7 @@ HRESULT WINAPI StgIsStorageILockBytes16(SEGPTR plkbyt) args[5] = 0; if (!K32WOWCallback16Ex( - (DWORD)((ILockBytes16Vtbl*)MapSL( + (DWORD)((const ILockBytes16Vtbl*)MapSL( (SEGPTR)((LPLOCKBYTES16)MapSL(plkbyt))->lpVtbl) )->ReadAt, WCB16_PASCAL, diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 249c766e134..d6e1fedcfbd 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -157,7 +157,7 @@ static DWORD GetShareModeFromSTGM(DWORD stgm); static DWORD GetAccessModeFromSTGM(DWORD stgm); static DWORD GetCreationModeFromSTGM(DWORD stgm); -extern IPropertySetStorageVtbl IPropertySetStorage_Vtbl; +extern const IPropertySetStorageVtbl IPropertySetStorage_Vtbl; @@ -2178,7 +2178,7 @@ HRESULT WINAPI StorageImpl_SetStateBits( /* * Virtual function table for the IStorage32Impl class. */ -static IStorageVtbl Storage32Impl_Vtbl = +static const IStorageVtbl Storage32Impl_Vtbl = { StorageBaseImpl_QueryInterface, StorageBaseImpl_AddRef, @@ -3965,7 +3965,7 @@ ULONG IEnumSTATSTGImpl_PopSearchNode( /* * Virtual function table for the IEnumSTATSTGImpl class. */ -static IEnumSTATSTGVtbl IEnumSTATSTGImpl_Vtbl = +static const IEnumSTATSTGVtbl IEnumSTATSTGImpl_Vtbl = { IEnumSTATSTGImpl_QueryInterface, IEnumSTATSTGImpl_AddRef, @@ -4025,7 +4025,7 @@ IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct( /* * Virtual function table for the Storage32InternalImpl class. */ -static IStorageVtbl Storage32InternalImpl_Vtbl = +static const IStorageVtbl Storage32InternalImpl_Vtbl = { StorageBaseImpl_QueryInterface, StorageBaseImpl_AddRef, diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index 32d1dbc3ed5..4358a19b773 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -214,10 +214,10 @@ HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName */ struct StorageBaseImpl { - IStorageVtbl *lpVtbl; /* Needs to be the first item in the struct + const IStorageVtbl *lpVtbl; /* Needs to be the first item in the struct * since we want to cast this in a Storage32 pointer */ - IPropertySetStorageVtbl *pssVtbl; /* interface for adding a properties stream */ + const IPropertySetStorageVtbl *pssVtbl; /* interface for adding a properties stream */ /* * Reference count of this object @@ -427,7 +427,7 @@ HRESULT WINAPI StorageInternalImpl_Revert( */ struct IEnumSTATSTGImpl { - IEnumSTATSTGVtbl *lpVtbl; /* Needs to be the first item in the struct + const IEnumSTATSTGVtbl *lpVtbl; /* Needs to be the first item in the struct * since we want to cast this in an IEnumSTATSTG pointer */ ULONG ref; /* Reference count */ @@ -481,7 +481,7 @@ INT IEnumSTATSTGImpl_FindParentProperty( */ struct StgStreamImpl { - IStreamVtbl *lpVtbl; /* Needs to be the first item in the struct + const IStreamVtbl *lpVtbl; /* Needs to be the first item in the struct * since we want to cast this to an IStream pointer */ /* diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index 1b780ef5831..d154300329c 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -101,7 +101,7 @@ static ULONG WINAPI Test_IUnknown_Release(LPUNKNOWN iface) return 1; /* non-heap-based object */ } -static IUnknownVtbl TestUnknown_Vtbl = +static const IUnknownVtbl TestUnknown_Vtbl = { Test_IUnknown_QueryInterface, Test_IUnknown_AddRef, @@ -159,7 +159,7 @@ static HRESULT WINAPI Test_IClassFactory_LockServer( return S_OK; } -static IClassFactoryVtbl TestClassFactory_Vtbl = +static const IClassFactoryVtbl TestClassFactory_Vtbl = { Test_IClassFactory_QueryInterface, Test_IClassFactory_AddRef, @@ -1035,7 +1035,7 @@ static DWORD WINAPI MessageFilter_MessagePending( return PENDINGMSG_WAITNOPROCESS; } -static IMessageFilterVtbl MessageFilter_Vtbl = +static const IMessageFilterVtbl MessageFilter_Vtbl = { MessageFilter_QueryInterface, MessageFilter_AddRef, @@ -1217,7 +1217,7 @@ static HRESULT WINAPI TestRE_IClassFactory_CreateInstance( return S_FALSE; } -static IClassFactoryVtbl TestREClassFactory_Vtbl = +static const IClassFactoryVtbl TestREClassFactory_Vtbl = { Test_IClassFactory_QueryInterface, Test_IClassFactory_AddRef, @@ -1327,7 +1327,7 @@ static HRESULT WINAPI TestRE_IClassFactory_CreateInstance( return S_FALSE; } -static IClassFactoryVtbl TestREClassFactory_Vtbl = +static const IClassFactoryVtbl TestREClassFactory_Vtbl = { Test_IClassFactory_QueryInterface, Test_IClassFactory_AddRef, @@ -1453,7 +1453,7 @@ static HRESULT WINAPI TestOOP_IClassFactory_LockServer( return S_OK; } -static IClassFactoryVtbl TestClassFactoryOOP_Vtbl = +static const IClassFactoryVtbl TestClassFactoryOOP_Vtbl = { TestOOP_IClassFactory_QueryInterface, TestOOP_IClassFactory_AddRef, diff --git a/dlls/oleaut32/connpt.c b/dlls/oleaut32/connpt.c index b2afb6a872c..f13bd6784ff 100644 --- a/dlls/oleaut32/connpt.c +++ b/dlls/oleaut32/connpt.c @@ -48,7 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); */ typedef struct ConnectionPointImpl { - IConnectionPointVtbl *lpvtbl; + const IConnectionPointVtbl *lpvtbl; /* IUnknown of our main object*/ IUnknown *Obj; @@ -66,7 +66,7 @@ typedef struct ConnectionPointImpl { DWORD nSinks; } ConnectionPointImpl; -static IConnectionPointVtbl ConnectionPointImpl_VTable; +static const IConnectionPointVtbl ConnectionPointImpl_VTable; /************************************************************************ @@ -74,7 +74,7 @@ static IConnectionPointVtbl ConnectionPointImpl_VTable; */ typedef struct EnumConnectionsImpl { - IEnumConnectionsVtbl *lpvtbl; + const IEnumConnectionsVtbl *lpvtbl; DWORD ref; @@ -351,7 +351,7 @@ static HRESULT WINAPI ConnectionPointImpl_EnumConnections( return hr; } -static IConnectionPointVtbl ConnectionPointImpl_VTable = +static const IConnectionPointVtbl ConnectionPointImpl_VTable = { ConnectionPointImpl_QueryInterface, ConnectionPointImpl_AddRef, @@ -364,7 +364,7 @@ static IConnectionPointVtbl ConnectionPointImpl_VTable = }; -static IEnumConnectionsVtbl EnumConnectionsImpl_VTable; +static const IEnumConnectionsVtbl EnumConnectionsImpl_VTable; static ULONG WINAPI EnumConnectionsImpl_AddRef(IEnumConnections* iface); /************************************************************************ @@ -587,7 +587,7 @@ static HRESULT WINAPI EnumConnectionsImpl_Clone(IEnumConnections* iface, return S_OK; } -static IEnumConnectionsVtbl EnumConnectionsImpl_VTable = +static const IEnumConnectionsVtbl EnumConnectionsImpl_VTable = { EnumConnectionsImpl_QueryInterface, EnumConnectionsImpl_AddRef, diff --git a/dlls/oleaut32/dispatch.c b/dlls/oleaut32/dispatch.c index a2186c1c76e..fd9d7b2c4d9 100644 --- a/dlls/oleaut32/dispatch.c +++ b/dlls/oleaut32/dispatch.c @@ -214,7 +214,7 @@ HRESULT WINAPI CreateStdDispatch( typedef struct { - IDispatchVtbl *lpVtbl; + const IDispatchVtbl *lpVtbl; void * pvThis; ITypeInfo * pTypeInfo; ULONG ref; @@ -417,7 +417,7 @@ static HRESULT WINAPI StdDispatch_Invoke(LPDISPATCH iface, DISPID dispIdMember, return DispInvoke(This->pvThis, This->pTypeInfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } -static IDispatchVtbl StdDispatch_VTable = +static const IDispatchVtbl StdDispatch_VTable = { StdDispatch_QueryInterface, StdDispatch_AddRef, diff --git a/dlls/oleaut32/oaidl_p.c b/dlls/oleaut32/oaidl_p.c index 18109da829f..1102e1cfcdf 100644 --- a/dlls/oleaut32/oaidl_p.c +++ b/dlls/oleaut32/oaidl_p.c @@ -906,7 +906,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(7) _IDispatchProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(7) _IDispatchProxyVtbl = { { &IID_IDispatch }, { @@ -929,7 +929,7 @@ static const PRPC_STUB_FUNCTION IDispatch_table[] = IDispatch_RemoteInvoke_Stub }; -const CInterfaceStubVtbl _IDispatchStubVtbl = +static const CInterfaceStubVtbl _IDispatchStubVtbl = { { &IID_IDispatch, @@ -1447,7 +1447,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(7) _IEnumVARIANTProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(7) _IEnumVARIANTProxyVtbl = { { &IID_IEnumVARIANT }, { @@ -1470,7 +1470,7 @@ static const PRPC_STUB_FUNCTION IEnumVARIANT_table[] = IEnumVARIANT_Clone_Stub }; -const CInterfaceStubVtbl _IEnumVARIANTStubVtbl = +static const CInterfaceStubVtbl _IEnumVARIANTStubVtbl = { { &IID_IEnumVARIANT, @@ -2009,7 +2009,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(5) _ITypeCompProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(5) _ITypeCompProxyVtbl = { { &IID_ITypeComp }, { @@ -2028,7 +2028,7 @@ static const PRPC_STUB_FUNCTION ITypeComp_table[] = ITypeComp_RemoteBindType_Stub }; -const CInterfaceStubVtbl _ITypeCompStubVtbl = +static const CInterfaceStubVtbl _ITypeCompStubVtbl = { { &IID_ITypeComp, @@ -4804,7 +4804,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(22) _ITypeInfoProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(22) _ITypeInfoProxyVtbl = { { &IID_ITypeInfo }, { @@ -4857,7 +4857,7 @@ static const PRPC_STUB_FUNCTION ITypeInfo_table[] = ITypeInfo_LocalReleaseVarDesc_Stub }; -const CInterfaceStubVtbl _ITypeInfoStubVtbl = +static const CInterfaceStubVtbl _ITypeInfoStubVtbl = { { &IID_ITypeInfo, @@ -7141,7 +7141,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(37) _ITypeInfo2ProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(37) _ITypeInfo2ProxyVtbl = { { &IID_ITypeInfo2 }, { @@ -7224,7 +7224,7 @@ static const PRPC_STUB_FUNCTION ITypeInfo2_table[] = ITypeInfo2_GetAllImplTypeCustData_Stub }; -const CInterfaceStubVtbl _ITypeInfo2StubVtbl = +static const CInterfaceStubVtbl _ITypeInfo2StubVtbl = { { &IID_ITypeInfo2, @@ -8924,7 +8924,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(13) _ITypeLibProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(13) _ITypeLibProxyVtbl = { { &IID_ITypeLib }, { @@ -8959,7 +8959,7 @@ static const PRPC_STUB_FUNCTION ITypeLib_table[] = ITypeLib_LocalReleaseTLibAttr_Stub }; -const CInterfaceStubVtbl _ITypeLibStubVtbl = +static const CInterfaceStubVtbl _ITypeLibStubVtbl = { { &IID_ITypeLib, @@ -9631,7 +9631,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(17) _ITypeLib2ProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(17) _ITypeLib2ProxyVtbl = { { &IID_ITypeLib2 }, { @@ -10330,7 +10330,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(8) _IErrorInfoProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(8) _IErrorInfoProxyVtbl = { { &IID_IErrorInfo }, { @@ -10355,7 +10355,7 @@ static const PRPC_STUB_FUNCTION IErrorInfo_table[] = IErrorInfo_GetHelpContext_Stub }; -const CInterfaceStubVtbl _IErrorInfoStubVtbl = +static const CInterfaceStubVtbl _IErrorInfoStubVtbl = { { &IID_IErrorInfo, @@ -10926,7 +10926,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(8) _ICreateErrorInfoProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(8) _ICreateErrorInfoProxyVtbl = { { &IID_ICreateErrorInfo }, { @@ -10951,7 +10951,7 @@ static const PRPC_STUB_FUNCTION ICreateErrorInfo_table[] = ICreateErrorInfo_SetHelpContext_Stub }; -const CInterfaceStubVtbl _ICreateErrorInfoStubVtbl = +static const CInterfaceStubVtbl _ICreateErrorInfoStubVtbl = { { &IID_ICreateErrorInfo, @@ -11080,7 +11080,7 @@ NdrStubInitialize( } -const CINTERFACE_PROXY_VTABLE(4) _ISupportErrorInfoProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(4) _ISupportErrorInfoProxyVtbl = { { &IID_ISupportErrorInfo }, { @@ -11097,7 +11097,7 @@ static const PRPC_STUB_FUNCTION ISupportErrorInfo_table[] = ISupportErrorInfo_InterfaceSupportsErrorInfo_Stub }; -const CInterfaceStubVtbl _ISupportErrorInfoStubVtbl = +static const CInterfaceStubVtbl _ISupportErrorInfoStubVtbl = { { &IID_ISupportErrorInfo, @@ -11347,7 +11347,7 @@ static const MIDL_STUB_DESC Object_StubDesc = 0 /* Reserved5 */ }; -const CINTERFACE_PROXY_VTABLE(4) _ITypeFactoryProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(4) _ITypeFactoryProxyVtbl = { { &IID_ITypeFactory }, { @@ -11364,7 +11364,7 @@ static const PRPC_STUB_FUNCTION ITypeFactory_table[] = ITypeFactory_CreateFromTypeInfo_Stub }; -const CInterfaceStubVtbl _ITypeFactoryStubVtbl = +static const CInterfaceStubVtbl _ITypeFactoryStubVtbl = { { &IID_ITypeFactory, @@ -13702,39 +13702,39 @@ static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString = } }; -const CInterfaceProxyVtbl * _oaidl_ProxyVtblList[] = -{ - ( CInterfaceProxyVtbl *) &_IDispatchProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeInfoProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeLibProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeCompProxyVtbl, - ( CInterfaceProxyVtbl *) &_IEnumVARIANTProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeLib2ProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeInfo2ProxyVtbl, - ( CInterfaceProxyVtbl *) &_IErrorInfoProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeFactoryProxyVtbl, - ( CInterfaceProxyVtbl *) &_ICreateErrorInfoProxyVtbl, - ( CInterfaceProxyVtbl *) &_ISupportErrorInfoProxyVtbl, +static const CInterfaceProxyVtbl * _oaidl_ProxyVtblList[] = +{ + ( const CInterfaceProxyVtbl *) &_IDispatchProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeInfoProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeLibProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeCompProxyVtbl, + ( const CInterfaceProxyVtbl *) &_IEnumVARIANTProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeLib2ProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeInfo2ProxyVtbl, + ( const CInterfaceProxyVtbl *) &_IErrorInfoProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeFactoryProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ICreateErrorInfoProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ISupportErrorInfoProxyVtbl, 0 }; -const CInterfaceStubVtbl * _oaidl_StubVtblList[] = -{ - ( CInterfaceStubVtbl *) &_IDispatchStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeInfoStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeLibStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeCompStubVtbl, - ( CInterfaceStubVtbl *) &_IEnumVARIANTStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeLib2StubVtbl, - ( CInterfaceStubVtbl *) &_ITypeInfo2StubVtbl, - ( CInterfaceStubVtbl *) &_IErrorInfoStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeFactoryStubVtbl, - ( CInterfaceStubVtbl *) &_ICreateErrorInfoStubVtbl, - ( CInterfaceStubVtbl *) &_ISupportErrorInfoStubVtbl, +static const CInterfaceStubVtbl * _oaidl_StubVtblList[] = +{ + ( const CInterfaceStubVtbl *) &_IDispatchStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeInfoStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeLibStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeCompStubVtbl, + ( const CInterfaceStubVtbl *) &_IEnumVARIANTStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeLib2StubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeInfo2StubVtbl, + ( const CInterfaceStubVtbl *) &_IErrorInfoStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeFactoryStubVtbl, + ( const CInterfaceStubVtbl *) &_ICreateErrorInfoStubVtbl, + ( const CInterfaceStubVtbl *) &_ISupportErrorInfoStubVtbl, 0 }; -PCInterfaceName const _oaidl_InterfaceNamesList[] = +static const PCInterfaceName _oaidl_InterfaceNamesList[] = { "IDispatch", "ITypeInfo", @@ -13767,8 +13767,8 @@ int __stdcall _oaidl_IID_Lookup( const IID * pIID, int * pIndex ) const ExtendedProxyFileInfo oaidl_ProxyFileInfo = { - (PCInterfaceProxyVtblList *) & _oaidl_ProxyVtblList, - (PCInterfaceStubVtblList *) & _oaidl_StubVtblList, + (const PCInterfaceProxyVtblList *) & _oaidl_ProxyVtblList, + (const PCInterfaceStubVtblList *) & _oaidl_StubVtblList, (const PCInterfaceName * ) & _oaidl_InterfaceNamesList, 0, /* no delegation */ & _oaidl_IID_Lookup, diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c index eaceefe2d82..2e6395ac8eb 100644 --- a/dlls/oleaut32/olefont.c +++ b/dlls/oleaut32/olefont.c @@ -63,12 +63,12 @@ struct OLEFontImpl * The first two are supported by the first vtable, the next two are * supported by the second table and the last two have their own. */ - IFontVtbl* lpvtbl1; - IDispatchVtbl* lpvtbl2; - IPersistStreamVtbl* lpvtbl3; - IConnectionPointContainerVtbl* lpvtbl4; - IPersistPropertyBagVtbl* lpvtbl5; - IPersistStreamInitVtbl* lpvtbl6; + const IFontVtbl* lpvtbl1; + const IDispatchVtbl* lpvtbl2; + const IPersistStreamVtbl* lpvtbl3; + const IConnectionPointContainerVtbl* lpvtbl4; + const IPersistPropertyBagVtbl* lpvtbl5; + const IPersistStreamInitVtbl* lpvtbl6; /* * Reference count for that instance of the class. */ @@ -219,7 +219,7 @@ static HRESULT WINAPI OLEFontImpl_FindConnectionPoint( /* * Virtual function tables for the OLEFontImpl class. */ -static IFontVtbl OLEFontImpl_VTable = +static const IFontVtbl OLEFontImpl_VTable = { OLEFontImpl_QueryInterface, OLEFontImpl_AddRef, @@ -250,7 +250,7 @@ static IFontVtbl OLEFontImpl_VTable = OLEFontImpl_SetHdc }; -static IDispatchVtbl OLEFontImpl_IDispatch_VTable = +static const IDispatchVtbl OLEFontImpl_IDispatch_VTable = { OLEFontImpl_IDispatch_QueryInterface, OLEFontImpl_IDispatch_AddRef, @@ -261,7 +261,7 @@ static IDispatchVtbl OLEFontImpl_IDispatch_VTable = OLEFontImpl_Invoke }; -static IPersistStreamVtbl OLEFontImpl_IPersistStream_VTable = +static const IPersistStreamVtbl OLEFontImpl_IPersistStream_VTable = { OLEFontImpl_IPersistStream_QueryInterface, OLEFontImpl_IPersistStream_AddRef, @@ -273,7 +273,7 @@ static IPersistStreamVtbl OLEFontImpl_IPersistStream_VTable = OLEFontImpl_GetSizeMax }; -static IConnectionPointContainerVtbl +static const IConnectionPointContainerVtbl OLEFontImpl_IConnectionPointContainer_VTable = { OLEFontImpl_IConnectionPointContainer_QueryInterface, @@ -283,8 +283,9 @@ static IConnectionPointContainerVtbl OLEFontImpl_FindConnectionPoint }; -static IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable; -static IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable; +static const IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable; +static const IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable; + /****************************************************************************** * OleCreateFontIndirect [OLEAUT32.420] */ @@ -2002,7 +2003,7 @@ static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_Save( return E_FAIL; } -static IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable = +static const IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable = { OLEFontImpl_IPersistPropertyBag_QueryInterface, OLEFontImpl_IPersistPropertyBag_AddRef, @@ -2080,7 +2081,7 @@ static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_InitNew( return S_OK; } -static IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable = +static const IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable = { OLEFontImpl_IPersistStreamInit_QueryInterface, OLEFontImpl_IPersistStreamInit_AddRef, @@ -2100,7 +2101,7 @@ static IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable = typedef struct { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; } IClassFactoryImpl; @@ -2137,7 +2138,7 @@ static HRESULT WINAPI SFCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { return S_OK; } -static IClassFactoryVtbl SFCF_Vtbl = { +static const IClassFactoryVtbl SFCF_Vtbl = { SFCF_QueryInterface, SFCF_AddRef, SFCF_Release, diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index bfd735996d7..6d404037013 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -103,10 +103,10 @@ typedef struct OLEPictureImpl { * IPicture handles IUnknown */ - IPictureVtbl *lpvtbl1; - IDispatchVtbl *lpvtbl2; - IPersistStreamVtbl *lpvtbl3; - IConnectionPointContainerVtbl *lpvtbl4; + const IPictureVtbl *lpvtbl1; + const IDispatchVtbl *lpvtbl2; + const IPersistStreamVtbl *lpvtbl3; + const IConnectionPointContainerVtbl *lpvtbl4; /* Object reference count */ DWORD ref; @@ -156,10 +156,10 @@ typedef struct OLEPictureImpl { /* * Predeclare VTables. They get initialized at the end. */ -static IPictureVtbl OLEPictureImpl_VTable; -static IDispatchVtbl OLEPictureImpl_IDispatch_VTable; -static IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable; -static IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable; +static const IPictureVtbl OLEPictureImpl_VTable; +static const IDispatchVtbl OLEPictureImpl_IDispatch_VTable; +static const IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable; +static const IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable; /*********************************************************************** * Implementation of the OLEPictureImpl class. @@ -1937,7 +1937,7 @@ static HRESULT WINAPI OLEPictureImpl_Invoke( } -static IPictureVtbl OLEPictureImpl_VTable = +static const IPictureVtbl OLEPictureImpl_VTable = { OLEPictureImpl_QueryInterface, OLEPictureImpl_AddRef, @@ -1958,7 +1958,7 @@ static IPictureVtbl OLEPictureImpl_VTable = OLEPictureImpl_get_Attributes }; -static IDispatchVtbl OLEPictureImpl_IDispatch_VTable = +static const IDispatchVtbl OLEPictureImpl_IDispatch_VTable = { OLEPictureImpl_IDispatch_QueryInterface, OLEPictureImpl_IDispatch_AddRef, @@ -1969,7 +1969,7 @@ static IDispatchVtbl OLEPictureImpl_IDispatch_VTable = OLEPictureImpl_Invoke }; -static IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable = +static const IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable = { OLEPictureImpl_IPersistStream_QueryInterface, OLEPictureImpl_IPersistStream_AddRef, @@ -1981,7 +1981,7 @@ static IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable = OLEPictureImpl_GetSizeMax }; -static IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable = +static const IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable = { OLEPictureImpl_IConnectionPointContainer_QueryInterface, OLEPictureImpl_IConnectionPointContainer_AddRef, @@ -2209,7 +2209,7 @@ HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller, typedef struct { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; } IClassFactoryImpl; @@ -2247,7 +2247,7 @@ static HRESULT WINAPI SPCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { return S_OK; } -static IClassFactoryVtbl SPCF_Vtbl = { +static const IClassFactoryVtbl SPCF_Vtbl = { SPCF_QueryInterface, SPCF_AddRef, SPCF_Release, diff --git a/dlls/oleaut32/recinfo.c b/dlls/oleaut32/recinfo.c index d7851c1f509..2ed6667f281 100644 --- a/dlls/oleaut32/recinfo.c +++ b/dlls/oleaut32/recinfo.c @@ -41,7 +41,7 @@ typedef struct { } fieldstr; typedef struct { - IRecordInfoVtbl *lpVtbl; + const IRecordInfoVtbl *lpVtbl; ULONG ref; GUID guid; @@ -476,7 +476,7 @@ static HRESULT WINAPI IRecordInfoImpl_RecordDestroy(IRecordInfo *iface, PVOID pv return S_OK; } -static IRecordInfoVtbl IRecordInfoImplVtbl = { +static const IRecordInfoVtbl IRecordInfoImplVtbl = { IRecordInfoImpl_QueryInterface, IRecordInfoImpl_AddRef, IRecordInfoImpl_Release, diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index 732fbe2a366..fe7a35a1998 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -77,13 +77,13 @@ BOOL HAVE_OLEAUT32_INT_PTR; */ typedef struct IRecordInfoImpl { - IRecordInfoVtbl *lpvtbl; + const IRecordInfoVtbl *lpvtbl; DWORD ref; DWORD sizeCalled; DWORD clearCalled; } IRecordInfoImpl; -static IRecordInfoVtbl IRecordInfoImpl_VTable; +static const IRecordInfoVtbl IRecordInfoImpl_VTable; static IRecordInfoImpl *IRecordInfoImpl_Construct() { @@ -137,7 +137,7 @@ static HRESULT CALLBACK IRecordInfoImpl_Dummy(IRecordInfo *iface) exit(255); } -static IRecordInfoVtbl IRecordInfoImpl_VTable = +static const IRecordInfoVtbl IRecordInfoImpl_VTable = { (PVOID)IRecordInfoImpl_Dummy, IRecordInfoImpl_AddRef, @@ -1066,14 +1066,14 @@ static ULONG WINAPI tunk_Release(LPUNKNOWN punk) { return --tunk_xref; } -static IUnknownVtbl xtunk_vtbl = { +static const IUnknownVtbl xtunk_vtbl = { tunk_QueryInterface, tunk_AddRef, tunk_Release }; static struct xtunk_iface { - IUnknownVtbl *lpvtbl; + const IUnknownVtbl *lpvtbl; } xtunk_iface; diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 32a6ce9d017..66c50d06eb8 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -516,7 +516,7 @@ typedef struct tagINTERNAL_BSTR typedef struct { - IDispatchVtbl *lpVtbl; + const IDispatchVtbl *lpVtbl; ULONG ref; VARTYPE vt; BOOL bFailInvoke; @@ -583,7 +583,7 @@ static HRESULT WINAPI DummyDispatch_Invoke(LPDISPATCH iface, return S_OK; } -static IDispatchVtbl DummyDispatch_VTable = +static const IDispatchVtbl DummyDispatch_VTable = { DummyDispatch_QueryInterface, DummyDispatch_AddRef, diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index fbd6419fb0b..7a94fad3970 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -355,8 +355,8 @@ typedef struct _TMAsmProxy { #endif typedef struct _TMProxyImpl { - LPVOID *lpvtbl; - IRpcProxyBufferVtbl *lpvtbl2; + LPVOID *lpvtbl; + const IRpcProxyBufferVtbl *lpvtbl2; ULONG ref; TMAsmProxy *asmstubs; @@ -443,7 +443,7 @@ TMProxyImpl_Disconnect(LPRPCPROXYBUFFER iface) } -static IRpcProxyBufferVtbl tmproxyvtable = { +static const IRpcProxyBufferVtbl tmproxyvtable = { TMProxyImpl_QueryInterface, TMProxyImpl_AddRef, TMProxyImpl_Release, @@ -1903,7 +1903,7 @@ PSFacBuf_CreateProxy( } typedef struct _TMStubImpl { - IRpcStubBufferVtbl *lpvtbl; + const IRpcStubBufferVtbl *lpvtbl; ULONG ref; LPUNKNOWN pUnk; @@ -2218,7 +2218,7 @@ TMStubImpl_DebugServerRelease(LPRPCSTUBBUFFER iface, LPVOID ppv) { return; } -IRpcStubBufferVtbl tmstubvtbl = { +static const IRpcStubBufferVtbl tmstubvtbl = { TMStubImpl_QueryInterface, TMStubImpl_AddRef, TMStubImpl_Release, @@ -2261,7 +2261,7 @@ PSFacBuf_CreateStub( return hres; } -static IPSFactoryBufferVtbl psfacbufvtbl = { +static const IPSFactoryBufferVtbl psfacbufvtbl = { PSFacBuf_QueryInterface, PSFacBuf_AddRef, PSFacBuf_Release, @@ -2270,7 +2270,7 @@ static IPSFactoryBufferVtbl psfacbufvtbl = { }; /* This is the whole PSFactoryBuffer object, just the vtableptr */ -static IPSFactoryBufferVtbl *lppsfac = &psfacbufvtbl; +static const IPSFactoryBufferVtbl *lppsfac = &psfacbufvtbl; /*********************************************************************** * DllGetClassObject [OLE32.63] diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 907bd4f47fe..31f4cd42b65 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -861,8 +861,8 @@ typedef struct tagTLBImpLib /* internal ITypeLib data */ typedef struct tagITypeLibImpl { - ITypeLib2Vtbl *lpVtbl; - ITypeCompVtbl *lpVtblTypeComp; + const ITypeLib2Vtbl *lpVtbl; + const ITypeCompVtbl *lpVtblTypeComp; ULONG ref; TLIBATTR LibAttr; /* guid,lcid,syskind,version,flags */ @@ -889,8 +889,8 @@ typedef struct tagITypeLibImpl INT index; } ITypeLibImpl; -static struct ITypeLib2Vtbl tlbvt; -static struct ITypeCompVtbl tlbtcvt; +static const ITypeLib2Vtbl tlbvt; +static const ITypeCompVtbl tlbtcvt; #define _ITypeComp_Offset(impl) ((int)(&(((impl*)0)->lpVtblTypeComp))) #define ICOM_THIS_From_ITypeComp(impl, iface) impl* This = (impl*)(((char*)iface)-_ITypeComp_Offset(impl)) @@ -973,8 +973,8 @@ typedef struct tagTLBImplType /* internal TypeInfo data */ typedef struct tagITypeInfoImpl { - ITypeInfo2Vtbl *lpVtbl; - ITypeCompVtbl *lpVtblTypeComp; + const ITypeInfo2Vtbl *lpVtbl; + const ITypeCompVtbl *lpVtblTypeComp; ULONG ref; TYPEATTR TypeAttr ; /* _lots_ of type information. */ ITypeLibImpl * pTypeLib; /* back pointer to typelib */ @@ -1002,8 +1002,8 @@ typedef struct tagITypeInfoImpl struct tagITypeInfoImpl * next; } ITypeInfoImpl; -static struct ITypeInfo2Vtbl tinfvt; -static struct ITypeCompVtbl tcompvt; +static const ITypeInfo2Vtbl tinfvt; +static const ITypeCompVtbl tcompvt; static ITypeInfo2 * WINAPI ITypeInfo_Constructor(void); @@ -4008,7 +4008,7 @@ static HRESULT WINAPI ITypeLib2_fnGetAllCustData( return S_OK; } -static ITypeLib2Vtbl tlbvt = { +static const ITypeLib2Vtbl tlbvt = { ITypeLib2_fnQueryInterface, ITypeLib2_fnAddRef, ITypeLib2_fnRelease, @@ -4075,7 +4075,7 @@ static HRESULT WINAPI ITypeLibComp_fnBindType( return E_NOTIMPL; } -static ITypeCompVtbl tlbtcvt = +static const ITypeCompVtbl tlbtcvt = { ITypeLibComp_fnQueryInterface, @@ -5767,7 +5767,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllImplTypeCustData( return TYPE_E_ELEMENTNOTFOUND; } -static ITypeInfo2Vtbl tinfvt = +static const ITypeInfo2Vtbl tinfvt = { ITypeInfo_fnQueryInterface, @@ -5990,7 +5990,7 @@ static HRESULT WINAPI ITypeComp_fnBindType( return S_OK; } -static ITypeCompVtbl tcompvt = +static const ITypeCompVtbl tcompvt = { ITypeComp_fnQueryInterface, diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index cf34267d7f3..14d91126d39 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -145,8 +145,8 @@ typedef struct tagMSFT_ImpFile { typedef struct tagICreateTypeLib2Impl { - ICreateTypeLib2Vtbl *lpVtbl; - ITypeLib2Vtbl *lpVtblTypeLib2; + const ICreateTypeLib2Vtbl *lpVtbl; + const ITypeLib2Vtbl *lpVtblTypeLib2; ULONG ref; @@ -171,8 +171,8 @@ typedef struct tagICreateTypeLib2Impl typedef struct tagICreateTypeInfo2Impl { - ICreateTypeInfo2Vtbl *lpVtbl; - ITypeInfo2Vtbl *lpVtblTypeInfo2; + const ICreateTypeInfo2Vtbl *lpVtbl; + const ITypeInfo2Vtbl *lpVtblTypeInfo2; ULONG ref; @@ -2803,7 +2803,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllImplTypeCustData( /*================== ICreateTypeInfo2 & ITypeInfo2 VTABLEs And Creation ===================================*/ -static ICreateTypeInfo2Vtbl ctypeinfo2vt = +static const ICreateTypeInfo2Vtbl ctypeinfo2vt = { ICreateTypeInfo2_fnQueryInterface, @@ -2851,7 +2851,7 @@ static ICreateTypeInfo2Vtbl ctypeinfo2vt = ICreateTypeInfo2_fnSetName }; -static ITypeInfo2Vtbl typeinfo2vt = +static const ITypeInfo2Vtbl typeinfo2vt = { ITypeInfo2_fnQueryInterface, @@ -3761,7 +3761,7 @@ static HRESULT WINAPI ITypeLib2_fnGetAllCustData( /*================== ICreateTypeLib2 & ITypeLib2 VTABLEs And Creation ===================================*/ -static ICreateTypeLib2Vtbl ctypelib2vt = +static const ICreateTypeLib2Vtbl ctypelib2vt = { ICreateTypeLib2_fnQueryInterface, @@ -3785,7 +3785,7 @@ static ICreateTypeLib2Vtbl ctypelib2vt = ICreateTypeLib2_fnSetHelpStringDll }; -static ITypeLib2Vtbl typelib2vt = +static const ITypeLib2Vtbl typelib2vt = { ITypeLib2_fnQueryInterface, diff --git a/dlls/olecli/olecli16.c b/dlls/olecli/olecli16.c index 9af3b5e7aba..67ea695a303 100644 --- a/dlls/olecli/olecli16.c +++ b/dlls/olecli/olecli16.c @@ -189,7 +189,7 @@ typedef OLEOBJECTVTBL *LPOLEOBJECTVTBL; typedef struct _OLEOBJECT { - LPOLEOBJECTVTBL lpvtbl; + const OLEOBJECTVTBL *lpvtbl; } OLEOBJECT16; static LONG OLE_current_handle; diff --git a/dlls/olecli/olecli_main.c b/dlls/olecli/olecli_main.c index 700844e7ec7..7847c6c9156 100644 --- a/dlls/olecli/olecli_main.c +++ b/dlls/olecli/olecli_main.c @@ -189,7 +189,7 @@ typedef OLEOBJECTVTBL *LPOLEOBJECTVTBL; typedef struct _OLEOBJECT { - LPOLEOBJECTVTBL lpvtbl; + const OLEOBJECTVTBL *lpvtbl; } OLEOBJECT; static LONG OLE_current_handle; diff --git a/dlls/olesvr/olesvr_main.c b/dlls/olesvr/olesvr_main.c index 723157c627a..cfaccf6a071 100644 --- a/dlls/olesvr/olesvr_main.c +++ b/dlls/olesvr/olesvr_main.c @@ -108,7 +108,7 @@ typedef struct _OLESERVERDOC *LPOLESERVERDOC; struct _OLESERVERDOCVTBL; typedef struct _OLESERVERDOC { - struct _OLESERVERDOCVTBL *lpvtbl; + const struct _OLESERVERDOCVTBL *lpvtbl; /* server provided state info */ } OLESERVERDOC; @@ -126,7 +126,7 @@ typedef struct _OLESERVERVTBL typedef struct _OLESERVER { - LPOLESERVERVTBL lpvtbl; + const OLESERVERVTBL *lpvtbl; /* server specific data */ } OLESERVER; diff --git a/dlls/qcap/qcap_main.c b/dlls/qcap/qcap_main.c index 44565a0d04a..ca641a386ff 100644 --- a/dlls/qcap/qcap_main.c +++ b/dlls/qcap/qcap_main.c @@ -294,7 +294,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, diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index a0c71a04448..6555aba9e3a 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -61,10 +61,10 @@ static HRESULT VfwPin_Construct( IBaseFilter *, LPCRITICAL_SECTION, IPin ** ); typedef struct VfwCapture { - const struct IBaseFilterVtbl * lpVtbl; - const struct IAMStreamConfigVtbl * IAMStreamConfig_vtbl; - const struct IAMVideoProcAmpVtbl * IAMVideoProcAmp_vtbl; - const struct IPersistPropertyBagVtbl * IPersistPropertyBag_vtbl; + const IBaseFilterVtbl * lpVtbl; + const IAMStreamConfigVtbl * IAMStreamConfig_vtbl; + const IAMVideoProcAmpVtbl * IAMVideoProcAmp_vtbl; + const IPersistPropertyBagVtbl * IPersistPropertyBag_vtbl; BOOL init; Capture *driver_info; @@ -81,7 +81,7 @@ typedef struct VfwPinImpl { OutputPin pin; Capture *driver_info; - IKsPropertySetVtbl * KSP_VT; + const IKsPropertySetVtbl * KSP_VT; } VfwPinImpl; @@ -722,7 +722,7 @@ KSP_QuerySupported( IKsPropertySet * iface, REFGUID guidPropSet, return E_NOTIMPL; } -static IKsPropertySetVtbl KSP_VTable = +static const IKsPropertySetVtbl KSP_VTable = { KSP_QueryInterface, KSP_AddRef, diff --git a/dlls/quartz/enummoniker.c b/dlls/quartz/enummoniker.c index 879d80a68bd..c0451ffa448 100644 --- a/dlls/quartz/enummoniker.c +++ b/dlls/quartz/enummoniker.c @@ -38,14 +38,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct EnumMonikerImpl { - IEnumMonikerVtbl *lpVtbl; + const IEnumMonikerVtbl *lpVtbl; ULONG ref; IMoniker ** ppMoniker; ULONG nMonikerCount; ULONG index; } EnumMonikerImpl; -static struct IEnumMonikerVtbl EnumMonikerImpl_Vtbl; +static const IEnumMonikerVtbl EnumMonikerImpl_Vtbl; static ULONG WINAPI EnumMonikerImpl_AddRef(LPENUMMONIKER iface); @@ -195,7 +195,7 @@ static HRESULT WINAPI EnumMonikerImpl_Clone(LPENUMMONIKER iface, IEnumMoniker ** /********************************************************************** * IEnumMoniker_Vtbl */ -static IEnumMonikerVtbl EnumMonikerImpl_Vtbl = +static const IEnumMonikerVtbl EnumMonikerImpl_Vtbl = { EnumMonikerImpl_QueryInterface, EnumMonikerImpl_AddRef, diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index d67b2897827..0020af989ea 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -39,8 +39,8 @@ static const WCHAR wszOutputPinName[] = { 'O','u','t','p','u','t',0 }; typedef struct AsyncReader { - const struct IBaseFilterVtbl * lpVtbl; - const struct IFileSourceFilterVtbl * lpVtblFSF; + const IBaseFilterVtbl * lpVtbl; + const IFileSourceFilterVtbl * lpVtblFSF; ULONG refCount; FILTER_INFO filterInfo; @@ -52,9 +52,9 @@ typedef struct AsyncReader AM_MEDIA_TYPE * pmt; } AsyncReader; -static const struct IBaseFilterVtbl AsyncReader_Vtbl; -static const struct IFileSourceFilterVtbl FileSource_Vtbl; -static const struct IAsyncReaderVtbl FileAsyncReader_Vtbl; +static const IBaseFilterVtbl AsyncReader_Vtbl; +static const IFileSourceFilterVtbl FileSource_Vtbl; +static const IAsyncReaderVtbl FileAsyncReader_Vtbl; static HRESULT FileAsyncReader_Construct(HANDLE hFile, IBaseFilter * pBaseFilter, LPCRITICAL_SECTION pCritSec, IPin ** ppPin); diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 67817403433..8add3fe6190 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -141,15 +141,15 @@ static int EventsQueue_GetEvent(EventsQueue* omr, Event* evt, long msTimeOut) } typedef struct _IFilterGraphImpl { - IGraphBuilderVtbl *IGraphBuilder_vtbl; - IMediaControlVtbl *IMediaControl_vtbl; - IMediaSeekingVtbl *IMediaSeeking_vtbl; - IBasicAudioVtbl *IBasicAudio_vtbl; - IBasicVideoVtbl *IBasicVideo_vtbl; - IVideoWindowVtbl *IVideoWindow_vtbl; - IMediaEventExVtbl *IMediaEventEx_vtbl; - IMediaFilterVtbl *IMediaFilter_vtbl; - IMediaEventSinkVtbl *IMediaEventSink_vtbl; + const IGraphBuilderVtbl *IGraphBuilder_vtbl; + const IMediaControlVtbl *IMediaControl_vtbl; + const IMediaSeekingVtbl *IMediaSeeking_vtbl; + const IBasicAudioVtbl *IBasicAudio_vtbl; + const IBasicVideoVtbl *IBasicVideo_vtbl; + const IVideoWindowVtbl *IVideoWindow_vtbl; + const IMediaEventExVtbl *IMediaEventEx_vtbl; + const IMediaFilterVtbl *IMediaFilter_vtbl; + const IMediaEventSinkVtbl *IMediaEventSink_vtbl; /* IAMGraphStreams */ /* IAMStats */ /* IBasicVideo2 */ @@ -1090,7 +1090,7 @@ static HRESULT WINAPI Graphbuilder_ShouldOperationContinue(IGraphBuilder *iface) } -static IGraphBuilderVtbl IGraphBuilder_VTable = +static const IGraphBuilderVtbl IGraphBuilder_VTable = { Graphbuilder_QueryInterface, Graphbuilder_AddRef, @@ -1411,7 +1411,7 @@ static HRESULT WINAPI Mediacontrol_StopWhenReady(IMediaControl *iface) { } -static IMediaControlVtbl IMediaControl_VTable = +static const IMediaControlVtbl IMediaControl_VTable = { Mediacontrol_QueryInterface, Mediacontrol_AddRef, @@ -1622,7 +1622,7 @@ static HRESULT WINAPI Mediaseeking_GetPreroll(IMediaSeeking *iface, } -static IMediaSeekingVtbl IMediaSeeking_VTable = +static const IMediaSeekingVtbl IMediaSeeking_VTable = { Mediaseeking_QueryInterface, Mediaseeking_AddRef, @@ -1760,7 +1760,7 @@ static HRESULT WINAPI Basicaudio_get_Balance(IBasicAudio *iface, return S_OK; } -static IBasicAudioVtbl IBasicAudio_VTable = +static const IBasicAudioVtbl IBasicAudio_VTable = { Basicaudio_QueryInterface, Basicaudio_AddRef, @@ -2155,7 +2155,7 @@ static HRESULT WINAPI Basicvideo_IsUsingDefaultDestination(IBasicVideo *iface) { } -static IBasicVideoVtbl IBasicVideo_VTable = +static const IBasicVideoVtbl IBasicVideo_VTable = { Basicvideo_QueryInterface, Basicvideo_AddRef, @@ -2643,7 +2643,7 @@ static HRESULT WINAPI Videowindow_IsCursorHidden(IVideoWindow *iface, } -static IVideoWindowVtbl IVideoWindow_VTable = +static const IVideoWindowVtbl IVideoWindow_VTable = { Videowindow_QueryInterface, Videowindow_AddRef, @@ -2910,7 +2910,7 @@ static HRESULT WINAPI Mediaevent_GetNotifyFlags(IMediaEventEx *iface, } -static IMediaEventExVtbl IMediaEventEx_VTable = +static const IMediaEventExVtbl IMediaEventEx_VTable = { Mediaevent_QueryInterface, Mediaevent_AddRef, @@ -3001,7 +3001,7 @@ static HRESULT WINAPI MediaFilter_GetSyncSource(IMediaFilter *iface, IReferenceC return E_NOTIMPL; } -static IMediaFilterVtbl IMediaFilter_VTable = +static const IMediaFilterVtbl IMediaFilter_VTable = { MediaFilter_QueryInterface, MediaFilter_AddRef, @@ -3083,7 +3083,7 @@ static HRESULT WINAPI MediaEventSink_Notify(IMediaEventSink *iface, long EventCo return S_OK; } -static IMediaEventSinkVtbl IMediaEventSink_VTable = +static const IMediaEventSinkVtbl IMediaEventSink_VTable = { MediaEventSink_QueryInterface, MediaEventSink_AddRef, diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c index 3d938e819f0..e248fdfd21a 100644 --- a/dlls/quartz/filtermapper.c +++ b/dlls/quartz/filtermapper.c @@ -44,13 +44,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct FilterMapper2Impl { - IFilterMapper2Vtbl *lpVtbl; - IFilterMapperVtbl *lpVtblFilterMapper; + const IFilterMapper2Vtbl *lpVtbl; + const IFilterMapperVtbl *lpVtblFilterMapper; ULONG refCount; } FilterMapper2Impl; -static struct IFilterMapper2Vtbl fm2vtbl; -static struct IFilterMapperVtbl fmvtbl; +static const IFilterMapper2Vtbl fm2vtbl; +static const IFilterMapperVtbl fmvtbl; #define _IFilterMapper_Offset ((int)(&(((FilterMapper2Impl*)0)->lpVtblFilterMapper))) #define ICOM_THIS_From_IFilterMapper(impl, iface) impl* This = (impl*)(((char*)iface)-_IFilterMapper_Offset) @@ -1036,7 +1036,7 @@ static HRESULT WINAPI FilterMapper2_EnumMatchingFilters( return hr; } -static IFilterMapper2Vtbl fm2vtbl = +static const IFilterMapper2Vtbl fm2vtbl = { FilterMapper2_QueryInterface, @@ -1522,7 +1522,7 @@ static HRESULT WINAPI FilterMapper_UnregisterPin(IFilterMapper * iface, CLSID Fi return hr; } -static IFilterMapperVtbl fmvtbl = +static const IFilterMapperVtbl fmvtbl = { FilterMapper_QueryInterface, diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 4c9b6c9558f..12be26acb72 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -136,7 +136,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, diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index 9f3d9ddcd08..d9d1bdf7de6 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -80,8 +80,8 @@ typedef struct StdMediaSample2 LONGLONG tMediaEnd; } StdMediaSample2; -static const struct IMemAllocatorVtbl BaseMemAllocator_VTable; -static const struct IMediaSample2Vtbl StdMediaSample2_VTable; +static const IMemAllocatorVtbl BaseMemAllocator_VTable; +static const IMediaSample2Vtbl StdMediaSample2_VTable; #define AM_SAMPLE2_PROP_SIZE_WRITABLE (unsigned int)(&((AM_SAMPLE2_PROPERTIES *)0)->pbBuffer) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 599baa9145f..aad7273dbbf 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -42,10 +42,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0}; -static const struct IBaseFilterVtbl Parser_Vtbl; -static const struct IMediaSeekingVtbl Parser_Seeking_Vtbl; -static const struct IPinVtbl Parser_OutputPin_Vtbl; -static const struct IPinVtbl Parser_InputPin_Vtbl; +static const IBaseFilterVtbl Parser_Vtbl; +static const IMediaSeekingVtbl Parser_Seeking_Vtbl; +static const IPinVtbl Parser_OutputPin_Vtbl; +static const IPinVtbl Parser_InputPin_Vtbl; static HRESULT Parser_OutputPin_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt); static HRESULT Parser_ChangeStart(LPVOID iface); diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index 9e4d25ec72d..54b816fe8b8 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -29,10 +29,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); -static const struct IPinVtbl InputPin_Vtbl; -static const struct IPinVtbl OutputPin_Vtbl; -static const struct IMemInputPinVtbl MemInputPin_Vtbl; -static const struct IPinVtbl PullPin_Vtbl; +static const IPinVtbl InputPin_Vtbl; +static const IPinVtbl OutputPin_Vtbl; +static const IMemInputPinVtbl MemInputPin_Vtbl; +static const IPinVtbl PullPin_Vtbl; #define ALIGNDOWN(value,boundary) ((value) & ~(boundary-1)) #define ALIGNUP(value,boundary) (ALIGNDOWN(value - 1, boundary) + boundary) diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 37dd286114d..5bc782325f0 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -39,7 +39,7 @@ struct SystemClockAdviseEntry { }; typedef struct SystemClockImpl { - IReferenceClockVtbl *lpVtbl; + const IReferenceClockVtbl *lpVtbl; ULONG ref; /** IReferenceClock */ @@ -192,8 +192,6 @@ static BOOL SystemClockPostMessageToAdviseThread(SystemClockImpl* This, UINT iMs return PostThreadMessageA(This->adviseThreadId, iMsg, 0, 0); } -IReferenceClockVtbl SystemClock_Vtbl; - static ULONG WINAPI SystemClockImpl_AddRef(IReferenceClock* iface) { SystemClockImpl *This = (SystemClockImpl *)iface; ULONG ref = InterlockedIncrement(&This->ref); @@ -355,7 +353,7 @@ out: return ret; } -IReferenceClockVtbl SystemClock_Vtbl = +static const IReferenceClockVtbl SystemClock_Vtbl = { SystemClockImpl_QueryInterface, SystemClockImpl_AddRef, diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index e3de4fb6752..25bba05eb93 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -46,15 +46,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0}; static const IBaseFilterVtbl VideoRenderer_Vtbl; -static IBasicVideoVtbl IBasicVideo_VTable; -static IVideoWindowVtbl IVideoWindow_VTable; +static const IBasicVideoVtbl IBasicVideo_VTable; +static const IVideoWindowVtbl IVideoWindow_VTable; static const IPinVtbl VideoRenderer_InputPin_Vtbl; typedef struct VideoRendererImpl { const IBaseFilterVtbl * lpVtbl; - IBasicVideoVtbl * IBasicVideo_vtbl; - IVideoWindowVtbl * IVideoWindow_vtbl; + const IBasicVideoVtbl * IBasicVideo_vtbl; + const IVideoWindowVtbl * IVideoWindow_vtbl; ULONG refCount; CRITICAL_SECTION csFilter; @@ -1058,7 +1058,7 @@ static HRESULT WINAPI Basicvideo_IsUsingDefaultDestination(IBasicVideo *iface) { } -static IBasicVideoVtbl IBasicVideo_VTable = +static const IBasicVideoVtbl IBasicVideo_VTable = { Basicvideo_QueryInterface, Basicvideo_AddRef, @@ -1545,7 +1545,7 @@ static HRESULT WINAPI Videowindow_IsCursorHidden(IVideoWindow *iface, return S_OK; } -static IVideoWindowVtbl IVideoWindow_VTable = +static const IVideoWindowVtbl IVideoWindow_VTable = { Videowindow_QueryInterface, Videowindow_AddRef, diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 21e50cb4a23..4f399a2067a 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit); typedef struct IRichEditOleImpl { - IRichEditOleVtbl *lpVtbl; + const IRichEditOleVtbl *lpVtbl; DWORD ref; } IRichEditOleImpl; @@ -228,7 +228,7 @@ IRichEditOle_fnSetLinkAvailable(IRichEditOle *me, LONG iob, BOOL fAvailable) return E_NOTIMPL; } -static IRichEditOleVtbl revt = { +static const IRichEditOleVtbl revt = { IRichEditOle_fnQueryInterface, IRichEditOle_fnAddRef, IRichEditOle_fnRelease, diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index af8709a22c5..301fdf989eb 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -43,7 +43,7 @@ struct StublessThunk; /* I don't know what MS's std proxy structure looks like, so this probably doesn't match, but that shouldn't matter */ typedef struct { - IRpcProxyBufferVtbl *lpVtbl; + const IRpcProxyBufferVtbl *lpVtbl; LPVOID *PVtbl; DWORD RefCount; const MIDL_STUBLESS_PROXY_INFO *stubless; @@ -55,7 +55,7 @@ typedef struct { struct StublessThunk *thunks; } StdProxyImpl; -static IRpcProxyBufferVtbl StdProxy_Vtbl; +static const IRpcProxyBufferVtbl StdProxy_Vtbl; #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field)) @@ -269,7 +269,7 @@ static VOID WINAPI StdProxy_Disconnect(LPRPCPROXYBUFFER iface) This->pChannel = NULL; } -static IRpcProxyBufferVtbl StdProxy_Vtbl = +static const IRpcProxyBufferVtbl StdProxy_Vtbl = { StdProxy_QueryInterface, StdProxy_AddRef, diff --git a/dlls/rpcrt4/cpsf.c b/dlls/rpcrt4/cpsf.c index 55af27c5790..5f342f3a5cf 100644 --- a/dlls/rpcrt4/cpsf.c +++ b/dlls/rpcrt4/cpsf.c @@ -116,7 +116,7 @@ static HRESULT WINAPI CStdPSFactory_CreateStub(LPPSFACTORYBUFFER iface, ProxyInfo->pStubVtblList[Index], iface, ppStub); } -static IPSFactoryBufferVtbl CStdPSFactory_Vtbl = +static const IPSFactoryBufferVtbl CStdPSFactory_Vtbl = { CStdPSFactory_QueryInterface, CStdPSFactory_AddRef, diff --git a/dlls/rpcrt4/ndr_ole.c b/dlls/rpcrt4/ndr_ole.c index cda3dc163c7..71690ac8d5e 100644 --- a/dlls/rpcrt4/ndr_ole.c +++ b/dlls/rpcrt4/ndr_ole.c @@ -79,7 +79,7 @@ static HMODULE LoadCOM(void) * (which also implements the MInterfacePointer structure) */ typedef struct RpcStreamImpl { - IStreamVtbl *lpVtbl; + const IStreamVtbl *lpVtbl; DWORD RefCount; PMIDL_STUB_MESSAGE pMsg; LPDWORD size; @@ -182,7 +182,7 @@ static HRESULT WINAPI RpcStream_SetSize(LPSTREAM iface, return S_OK; } -static IStreamVtbl RpcStream_Vtbl = +static const IStreamVtbl RpcStream_Vtbl = { RpcStream_QueryInterface, RpcStream_AddRef, diff --git a/dlls/shdocvw/classinfo.c b/dlls/shdocvw/classinfo.c index 13c954e1617..9a15dae40c1 100644 --- a/dlls/shdocvw/classinfo.c +++ b/dlls/shdocvw/classinfo.c @@ -72,7 +72,7 @@ static HRESULT WINAPI WBPCI_GetClassInfo(LPPROVIDECLASSINFO iface, LPTYPEINFO *p * IProvideClassInfo virtual function table for IE Web Browser component */ -static IProvideClassInfoVtbl WBPCI_Vtbl = +static const IProvideClassInfoVtbl WBPCI_Vtbl = { WBPCI_QueryInterface, WBPCI_AddRef, @@ -154,7 +154,7 @@ static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface, * IProvideClassInfo virtual function table for IE Web Browser component */ -static IProvideClassInfo2Vtbl WBPCI2_Vtbl = +static const IProvideClassInfo2Vtbl WBPCI2_Vtbl = { WBPCI2_QueryInterface, WBPCI2_AddRef, diff --git a/dlls/shdocvw/events.c b/dlls/shdocvw/events.c index 96ef64bb34d..5505763ec88 100644 --- a/dlls/shdocvw/events.c +++ b/dlls/shdocvw/events.c @@ -101,7 +101,7 @@ static HRESULT WINAPI WBCPC_FindConnectionPoint(LPCONNECTIONPOINTCONTAINER iface * IConnectionPointContainer virtual function table for IE Web Browser component */ -static IConnectionPointContainerVtbl WBCPC_Vtbl = +static const IConnectionPointContainerVtbl WBCPC_Vtbl = { WBCPC_QueryInterface, WBCPC_AddRef, @@ -193,7 +193,7 @@ static HRESULT WINAPI WBCP_EnumConnections(LPCONNECTIONPOINT iface, * IConnectionPoint virtual function table for IE Web Browser component */ -static IConnectionPointVtbl WBCP_Vtbl = +static const IConnectionPointVtbl WBCP_Vtbl = { WBCP_QueryInterface, WBCP_AddRef, @@ -205,4 +205,4 @@ static IConnectionPointVtbl WBCP_Vtbl = WBCP_EnumConnections }; -IConnectionPointImpl SHDOCVW_ConnectionPoint = {&WBCP_Vtbl}; +static IConnectionPointImpl SHDOCVW_ConnectionPoint = {&WBCP_Vtbl}; diff --git a/dlls/shdocvw/factory.c b/dlls/shdocvw/factory.c index afdf63f665f..44f48ff13a1 100644 --- a/dlls/shdocvw/factory.c +++ b/dlls/shdocvw/factory.c @@ -105,7 +105,7 @@ static HRESULT WINAPI WBCF_LockServer(LPCLASSFACTORY iface, BOOL dolock) return S_OK; } -static IClassFactoryVtbl WBCF_Vtbl = +static const IClassFactoryVtbl WBCF_Vtbl = { WBCF_QueryInterface, WBCF_AddRef, diff --git a/dlls/shdocvw/misc.c b/dlls/shdocvw/misc.c index 398a466c7de..1a4e23c44d1 100644 --- a/dlls/shdocvw/misc.c +++ b/dlls/shdocvw/misc.c @@ -78,7 +78,7 @@ static HRESULT WINAPI WBQA_GetContentExtent(LPQUICKACTIVATE iface, LPSIZEL pSize * IQuickActivate virtual function table for IE Web Browser component */ -static IQuickActivateVtbl WBQA_Vtbl = +static const IQuickActivateVtbl WBQA_Vtbl = { WBQA_QueryInterface, WBQA_AddRef, diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c index 8845b5ce277..05ed1f411fa 100644 --- a/dlls/shdocvw/oleobject.c +++ b/dlls/shdocvw/oleobject.c @@ -407,7 +407,7 @@ static HRESULT WINAPI WBOOBJ_SetColorScheme(LPOLEOBJECT iface, * IOleObject virtual function table for IE Web Browser component */ -static IOleObjectVtbl WBOOBJ_Vtbl = +static const IOleObjectVtbl WBOOBJ_Vtbl = { WBOOBJ_QueryInterface, WBOOBJ_AddRef, @@ -522,7 +522,7 @@ static HRESULT WINAPI WBOIPO_ReactivateAndUndo(LPOLEINPLACEOBJECT iface) * IOleInPlaceObject virtual function table for IE Web Browser component */ -static IOleInPlaceObjectVtbl WBOIPO_Vtbl = +static const IOleInPlaceObjectVtbl WBOIPO_Vtbl = { WBOIPO_QueryInterface, WBOIPO_AddRef, @@ -535,7 +535,7 @@ static IOleInPlaceObjectVtbl WBOIPO_Vtbl = WBOIPO_ReactivateAndUndo }; -IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject = {&WBOIPO_Vtbl}; +static IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject = {&WBOIPO_Vtbl}; /********************************************************************** @@ -594,7 +594,7 @@ static HRESULT WINAPI WBOC_FreezeEvents(LPOLECONTROL iface, BOOL bFreeze) * IOleControl virtual function table for IE Web Browser component */ -static IOleControlVtbl WBOC_Vtbl = +static const IOleControlVtbl WBOC_Vtbl = { WBOC_QueryInterface, WBOC_AddRef, @@ -605,4 +605,4 @@ static IOleControlVtbl WBOC_Vtbl = WBOC_FreezeEvents }; -IOleControlImpl SHDOCVW_OleControl = {&WBOC_Vtbl}; +static IOleControlImpl SHDOCVW_OleControl = {&WBOC_Vtbl}; diff --git a/dlls/shdocvw/persist.c b/dlls/shdocvw/persist.c index c07a914aed0..178efdee964 100644 --- a/dlls/shdocvw/persist.c +++ b/dlls/shdocvw/persist.c @@ -92,7 +92,7 @@ static HRESULT WINAPI WBPS_SaveCompleted(LPPERSISTSTORAGE iface, LPSTORAGE pStgN * IPersistStorage virtual function table for IE Web Browser component */ -static IPersistStorageVtbl WBPS_Vtbl = +static const IPersistStorageVtbl WBPS_Vtbl = { WBPS_QueryInterface, WBPS_AddRef, @@ -178,7 +178,7 @@ static HRESULT WINAPI WBPSI_InitNew(LPPERSISTSTREAMINIT iface) * IPersistStreamInit virtual function table for IE Web Browser component */ -static IPersistStreamInitVtbl WBPSI_Vtbl = +static const IPersistStreamInitVtbl WBPSI_Vtbl = { WBPSI_QueryInterface, WBPSI_AddRef, diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index 0c8ff470d43..1daca3e19e1 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -41,7 +41,7 @@ typedef struct { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; } IClassFactoryImpl; @@ -54,7 +54,7 @@ extern IClassFactoryImpl SHDOCVW_ClassFactory; typedef struct { /* IUnknown fields */ - IOleObjectVtbl *lpVtbl; + const IOleObjectVtbl *lpVtbl; DWORD ref; } IOleObjectImpl; @@ -67,7 +67,7 @@ extern IOleObjectImpl SHDOCVW_OleObject; typedef struct { /* IUnknown fields */ - IOleInPlaceObjectVtbl *lpVtbl; + const IOleInPlaceObjectVtbl *lpVtbl; DWORD ref; } IOleInPlaceObjectImpl; @@ -80,7 +80,7 @@ extern IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject; typedef struct { /* IUnknown fields */ - IOleControlVtbl *lpVtbl; + const IOleControlVtbl *lpVtbl; DWORD ref; } IOleControlImpl; @@ -93,7 +93,7 @@ extern IOleControlImpl SHDOCVW_OleControl; typedef struct { /* IUnknown fields */ - IWebBrowserVtbl *lpVtbl; + const IWebBrowserVtbl *lpVtbl; DWORD ref; } IWebBrowserImpl; @@ -106,7 +106,7 @@ extern IWebBrowserImpl SHDOCVW_WebBrowser; typedef struct { /* IUnknown fields */ - IProvideClassInfoVtbl *lpVtbl; + const IProvideClassInfoVtbl *lpVtbl; DWORD ref; } IProvideClassInfoImpl; @@ -119,7 +119,7 @@ extern IProvideClassInfoImpl SHDOCVW_ProvideClassInfo; typedef struct { /* IUnknown fields */ - IProvideClassInfo2Vtbl *lpVtbl; + const IProvideClassInfo2Vtbl *lpVtbl; DWORD ref; } IProvideClassInfo2Impl; @@ -132,7 +132,7 @@ extern IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2; typedef struct { /* IUnknown fields */ - IPersistStorageVtbl *lpVtbl; + const IPersistStorageVtbl *lpVtbl; DWORD ref; } IPersistStorageImpl; @@ -145,7 +145,7 @@ extern IPersistStorageImpl SHDOCVW_PersistStorage; typedef struct { /* IUnknown fields */ - IPersistStreamInitVtbl *lpVtbl; + const IPersistStreamInitVtbl *lpVtbl; DWORD ref; } IPersistStreamInitImpl; @@ -158,7 +158,7 @@ extern IPersistStreamInitImpl SHDOCVW_PersistStreamInit; typedef struct { /* IUnknown fields */ - IQuickActivateVtbl *lpVtbl; + const IQuickActivateVtbl *lpVtbl; DWORD ref; } IQuickActivateImpl; @@ -171,7 +171,7 @@ extern IQuickActivateImpl SHDOCVW_QuickActivate; typedef struct { /* IUnknown fields */ - IConnectionPointContainerVtbl *lpVtbl; + const IConnectionPointContainerVtbl *lpVtbl; DWORD ref; } IConnectionPointContainerImpl; @@ -184,7 +184,7 @@ extern IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer; typedef struct { /* IUnknown fields */ - IConnectionPointVtbl *lpVtbl; + const IConnectionPointVtbl *lpVtbl; DWORD ref; } IConnectionPointImpl; diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c index 03c4470e354..de0a60449da 100644 --- a/dlls/shdocvw/shdocvw_main.c +++ b/dlls/shdocvw/shdocvw_main.c @@ -151,7 +151,7 @@ HRESULT WINAPI DllCanUnloadNow(void) * SHDOCVW_TryDownloadMozillaControl */ typedef struct _IBindStatusCallbackImpl { - IBindStatusCallbackVtbl *vtbl; + const IBindStatusCallbackVtbl *vtbl; DWORD ref; HWND hDialog; BOOL *pbCancelled; @@ -275,7 +275,7 @@ dlOnObjectAvailable( IBindStatusCallback* iface, REFIID riid, IUnknown* punk) return S_OK; } -struct IBindStatusCallbackVtbl dlVtbl = +static const IBindStatusCallbackVtbl dlVtbl = { dlQueryInterface, dlAddRef, diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c index bcc8d84efd4..d750f10359a 100644 --- a/dlls/shdocvw/webbrowser.c +++ b/dlls/shdocvw/webbrowser.c @@ -239,7 +239,7 @@ static HRESULT WINAPI WB_get_Busy(IWebBrowser *iface, VARIANT_BOOL *pBool) * IWebBrowser virtual function table for IE Web Browser component */ -static IWebBrowserVtbl WB_Vtbl = +static const IWebBrowserVtbl WB_Vtbl = { WB_QueryInterface, WB_AddRef, diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c index 9d75ccf08d6..4926e3ad01f 100644 --- a/dlls/shell32/autocomplete.c +++ b/dlls/shell32/autocomplete.c @@ -62,8 +62,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); typedef struct { - IAutoCompleteVtbl *lpVtbl; - IAutoComplete2Vtbl *lpvtblAutoComplete2; + const IAutoCompleteVtbl *lpVtbl; + const IAutoComplete2Vtbl *lpvtblAutoComplete2; DWORD ref; BOOL enabled; HWND hwndEdit; @@ -76,8 +76,8 @@ typedef struct AUTOCOMPLETEOPTIONS options; } IAutoCompleteImpl; -static struct IAutoCompleteVtbl acvt; -static struct IAutoComplete2Vtbl ac2vt; +static const IAutoCompleteVtbl acvt; +static const IAutoComplete2Vtbl ac2vt; #define _IAutoComplete2_Offset ((int)(&(((IAutoCompleteImpl*)0)->lpvtblAutoComplete2))) #define _ICOM_THIS_From_IAutoComplete2(class, name) class* This = (class*)(((char*)name)-_IAutoComplete2_Offset); @@ -312,7 +312,7 @@ static HRESULT WINAPI IAutoComplete_fnInit( /************************************************************************** * IAutoComplete_fnVTable */ -static IAutoCompleteVtbl acvt = +static const IAutoCompleteVtbl acvt = { IAutoComplete_fnQueryInterface, IAutoComplete_fnAddRef, @@ -432,7 +432,7 @@ static HRESULT WINAPI IAutoComplete2_fnSetOptions( /************************************************************************** * IAutoComplete2_fnVTable */ -static IAutoComplete2Vtbl ac2vt = +static const IAutoComplete2Vtbl ac2vt = { IAutoComplete2_fnQueryInterface, IAutoComplete2_fnAddRef, diff --git a/dlls/shell32/cpanelfolder.c b/dlls/shell32/cpanelfolder.c index 90585686823..6f55c4c5788 100644 --- a/dlls/shell32/cpanelfolder.c +++ b/dlls/shell32/cpanelfolder.c @@ -58,11 +58,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); */ typedef struct { - IShellFolder2Vtbl *lpVtbl; + const IShellFolder2Vtbl *lpVtbl; DWORD ref; - IPersistFolder2Vtbl *lpVtblPersistFolder2; - IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; - IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; + const IPersistFolder2Vtbl *lpVtblPersistFolder2; + const IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; + const IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; IUnknown *pUnkOuter; /* used for aggregation */ @@ -71,10 +71,10 @@ typedef struct { int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ } ICPanelImpl; -static IShellFolder2Vtbl vt_ShellFolder2; -static IPersistFolder2Vtbl vt_PersistFolder2; -static IShellExecuteHookWVtbl vt_ShellExecuteHookW; -static IShellExecuteHookAVtbl vt_ShellExecuteHookA; +static const IShellFolder2Vtbl vt_ShellFolder2; +static const IPersistFolder2Vtbl vt_PersistFolder2; +static const IShellExecuteHookWVtbl vt_ShellExecuteHookW; +static const IShellExecuteHookAVtbl vt_ShellExecuteHookA; #define _IPersistFolder2_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblPersistFolder2))) #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); @@ -792,7 +792,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnMapColumnToSCID(IShellFolder2 * iface, return E_NOTIMPL; } -static IShellFolder2Vtbl vt_ShellFolder2 = +static const IShellFolder2Vtbl vt_ShellFolder2 = { ISF_ControlPanel_fnQueryInterface, @@ -898,7 +898,7 @@ static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * ifac return S_OK; } -static IPersistFolder2Vtbl vt_PersistFolder2 = +static const IPersistFolder2Vtbl vt_PersistFolder2 = { ICPanel_PersistFolder2_QueryInterface, @@ -1000,7 +1000,7 @@ static HRESULT WINAPI IShellExecuteHookW_fnExecute(IShellExecuteHookW* iface, LP return S_FALSE; } -static IShellExecuteHookWVtbl vt_ShellExecuteHookW = +static const IShellExecuteHookWVtbl vt_ShellExecuteHookW = { IShellExecuteHookW_fnQueryInterface, @@ -1079,7 +1079,7 @@ static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA* iface, LP return S_FALSE; } -static IShellExecuteHookAVtbl vt_ShellExecuteHookA = +static const IShellExecuteHookAVtbl vt_ShellExecuteHookA = { IShellExecuteHookA_fnQueryInterface, IShellExecuteHookA_fnAddRef, diff --git a/dlls/shell32/dataobject.c b/dlls/shell32/dataobject.c index d4d5b217917..c8d4c11eea2 100644 --- a/dlls/shell32/dataobject.c +++ b/dlls/shell32/dataobject.c @@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); typedef struct { /* IUnknown fields */ - IEnumFORMATETCVtbl *lpVtbl; + const IEnumFORMATETCVtbl *lpVtbl; DWORD ref; /* IEnumFORMATETC fields */ UINT posFmt; @@ -159,7 +159,7 @@ static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMAT return S_OK; } -static struct IEnumFORMATETCVtbl efvt = +static const IEnumFORMATETCVtbl efvt = { IEnumFORMATETC_fnQueryInterface, IEnumFORMATETC_fnAddRef, @@ -204,7 +204,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[]) typedef struct { /* IUnknown fields */ - IDataObjectVtbl *lpVtbl; + const IDataObjectVtbl *lpVtbl; DWORD ref; /* IDataObject fields */ @@ -408,7 +408,7 @@ static HRESULT WINAPI IDataObject_fnEnumDAdvise(LPDATAOBJECT iface, IEnumSTATDAT return E_NOTIMPL; } -static struct IDataObjectVtbl dtovt = +static const IDataObjectVtbl dtovt = { IDataObject_fnQueryInterface, IDataObject_fnAddRef, diff --git a/dlls/shell32/dragdrophelper.c b/dlls/shell32/dragdrophelper.c index f46823049b9..356bff29d46 100644 --- a/dlls/shell32/dragdrophelper.c +++ b/dlls/shell32/dragdrophelper.c @@ -48,11 +48,11 @@ WINE_DEFAULT_DEBUG_CHANNEL (shell); */ typedef struct { - IDropTargetHelperVtbl *lpVtbl; + const IDropTargetHelperVtbl *lpVtbl; DWORD ref; } IDropTargetHelperImpl; -static struct IDropTargetHelperVtbl vt_IDropTargetHelper; +static const IDropTargetHelperVtbl vt_IDropTargetHelper; #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) #define _IDropTargetHelper_(This) (IDropTargetHelper*)&(This->lpVtbl) @@ -175,7 +175,7 @@ static HRESULT WINAPI IDropTargetHelper_fnShow (IDropTargetHelper * iface, BOOL return E_NOTIMPL; } -static IDropTargetHelperVtbl vt_IDropTargetHelper = +static const IDropTargetHelperVtbl vt_IDropTargetHelper = { IDropTargetHelper_fnQueryInterface, IDropTargetHelper_fnAddRef, diff --git a/dlls/shell32/enumidlist.c b/dlls/shell32/enumidlist.c index 7e1cb064a3e..17cda2c7057 100644 --- a/dlls/shell32/enumidlist.c +++ b/dlls/shell32/enumidlist.c @@ -45,7 +45,7 @@ typedef struct tagENUMLIST typedef struct { - IEnumIDListVtbl *lpVtbl; + const IEnumIDListVtbl *lpVtbl; DWORD ref; LPENUMLIST mpFirst; LPENUMLIST mpLast; @@ -53,7 +53,7 @@ typedef struct } IEnumIDListImpl; -static struct IEnumIDListVtbl eidlvt; +static const IEnumIDListVtbl eidlvt; /************************************************************************** * AddToEnumList() @@ -367,7 +367,7 @@ static HRESULT WINAPI IEnumIDList_fnClone( /************************************************************************** * IEnumIDList_fnVTable */ -static IEnumIDListVtbl eidlvt = +static const IEnumIDListVtbl eidlvt = { IEnumIDList_fnQueryInterface, IEnumIDList_fnAddRef, diff --git a/dlls/shell32/folders.c b/dlls/shell32/folders.c index a928ef218d1..863930aa934 100644 --- a/dlls/shell32/folders.c +++ b/dlls/shell32/folders.c @@ -49,16 +49,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); */ typedef struct { - IExtractIconWVtbl *lpVtbl; + const IExtractIconWVtbl *lpVtbl; DWORD ref; - IPersistFileVtbl *lpvtblPersistFile; - IExtractIconAVtbl *lpvtblExtractIconA; + const IPersistFileVtbl *lpvtblPersistFile; + const IExtractIconAVtbl *lpvtblExtractIconA; LPITEMIDLIST pidl; } IExtractIconWImpl; -static struct IExtractIconAVtbl eiavt; -static struct IExtractIconWVtbl eivt; -static struct IPersistFileVtbl pfvt; +static const IExtractIconAVtbl eiavt; +static const IExtractIconWVtbl eivt; +static const IPersistFileVtbl pfvt; #define _IPersistFile_Offset ((int)(&(((IExtractIconWImpl*)0)->lpvtblPersistFile))) #define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((char*)name)-_IPersistFile_Offset); @@ -397,7 +397,7 @@ static HRESULT WINAPI IExtractIconW_fnExtract(IExtractIconW * iface, LPCWSTR psz return S_OK; } -static struct IExtractIconWVtbl eivt = +static const IExtractIconWVtbl eivt = { IExtractIconW_fnQueryInterface, IExtractIconW_fnAddRef, @@ -489,7 +489,7 @@ static HRESULT WINAPI IExtractIconA_fnExtract(IExtractIconA * iface, LPCSTR pszF return ret; } -static struct IExtractIconAVtbl eiavt = +static const IExtractIconAVtbl eiavt = { IExtractIconA_fnQueryInterface, IExtractIconA_fnAddRef, @@ -561,7 +561,7 @@ static HRESULT WINAPI IEIPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFi } -static struct IPersistFileVtbl pfvt = +static const IPersistFileVtbl pfvt = { IEIPersistFile_fnQueryInterface, IEIPersistFile_fnAddRef, diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index 375ffefda86..dc1eff3479f 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -112,21 +112,21 @@ typedef struct volume_info_t #include "poppack.h" -static IShellLinkAVtbl slvt; -static IShellLinkWVtbl slvtw; -static IPersistFileVtbl pfvt; -static IPersistStreamVtbl psvt; +static const IShellLinkAVtbl slvt; +static const IShellLinkWVtbl slvtw; +static const IPersistFileVtbl pfvt; +static const IPersistStreamVtbl psvt; /* IShellLink Implementation */ typedef struct { - IShellLinkAVtbl *lpVtbl; + const IShellLinkAVtbl *lpVtbl; DWORD ref; - IShellLinkWVtbl *lpvtblw; - IPersistFileVtbl *lpvtblPersistFile; - IPersistStreamVtbl *lpvtblPersistStream; + const IShellLinkWVtbl *lpvtblw; + const IPersistFileVtbl *lpvtblPersistFile; + const IPersistStreamVtbl *lpvtblPersistStream; /* data structures according to the informations in the link */ LPITEMIDLIST pPidl; @@ -328,7 +328,7 @@ static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *p return NOERROR; } -static IPersistFileVtbl pfvt = +static const IPersistFileVtbl pfvt = { IPersistFile_fnQueryInterface, IPersistFile_fnAddRef, @@ -1030,7 +1030,7 @@ static HRESULT WINAPI IPersistStream_fnGetSizeMax( return E_NOTIMPL; } -static IPersistStreamVtbl psvt = +static const IPersistStreamVtbl psvt = { IPersistStream_fnQueryInterface, IPersistStream_fnAddRef, @@ -1576,7 +1576,7 @@ static HRESULT WINAPI IShellLinkA_fnSetPath(IShellLinkA * iface, LPCSTR pszFile) * IShellLink Implementation */ -static IShellLinkAVtbl slvt = +static const IShellLinkAVtbl slvt = { IShellLinkA_fnQueryInterface, IShellLinkA_fnAddRef, @@ -2118,7 +2118,7 @@ static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile * IShellLinkW Implementation */ -static IShellLinkWVtbl slvtw = +static const IShellLinkWVtbl slvtw = { IShellLinkW_fnQueryInterface, IShellLinkW_fnAddRef, diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c index d9f390a776f..ae413a2ac23 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c @@ -278,11 +278,11 @@ DWORD WINAPI SHCLSIDFromStringAW (LPVOID clsid, CLSID *id) */ /* set the vtable later */ -static IMallocVtbl VT_Shell_IMalloc32; +static const IMallocVtbl VT_Shell_IMalloc32; /* this is the static object instance */ typedef struct { - IMallocVtbl *lpVtbl; + const IMallocVtbl *lpVtbl; DWORD dummy; } _ShellMalloc; @@ -386,7 +386,7 @@ static VOID WINAPI IShellMalloc_fnHeapMinimize(LPMALLOC iface) TRACE("()\n"); } -static IMallocVtbl VT_Shell_IMalloc32 = +static const IMallocVtbl VT_Shell_IMalloc32 = { IShellMalloc_fnQueryInterface, IShellMalloc_fnAddRefRelease, @@ -501,7 +501,7 @@ HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf) typedef struct { - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; CLSID *rclsid; LPFNCREATEINSTANCE lpfnCI; @@ -509,7 +509,7 @@ typedef struct ULONG * pcRefDll; /* pointer to refcounter in external dll (ugrrr...) */ } IDefClFImpl; -static IClassFactoryVtbl dclfvt; +static const IClassFactoryVtbl dclfvt; /************************************************************************** * IDefClF_fnConstructor @@ -616,7 +616,7 @@ static HRESULT WINAPI IDefClF_fnLockServer(LPCLASSFACTORY iface, BOOL fLock) return E_NOTIMPL; } -static IClassFactoryVtbl dclfvt = +static const IClassFactoryVtbl dclfvt = { IDefClF_fnQueryInterface, IDefClF_fnAddRef, diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c index 2169665f143..cd98dedce6b 100644 --- a/dlls/shell32/shfldr_desktop.c +++ b/dlls/shell32/shfldr_desktop.c @@ -60,7 +60,7 @@ WINE_DEFAULT_DEBUG_CHANNEL (shell); */ typedef struct { - IShellFolder2Vtbl *lpVtbl; + const IShellFolder2Vtbl *lpVtbl; DWORD ref; CLSID *pclsid; @@ -814,7 +814,7 @@ static HRESULT WINAPI ISF_Desktop_fnMapColumnToSCID ( return E_NOTIMPL; } -static IShellFolder2Vtbl vt_MCFldr_ShellFolder2 = +static const IShellFolder2Vtbl vt_MCFldr_ShellFolder2 = { ISF_Desktop_fnQueryInterface, ISF_Desktop_fnAddRef, diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index 029a50a7831..af3e7e4057b 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -60,12 +60,12 @@ WINE_DEFAULT_DEBUG_CHANNEL (shell); */ typedef struct { - IUnknownVtbl *lpVtbl; + const IUnknownVtbl *lpVtbl; DWORD ref; - IShellFolder2Vtbl *lpvtblShellFolder; - IPersistFolder3Vtbl *lpvtblPersistFolder3; - IDropTargetVtbl *lpvtblDropTarget; - ISFHelperVtbl *lpvtblSFHelper; + const IShellFolder2Vtbl *lpvtblShellFolder; + const IPersistFolder3Vtbl *lpvtblPersistFolder3; + const IDropTargetVtbl *lpvtblDropTarget; + const ISFHelperVtbl *lpvtblSFHelper; IUnknown *pUnkOuter; /* used for aggregation */ @@ -80,11 +80,11 @@ typedef struct { BOOL fAcceptFmt; /* flag for pending Drop */ } IGenericSFImpl; -static struct IUnknownVtbl unkvt; -static struct IShellFolder2Vtbl sfvt; -static struct IPersistFolder3Vtbl vt_FSFldr_PersistFolder3; /* IPersistFolder3 for a FS_Folder */ -static struct IDropTargetVtbl dtvt; -static struct ISFHelperVtbl shvt; +static const IUnknownVtbl unkvt; +static const IShellFolder2Vtbl sfvt; +static const IPersistFolder3Vtbl vt_FSFldr_PersistFolder3; /* IPersistFolder3 for a FS_Folder */ +static const IDropTargetVtbl dtvt; +static const ISFHelperVtbl shvt; #define _IShellFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblShellFolder))) #define _ICOM_THIS_From_IShellFolder2(class, name) class* This = (class*)(((char*)name)-_IShellFolder2_Offset); @@ -197,7 +197,7 @@ static ULONG WINAPI IUnknown_fnRelease (IUnknown * iface) return refCount; } -static IUnknownVtbl unkvt = +static const IUnknownVtbl unkvt = { IUnknown_fnQueryInterface, IUnknown_fnAddRef, @@ -980,7 +980,7 @@ IShellFolder_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, return E_NOTIMPL; } -static IShellFolder2Vtbl sfvt = +static const IShellFolder2Vtbl sfvt = { IShellFolder_fnQueryInterface, IShellFolder_fnAddRef, @@ -1232,7 +1232,7 @@ ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, return S_OK; } -static ISFHelperVtbl shvt = +static const ISFHelperVtbl shvt = { ISFHelper_fnQueryInterface, ISFHelper_fnAddRef, @@ -1420,7 +1420,7 @@ IFSFldr_PersistFolder3_GetFolderTargetInfo (IPersistFolder3 * iface, return E_NOTIMPL; } -static IPersistFolder3Vtbl vt_FSFldr_PersistFolder3 = +static const IPersistFolder3Vtbl vt_FSFldr_PersistFolder3 = { IFSFldr_PersistFolder3_QueryInterface, IFSFldr_PersistFolder3_AddRef, @@ -1542,7 +1542,7 @@ ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject, return E_NOTIMPL; } -static struct IDropTargetVtbl dtvt = { +static const IDropTargetVtbl dtvt = { ISFDropTarget_QueryInterface, ISFDropTarget_AddRef, ISFDropTarget_Release, diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index c7856a6e6d4..1181030b31f 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -55,16 +55,16 @@ WINE_DEFAULT_DEBUG_CHANNEL (shell); */ typedef struct { - IShellFolder2Vtbl *lpVtbl; + const IShellFolder2Vtbl *lpVtbl; DWORD ref; - IPersistFolder2Vtbl *lpVtblPersistFolder2; + const IPersistFolder2Vtbl *lpVtblPersistFolder2; /* both paths are parsible from the desktop */ LPITEMIDLIST pidlRoot; /* absolute pidl */ } IGenericSFImpl; -static struct IShellFolder2Vtbl vt_ShellFolder2; -static struct IPersistFolder2Vtbl vt_PersistFolder2; +static const IShellFolder2Vtbl vt_ShellFolder2; +static const IPersistFolder2Vtbl vt_PersistFolder2; #define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); @@ -84,7 +84,7 @@ static struct IPersistFolder2Vtbl vt_PersistFolder2; * IShellFolder [MyComputer] implementation */ -static shvheader MyComputerSFHeader[] = { +static const shvheader MyComputerSFHeader[] = { {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, {IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, @@ -822,7 +822,7 @@ static HRESULT WINAPI ISF_MyComputer_fnMapColumnToSCID ( return E_NOTIMPL; } -static IShellFolder2Vtbl vt_ShellFolder2 = +static const IShellFolder2Vtbl vt_ShellFolder2 = { ISF_MyComputer_fnQueryInterface, ISF_MyComputer_fnAddRef, @@ -930,7 +930,7 @@ static HRESULT WINAPI IMCFldr_PersistFolder2_GetCurFolder ( return S_OK; } -static IPersistFolder2Vtbl vt_PersistFolder2 = +static const IPersistFolder2Vtbl vt_PersistFolder2 = { IMCFldr_PersistFolder2_QueryInterface, IMCFldr_PersistFolder2_AddRef, diff --git a/dlls/shell32/shlfsbind.c b/dlls/shell32/shlfsbind.c index 17ff2301948..1660a587413 100644 --- a/dlls/shell32/shlfsbind.c +++ b/dlls/shell32/shlfsbind.c @@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(pidl); */ typedef struct { - IFileSystemBindDataVtbl *lpVtbl; + const IFileSystemBindDataVtbl *lpVtbl; DWORD ref; WIN32_FIND_DATAW findFile; } IFileSystemBindDataImpl; @@ -53,7 +53,7 @@ static ULONG WINAPI IFileSystemBindData_fnRelease(IFileSystemBindData *); static HRESULT WINAPI IFileSystemBindData_fnGetFindData(IFileSystemBindData *, WIN32_FIND_DATAW *); static HRESULT WINAPI IFileSystemBindData_fnSetFindData(IFileSystemBindData *, const WIN32_FIND_DATAW *); -static struct IFileSystemBindDataVtbl sbvt = +static const IFileSystemBindDataVtbl sbvt = { IFileSystemBindData_fnQueryInterface, IFileSystemBindData_fnAddRef, diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 0634a4ffc8f..03d731185b7 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -76,12 +76,12 @@ typedef struct typedef struct { - IShellViewVtbl* lpVtbl; + const IShellViewVtbl* lpVtbl; DWORD ref; - IOleCommandTargetVtbl* lpvtblOleCommandTarget; - IDropTargetVtbl* lpvtblDropTarget; - IDropSourceVtbl* lpvtblDropSource; - IViewObjectVtbl* lpvtblViewObject; + const IOleCommandTargetVtbl* lpvtblOleCommandTarget; + const IDropTargetVtbl* lpvtblDropTarget; + const IDropSourceVtbl* lpvtblDropSource; + const IViewObjectVtbl* lpvtblViewObject; IShellFolder* pSFParent; IShellFolder2* pSF2Parent; IShellBrowser* pShellBrowser; @@ -102,21 +102,20 @@ typedef struct IAdviseSink *pAdvSink; } IShellViewImpl; -static struct IShellViewVtbl svvt; - -static struct IOleCommandTargetVtbl ctvt; +static const IShellViewVtbl svvt; +static const IOleCommandTargetVtbl ctvt; #define _IOleCommandTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblOleCommandTarget))) #define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((char*)name)-_IOleCommandTarget_Offset); -static struct IDropTargetVtbl dtvt; +static const IDropTargetVtbl dtvt; #define _IDropTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropTarget))) #define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset); -static struct IDropSourceVtbl dsvt; +static const IDropSourceVtbl dsvt; #define _IDropSource_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropSource))) #define _ICOM_THIS_From_IDropSource(class, name) class* This = (class*)(((char*)name)-_IDropSource_Offset); -static struct IViewObjectVtbl vovt; +static const IViewObjectVtbl vovt; #define _IViewObject_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblViewObject))) #define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((char*)name)-_IViewObject_Offset); @@ -1992,7 +1991,7 @@ static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, return S_OK; } -static struct IShellViewVtbl svvt = +static const IShellViewVtbl svvt = { IShellView_fnQueryInterface, IShellView_fnAddRef, @@ -2104,7 +2103,7 @@ static HRESULT WINAPI ISVOleCmdTarget_Exec( return OLECMDERR_E_UNKNOWNGROUP; } -static IOleCommandTargetVtbl ctvt = +static const IOleCommandTargetVtbl ctvt = { ISVOleCmdTarget_QueryInterface, ISVOleCmdTarget_AddRef, @@ -2199,7 +2198,7 @@ static HRESULT WINAPI ISVDropTarget_Drop( return E_NOTIMPL; } -static struct IDropTargetVtbl dtvt = +static const IDropTargetVtbl dtvt = { ISVDropTarget_QueryInterface, ISVDropTarget_AddRef, @@ -2269,7 +2268,7 @@ static HRESULT WINAPI ISVDropSource_GiveFeedback( return DRAGDROP_S_USEDEFAULTCURSORS; } -static struct IDropSourceVtbl dsvt = +static const IDropSourceVtbl dsvt = { ISVDropSource_QueryInterface, ISVDropSource_AddRef, @@ -2418,7 +2417,7 @@ static HRESULT WINAPI ISVViewObject_GetAdvise( } -static struct IViewObjectVtbl vovt = +static const IViewObjectVtbl vovt = { ISVViewObject_QueryInterface, ISVViewObject_AddRef, diff --git a/dlls/shell32/shv_bg_cmenu.c b/dlls/shell32/shv_bg_cmenu.c index 2244626ab83..54dd9e8532e 100644 --- a/dlls/shell32/shv_bg_cmenu.c +++ b/dlls/shell32/shv_bg_cmenu.c @@ -43,14 +43,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); */ typedef struct { - IContextMenu2Vtbl *lpVtbl; + const IContextMenu2Vtbl *lpVtbl; IShellFolder* pSFParent; DWORD ref; BOOL bDesktop; } BgCmImpl; -static struct IContextMenu2Vtbl cmvt; +static const IContextMenu2Vtbl cmvt; /************************************************************************** * ISVBgCm_Constructor() @@ -445,7 +445,7 @@ static HRESULT WINAPI ISVBgCm_fnHandleMenuMsg( * IContextMenu2 VTable * */ -static struct IContextMenu2Vtbl cmvt = +static const IContextMenu2Vtbl cmvt = { ISVBgCm_fnQueryInterface, ISVBgCm_fnAddRef, diff --git a/dlls/shell32/shv_item_cmenu.c b/dlls/shell32/shv_item_cmenu.c index 2e7c42e34d0..c0bdf619344 100644 --- a/dlls/shell32/shv_item_cmenu.c +++ b/dlls/shell32/shv_item_cmenu.c @@ -43,7 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); * IContextMenu Implementation */ typedef struct -{ IContextMenu2Vtbl *lpVtbl; +{ const IContextMenu2Vtbl *lpVtbl; DWORD ref; IShellFolder* pSFParent; LPITEMIDLIST pidl; /* root pidl */ @@ -53,7 +53,7 @@ typedef struct } ItemCmImpl; -static struct IContextMenu2Vtbl cmvt; +static const IContextMenu2Vtbl cmvt; /************************************************************************** * ISvItemCm_CanRenameItems() @@ -520,7 +520,7 @@ static HRESULT WINAPI ISvItemCm_fnHandleMenuMsg( return E_NOTIMPL; } -static struct IContextMenu2Vtbl cmvt = +static const IContextMenu2Vtbl cmvt = { ISvItemCm_fnQueryInterface, ISvItemCm_fnAddRef, diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 3f44f7fc79a..3a2a503b13b 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -23,6 +23,9 @@ * FIXME: * - Need to verify on more systems. */ + +#define COBJMACROS + #include #include #include "windef.h" @@ -296,7 +299,7 @@ static void testSHGetFolderLocationInvalidArgs(void) "SHGetFolderLocation(NULL, 0xeeee, NULL, 0, &pidl)\n" "returned 0x%08lx, expected E_INVALIDARG\n", hr); if (SUCCEEDED(hr)) - pMalloc->lpVtbl->Free(pMalloc, pidl); + IMalloc_Free(pMalloc, pidl); /* check a bogus user token: */ pidl = NULL; hr = pSHGetFolderLocation(NULL, CSIDL_FAVORITES, (HANDLE)2, 0, &pidl); @@ -304,7 +307,7 @@ static void testSHGetFolderLocationInvalidArgs(void) "SHGetFolderLocation(NULL, CSIDL_FAVORITES, 2, 0, &pidl)\n" "returned 0x%08lx, expected E_FAIL\n", hr); if (SUCCEEDED(hr)) - pMalloc->lpVtbl->Free(pMalloc, pidl); + IMalloc_Free(pMalloc, pidl); /* check reserved is not zero: */ pidl = NULL; hr = pSHGetFolderLocation(NULL, CSIDL_DESKTOP, NULL, 1, &pidl); @@ -312,7 +315,7 @@ static void testSHGetFolderLocationInvalidArgs(void) "SHGetFolderLocation(NULL, CSIDL_DESKTOP, NULL, 1, &pidl)\n" "returned 0x%08lx, expected E_INVALIDARG\n", hr); if (SUCCEEDED(hr)) - pMalloc->lpVtbl->Free(pMalloc, pidl); + IMalloc_Free(pMalloc, pidl); /* a NULL pidl pointer crashes, so don't test it */ } @@ -409,7 +412,7 @@ static BYTE testSHGetFolderLocation(BOOL optional, int folder) getFolderName(folder)); if (pidlLast) ret = pidlLast->mkid.abID[0]; - pMalloc->lpVtbl->Free(pMalloc, pidl); + IMalloc_Free(pMalloc, pidl); } } return ret; @@ -443,7 +446,7 @@ static BYTE testSHGetSpecialFolderLocation(BOOL optional, int folder) "%s: ILFindLastID failed\n", getFolderName(folder)); if (pidlLast) ret = pidlLast->mkid.abID[0]; - pMalloc->lpVtbl->Free(pMalloc, pidl); + IMalloc_Free(pMalloc, pidl); } } return ret; @@ -561,7 +564,7 @@ static void matchGUID(int folder, const GUID *guid) "%s: got GUID %s, expected %s\n", getFolderName(folder), printGUID(shellGuid), printGUID(guid)); } - pMalloc->lpVtbl->Free(pMalloc, pidl); + IMalloc_Free(pMalloc, pidl); } } @@ -726,7 +729,7 @@ static void testNonExistentPath1(void) ok(hr == E_FAIL, "SHGetFolderLocation returned 0x%08lx, expected E_FAIL\n", hr); if (SUCCEEDED(hr) && pidl) - pMalloc->lpVtbl->Free(pMalloc, pidl); + IMalloc_Free(pMalloc, pidl); ok(!pSHGetSpecialFolderPathA(NULL, path, CSIDL_FAVORITES, FALSE), "SHGetSpecialFolderPath succeeded, expected failure\n"); pidl = NULL; @@ -734,7 +737,7 @@ static void testNonExistentPath1(void) ok(hr == E_FAIL, "SHGetFolderLocation returned 0x%08lx, expected E_FAIL\n", hr); if (SUCCEEDED(hr) && pidl) - pMalloc->lpVtbl->Free(pMalloc, pidl); + IMalloc_Free(pMalloc, pidl); /* now test success: */ hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, path); diff --git a/dlls/shlwapi/assoc.c b/dlls/shlwapi/assoc.c index 153f1d43e27..7394c20db1b 100644 --- a/dlls/shlwapi/assoc.c +++ b/dlls/shlwapi/assoc.c @@ -58,13 +58,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); typedef struct { - IQueryAssociationsVtbl *lpVtbl; + const IQueryAssociationsVtbl *lpVtbl; LONG ref; HKEY hkeySource; HKEY hkeyProgID; } IQueryAssociationsImpl; -static struct IQueryAssociationsVtbl IQueryAssociations_vtbl; +static const IQueryAssociationsVtbl IQueryAssociations_vtbl; /************************************************************************** * IQueryAssociations_Constructor [internal] @@ -693,7 +693,7 @@ static HRESULT WINAPI IQueryAssociations_fnGetEnum( return E_NOTIMPL; } -static struct IQueryAssociationsVtbl IQueryAssociations_vtbl = +static const IQueryAssociationsVtbl IQueryAssociations_vtbl = { IQueryAssociations_fnQueryInterface, IQueryAssociations_fnAddRef, diff --git a/dlls/shlwapi/istream.c b/dlls/shlwapi/istream.c index ff7114c57dc..a9bc17274e4 100644 --- a/dlls/shlwapi/istream.c +++ b/dlls/shlwapi/istream.c @@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); /* Layout of ISHFileStream object */ typedef struct { - IStreamVtbl *lpVtbl; + const IStreamVtbl *lpVtbl; ULONG ref; HANDLE hFile; DWORD dwMode; @@ -325,7 +325,7 @@ static HRESULT WINAPI IStream_fnClone(IStream *iface, IStream** ppstm) return E_NOTIMPL; } -static struct IStreamVtbl SHLWAPI_fsVTable = +static const IStreamVtbl SHLWAPI_fsVTable = { IStream_fnQueryInterface, IStream_fnAddRef, diff --git a/dlls/shlwapi/regstream.c b/dlls/shlwapi/regstream.c index e86590ebd20..c09a42d6560 100644 --- a/dlls/shlwapi/regstream.c +++ b/dlls/shlwapi/regstream.c @@ -35,7 +35,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); typedef struct -{ IStreamVtbl *lpVtbl; +{ + const IStreamVtbl *lpVtbl; DWORD ref; HKEY hKey; LPBYTE pbBuffer; @@ -255,7 +256,7 @@ static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm) return E_NOTIMPL; } -static struct IStreamVtbl rstvt = +static const IStreamVtbl rstvt = { IStream_fnQueryInterface, IStream_fnAddRef, @@ -305,7 +306,7 @@ static HRESULT WINAPI IStream_fnReadDummy(IStream *iface, LPVOID pv, ULONG cb, U return E_NOTIMPL; } -static struct IStreamVtbl DummyRegStreamVTable = +static const IStreamVtbl DummyRegStreamVTable = { IStream_fnQueryInterface, IStream_fnAddRefDummy, /* Overridden */ diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index 9bfe0a886ee..215d74cf5ff 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); */ typedef struct SecManagerImpl{ - IInternetSecurityManagerVtbl* lpvtbl1; /* VTable relative to the IInternetSecurityManager interface.*/ + const IInternetSecurityManagerVtbl* lpvtbl1; /* VTable relative to the IInternetSecurityManager interface.*/ ULONG ref; /* reference counter for this object */ @@ -174,7 +174,7 @@ static HRESULT WINAPI SecManagerImpl_GetZoneMappings(IInternetSecurityManager *i return E_NOTIMPL; } -static IInternetSecurityManagerVtbl VT_SecManagerImpl = +static const IInternetSecurityManagerVtbl VT_SecManagerImpl = { SecManagerImpl_QueryInterface, SecManagerImpl_AddRef, @@ -209,7 +209,7 @@ HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) * */ typedef struct { - IInternetZoneManagerVtbl* lpVtbl; + const IInternetZoneManagerVtbl* lpVtbl; ULONG ref; } ZoneMgrImpl; @@ -430,7 +430,7 @@ static HRESULT WINAPI ZoneMgrImpl_CopyTemplatePoliciesToZone(IInternetZoneManage /******************************************************************** * IInternetZoneManager_Construct */ -static IInternetZoneManagerVtbl ZoneMgrImplVtbl = { +static const IInternetZoneManagerVtbl ZoneMgrImplVtbl = { ZoneMgrImpl_QueryInterface, ZoneMgrImpl_AddRef, ZoneMgrImpl_Release, diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index 1b0ccb0acc6..f0ea2c00bc0 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -64,7 +64,7 @@ static void test_create() } typedef struct { - IBindStatusCallbackVtbl *lpVtbl; + const IBindStatusCallbackVtbl *lpVtbl; ULONG ref; IBinding *pbind; IStream *pstr; @@ -178,7 +178,7 @@ static HRESULT WINAPI statusclb_OnObjectAvailable(IBindStatusCallback *iface, RE return E_NOTIMPL; } -static IBindStatusCallbackVtbl statusclbVtbl = { +static const IBindStatusCallbackVtbl statusclbVtbl = { statusclb_QueryInterface, statusclb_AddRef, statusclb_Release, diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index 508d864efeb..249d85a8584 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c @@ -49,7 +49,7 @@ static const WCHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e', /*static BOOL registered_wndclass = FALSE;*/ typedef struct { - IBindingVtbl *lpVtbl; + const IBindingVtbl *lpVtbl; ULONG ref; @@ -273,7 +273,7 @@ static void Binding_FinishedDownload(Binding *This, HRESULT hr) This->pbscb = 0; } -static IBindingVtbl BindingVtbl = +static const IBindingVtbl BindingVtbl = { Binding_QueryInterface, Binding_AddRef, @@ -289,7 +289,7 @@ static IBindingVtbl BindingVtbl = /* filemoniker data structure */ typedef struct { - IMonikerVtbl* lpvtbl; /* VTable relative to the IMoniker interface.*/ + const IMonikerVtbl* lpvtbl; /* VTable relative to the IMoniker interface.*/ ULONG ref; /* reference counter for this object */ @@ -1103,7 +1103,7 @@ static HRESULT WINAPI URLMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdM /********************************************************************************/ /* Virtual function table for the URLMonikerImpl class which include IPersist,*/ /* IPersistStream and IMoniker functions. */ -static IMonikerVtbl VT_URLMonikerImpl = +static const IMonikerVtbl VT_URLMonikerImpl = { URLMonikerImpl_QueryInterface, URLMonikerImpl_AddRef, diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c index d584142ea13..af9023c1226 100644 --- a/dlls/urlmon/urlmon_main.c +++ b/dlls/urlmon/urlmon_main.c @@ -174,7 +174,7 @@ static HRESULT WINAPI CF_LockServer(LPCLASSFACTORY iface,BOOL dolock) return S_OK; } -static IClassFactoryVtbl CF_Vtbl = +static const IClassFactoryVtbl CF_Vtbl = { CF_QueryInterface, CF_AddRef, diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index 69c50af30c3..22a86d2f2a1 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -272,7 +272,7 @@ UINT WINAPI IWineD3DBaseTextureImpl_GetTextureDimensions(IWineD3DBaseTexture *if return D3D_OK; } -IWineD3DBaseTextureVtbl IWineD3DBaseTexture_Vtbl = +static const IWineD3DBaseTextureVtbl IWineD3DBaseTexture_Vtbl = { IWineD3DBaseTextureImpl_QueryInterface, IWineD3DBaseTextureImpl_AddRef, diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index a01dd99ee61..75088933684 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -269,7 +269,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_AddDirtyRect(IWineD3DCubeTexture *iface, } -IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl = +const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl = { /* IUnknown */ IWineD3DCubeTextureImpl_QueryInterface, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c1f92a99e68..bfe9b9b2385 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4371,7 +4371,7 @@ void WINAPI IWineD3DDeviceImpl_GetGammaRamp(IWineD3DDevice *iface, UINT iSwapCha * IWineD3DDevice VTbl follows **********************************************************/ -IWineD3DDeviceVtbl IWineD3DDevice_Vtbl = +const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl = { /*** IUnknown methods ***/ IWineD3DDeviceImpl_QueryInterface, diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index cacfd2f9782..764b1b9f9fe 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1781,7 +1781,7 @@ HRESULT WINAPI IWineD3DImpl_GetParent(IWineD3D *iface, IUnknown **pParent) { * IWineD3D VTbl follows **********************************************************/ -IWineD3DVtbl IWineD3D_Vtbl = +const IWineD3DVtbl IWineD3D_Vtbl = { IWineD3DImpl_QueryInterface, IWineD3DImpl_AddRef, diff --git a/dlls/wined3d/indexbuffer.c b/dlls/wined3d/indexbuffer.c index e27c35f7f51..e403b1770e7 100644 --- a/dlls/wined3d/indexbuffer.c +++ b/dlls/wined3d/indexbuffer.c @@ -126,7 +126,7 @@ HRESULT WINAPI IWineD3DIndexBufferImpl_GetDesc(IWineD3DIndexBuffer *ifac return D3D_OK; } -IWineD3DIndexBufferVtbl IWineD3DIndexBuffer_Vtbl = +const IWineD3DIndexBufferVtbl IWineD3DIndexBuffer_Vtbl = { IWineD3DIndexBufferImpl_QueryInterface, IWineD3DIndexBufferImpl_AddRef, diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index 981952988a7..be998f25039 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -321,7 +321,7 @@ HRESULT WINAPI IWineD3DQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags * IWineD3DQuery VTbl follows **********************************************************/ -IWineD3DQueryVtbl IWineD3DQuery_Vtbl = +const IWineD3DQueryVtbl IWineD3DQuery_Vtbl = { /*** IUnknown methods ***/ IWineD3DQueryImpl_QueryInterface, diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index ac468028247..8a6ac4a03c9 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -122,7 +122,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetParent(IWineD3DResource *iface, IUnknown } -IWineD3DResourceVtbl IWineD3DResource_Vtbl = +static const IWineD3DResourceVtbl IWineD3DResource_Vtbl = { IWineD3DResourceImpl_QueryInterface, IWineD3DResourceImpl_AddRef, diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index f18bdc92e0d..a0a1c61b0d8 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -297,7 +297,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStateBlock* * IWineD3DStateBlock VTbl follows **********************************************************/ -IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl = +const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl = { IWineD3DStateBlockImpl_QueryInterface, IWineD3DStateBlockImpl_AddRef, diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 822982047ee..9b9a2c5bc85 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -846,7 +846,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetPBufferState(IWineD3DSurface *iface, BOOL return D3D_OK; } -IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = +const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = { /* IUnknown */ IWineD3DSurfaceImpl_QueryInterface, diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index abc2584b925..00b26567454 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -249,7 +249,7 @@ HRESULT WINAPI IWineD3DTextureImpl_AddDirtyRect(IWineD3DTexture *iface, CONST RE return IWineD3DSurface_AddDirtyRect((IWineD3DSurface *)This->surfaces[0], pDirtyRect); } -IWineD3DTextureVtbl IWineD3DTexture_Vtbl = +const IWineD3DTextureVtbl IWineD3DTexture_Vtbl = { /* IUnknown */ IWineD3DTextureImpl_QueryInterface, diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c index d8d8d8ec40c..b6b939b961d 100644 --- a/dlls/wined3d/vertexbuffer.c +++ b/dlls/wined3d/vertexbuffer.c @@ -128,7 +128,7 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_GetDesc(IWineD3DVertexBuffer *if return D3D_OK; } -IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl = +const IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl = { IWineD3DVertexBufferImpl_QueryInterface, IWineD3DVertexBufferImpl_AddRef, diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index 4f64e20c9c0..ac33be84daa 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -827,7 +827,7 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration(IWineD3DVertexDeclar return IWineD3DVertexDeclarationImpl_GetDeclaration9(iface, (D3DVERTEXELEMENT9*) pData, pSize); } -IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl = +const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl = { IWineD3DVertexDeclarationImpl_QueryInterface, IWineD3DVertexDeclarationImpl_AddRef, diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c index f507ccdefa0..999bbc5d6d3 100644 --- a/dlls/wined3d/vertexshader.c +++ b/dlls/wined3d/vertexshader.c @@ -924,7 +924,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetFunction(IWineD3DVertexShader* impl, -IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl = +const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl = { /*** IUnknown methods ***/ IWineD3DVertexShaderImpl_QueryInterface, diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 414ee94ec2e..1de6515db22 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -270,7 +270,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, GLenum gl_l } -IWineD3DVolumeVtbl IWineD3DVolume_Vtbl = +const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl = { /* IUnknown */ IWineD3DVolumeImpl_QueryInterface, diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 4f1155d043d..5fafefb5e28 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -248,7 +248,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_AddDirtyBox(IWineD3DVolumeTexture *ifac return IWineD3DVolume_AddDirtyBox((IWineD3DVolume *) This->volumes[0], pDirtyBox); } -IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl = +const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl = { /* IUnknown */ IWineD3DVolumeTextureImpl_QueryInterface, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 589cc0ec65d..e9ced68ee6f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -311,7 +311,7 @@ struct PLIGHTINFOEL { typedef struct IWineD3DImpl { /* IUnknown fields */ - IWineD3DVtbl *lpVtbl; + const IWineD3DVtbl *lpVtbl; DWORD ref; /* Note: Ref counting not required */ /* WineD3D Information */ @@ -323,7 +323,7 @@ typedef struct IWineD3DImpl WineD3D_GL_Info gl_info; } IWineD3DImpl; -extern IWineD3DVtbl IWineD3D_Vtbl; +extern const IWineD3DVtbl IWineD3D_Vtbl; /***************************************************************************** * IWineD3DDevice implementation structure @@ -331,7 +331,7 @@ extern IWineD3DVtbl IWineD3D_Vtbl; typedef struct IWineD3DDeviceImpl { /* IUnknown fields */ - IWineD3DDeviceVtbl *lpVtbl; + const IWineD3DDeviceVtbl *lpVtbl; DWORD ref; /* Note: Ref counting not required */ /* WineD3D Information */ @@ -406,7 +406,7 @@ typedef struct IWineD3DDeviceImpl } IWineD3DDeviceImpl; -extern IWineD3DDeviceVtbl IWineD3DDevice_Vtbl; +extern const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl; /***************************************************************************** * IWineD3DResource implementation structure @@ -431,11 +431,11 @@ typedef struct IWineD3DResourceClass typedef struct IWineD3DResourceImpl { /* IUnknown & WineD3DResource Information */ - IWineD3DResourceVtbl *lpVtbl; + const IWineD3DResourceVtbl *lpVtbl; IWineD3DResourceClass resource; } IWineD3DResourceImpl; -extern IWineD3DResourceVtbl IWineD3DResource_Vtbl; +extern const IWineD3DResourceVtbl IWineD3DResource_Vtbl; /***************************************************************************** * IWineD3DVertexBuffer implementation structure (extends IWineD3DResourceImpl) @@ -443,7 +443,7 @@ extern IWineD3DResourceVtbl IWineD3DResource_Vtbl; typedef struct IWineD3DVertexBufferImpl { /* IUnknown & WineD3DResource Information */ - IWineD3DVertexBufferVtbl *lpVtbl; + const IWineD3DVertexBufferVtbl *lpVtbl; IWineD3DResourceClass resource; /* WineD3DVertexBuffer specifics */ @@ -451,7 +451,7 @@ typedef struct IWineD3DVertexBufferImpl } IWineD3DVertexBufferImpl; -extern IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl; +extern const IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl; /***************************************************************************** @@ -460,13 +460,13 @@ extern IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl; typedef struct IWineD3DIndexBufferImpl { /* IUnknown & WineD3DResource Information */ - IWineD3DIndexBufferVtbl *lpVtbl; + const IWineD3DIndexBufferVtbl *lpVtbl; IWineD3DResourceClass resource; /* WineD3DVertexBuffer specifics */ } IWineD3DIndexBufferImpl; -extern IWineD3DIndexBufferVtbl IWineD3DIndexBuffer_Vtbl; +extern const IWineD3DIndexBufferVtbl IWineD3DIndexBuffer_Vtbl; /***************************************************************************** * IWineD3DBaseTexture implementation structure (extends IWineD3DResourceImpl) @@ -486,13 +486,13 @@ typedef struct IWineD3DBaseTextureClass typedef struct IWineD3DBaseTextureImpl { /* IUnknown & WineD3DResource Information */ - IWineD3DBaseTextureVtbl *lpVtbl; + const IWineD3DBaseTextureVtbl *lpVtbl; IWineD3DResourceClass resource; IWineD3DBaseTextureClass baseTexture; } IWineD3DBaseTextureImpl; -extern IWineD3DBaseTextureVtbl IWineD3DBaseTexture_Vtbl; +extern const IWineD3DBaseTextureVtbl IWineD3DBaseTexture_Vtbl; /***************************************************************************** * IWineD3DTexture implementation structure (extends IWineD3DBaseTextureImpl) @@ -500,7 +500,7 @@ extern IWineD3DBaseTextureVtbl IWineD3DBaseTexture_Vtbl; typedef struct IWineD3DTextureImpl { /* IUnknown & WineD3DResource/WineD3DBaseTexture Information */ - IWineD3DTextureVtbl *lpVtbl; + const IWineD3DTextureVtbl *lpVtbl; IWineD3DResourceClass resource; IWineD3DBaseTextureClass baseTexture; @@ -512,7 +512,7 @@ typedef struct IWineD3DTextureImpl } IWineD3DTextureImpl; -extern IWineD3DTextureVtbl IWineD3DTexture_Vtbl; +extern const IWineD3DTextureVtbl IWineD3DTexture_Vtbl; /***************************************************************************** * IWineD3DCubeTexture implementation structure (extends IWineD3DBaseTextureImpl) @@ -520,7 +520,7 @@ extern IWineD3DTextureVtbl IWineD3DTexture_Vtbl; typedef struct IWineD3DCubeTextureImpl { /* IUnknown & WineD3DResource/WineD3DBaseTexture Information */ - IWineD3DCubeTextureVtbl *lpVtbl; + const IWineD3DCubeTextureVtbl *lpVtbl; IWineD3DResourceClass resource; IWineD3DBaseTextureClass baseTexture; @@ -531,7 +531,7 @@ typedef struct IWineD3DCubeTextureImpl } IWineD3DCubeTextureImpl; -extern IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl; +extern const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl; /***************************************************************************** * IWineD3DVolume implementation structure (extends IUnknown) @@ -539,7 +539,7 @@ extern IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl; typedef struct IWineD3DVolumeImpl { /* IUnknown & WineD3DResource fields */ - IWineD3DVolumeVtbl *lpVtbl; + const IWineD3DVolumeVtbl *lpVtbl; IWineD3DResourceClass resource; /* WineD3DVolume Information */ @@ -556,7 +556,7 @@ typedef struct IWineD3DVolumeImpl } IWineD3DVolumeImpl; -extern IWineD3DVolumeVtbl IWineD3DVolume_Vtbl; +extern const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl; /***************************************************************************** * IWineD3DVolumeTexture implementation structure (extends IWineD3DBaseTextureImpl) @@ -564,7 +564,7 @@ extern IWineD3DVolumeVtbl IWineD3DVolume_Vtbl; typedef struct IWineD3DVolumeTextureImpl { /* IUnknown & WineD3DResource/WineD3DBaseTexture Information */ - IWineD3DVolumeTextureVtbl *lpVtbl; + const IWineD3DVolumeTextureVtbl *lpVtbl; IWineD3DResourceClass resource; IWineD3DBaseTextureClass baseTexture; @@ -576,7 +576,7 @@ typedef struct IWineD3DVolumeTextureImpl UINT depth; } IWineD3DVolumeTextureImpl; -extern IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl; +extern const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl; typedef struct _WINED3DSURFACET_DESC { @@ -593,7 +593,7 @@ typedef struct _WINED3DSURFACET_DESC struct IWineD3DSurfaceImpl { /* IUnknown & IWineD3DResource Information */ - IWineD3DSurfaceVtbl *lpVtbl; + const IWineD3DSurfaceVtbl *lpVtbl; IWineD3DResourceClass resource; /* IWineD3DSurface fields */ @@ -615,14 +615,14 @@ struct IWineD3DSurfaceImpl BOOL inPBuffer; }; -extern IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl; +extern const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl; /***************************************************************************** * IWineD3DVertexDeclaration implementation structure */ typedef struct IWineD3DVertexDeclarationImpl { /* IUnknown Information */ - IWineD3DVertexDeclarationVtbl *lpVtbl; + const IWineD3DVertexDeclarationVtbl *lpVtbl; DWORD ref; /* Note: Ref counting not required */ IUnknown *parent; @@ -640,7 +640,7 @@ typedef struct IWineD3DVertexDeclarationImpl { UINT declaration9NumElements; } IWineD3DVertexDeclarationImpl; -extern IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl; +extern const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl; /***************************************************************************** * IWineD3DStateBlock implementation structure @@ -668,7 +668,7 @@ typedef struct SAVEDSTATES { struct IWineD3DStateBlockImpl { /* IUnknown fields */ - IWineD3DStateBlockVtbl *lpVtbl; + const IWineD3DStateBlockVtbl *lpVtbl; DWORD ref; /* Note: Ref counting not required */ /* IWineD3DStateBlock information */ @@ -729,14 +729,14 @@ struct IWineD3DStateBlockImpl }; -extern IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl; +extern const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl; /***************************************************************************** * IWineD3DQueryImpl implementation structure (extends IUnknown) */ typedef struct IWineD3DQueryImpl { - IWineD3DQueryVtbl *lpVtbl; + const IWineD3DQueryVtbl *lpVtbl; DWORD ref; /* Note: Ref counting not required */ IUnknown *parent; @@ -754,7 +754,7 @@ typedef struct IWineD3DQueryImpl } IWineD3DQueryImpl; -extern IWineD3DQueryVtbl IWineD3DQuery_Vtbl; +extern const IWineD3DQueryVtbl IWineD3DQuery_Vtbl; /***************************************************************************** * Utility function prototypes @@ -836,7 +836,7 @@ GLint D3DFmt2GLIntFmt(IWineD3DDeviceImpl* This, D3DFORMAT fmt); */ typedef struct IWineD3DVertexShaderImpl { /* IUnknown parts*/ - IWineD3DVertexShaderVtbl *lpVtbl; + const IWineD3DVertexShaderVtbl *lpVtbl; DWORD ref; /* Note: Ref counting not required */ IUnknown *parent; @@ -855,14 +855,14 @@ typedef struct IWineD3DVertexShaderImpl { VSHADEROUTPUTDATA output; #endif } IWineD3DVertexShaderImpl; -extern IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl; +extern const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl; /***************************************************************************** * IDirect3DPixelShader implementation structure */ typedef struct IWineD3DPixelShaderImpl { /* IUnknown parts*/ - IWineD3DPixelShaderVtbl *lpVtbl; + const IWineD3DPixelShaderVtbl *lpVtbl; DWORD ref; /* Note: Ref counting not required */ IUnknown *parent; @@ -883,5 +883,5 @@ typedef struct IWineD3DPixelShaderImpl { #endif } IWineD3DPixelShaderImpl; -extern IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl; +extern const IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl; #endif diff --git a/dlls/winmm/winealsa/audio.c b/dlls/winmm/winealsa/audio.c index c7a7711f41e..bdc06895a12 100644 --- a/dlls/winmm/winealsa/audio.c +++ b/dlls/winmm/winealsa/audio.c @@ -2380,7 +2380,7 @@ typedef struct IDsDriverBufferImpl IDsDriverBufferImpl; struct IDsDriverImpl { /* IUnknown fields */ - IDsDriverVtbl *lpVtbl; + const IDsDriverVtbl *lpVtbl; DWORD ref; /* IDsDriverImpl fields */ UINT wDevID; @@ -2390,7 +2390,7 @@ struct IDsDriverImpl struct IDsDriverBufferImpl { /* IUnknown fields */ - IDsDriverBufferVtbl *lpVtbl; + const IDsDriverBufferVtbl *lpVtbl; DWORD ref; /* IDsDriverBufferImpl fields */ IDsDriverImpl* drv; @@ -2755,7 +2755,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_Stop(PIDSDRIVERBUFFER iface) return DS_OK; } -static IDsDriverBufferVtbl dsdbvt = +static const IDsDriverBufferVtbl dsdbvt = { IDsDriverBufferImpl_QueryInterface, IDsDriverBufferImpl_AddRef, @@ -2897,7 +2897,7 @@ static HRESULT WINAPI IDsDriverImpl_DuplicateSoundBuffer(PIDSDRIVER iface, return DSERR_INVALIDCALL; } -static IDsDriverVtbl dsdvt = +static const IDsDriverVtbl dsdvt = { IDsDriverImpl_QueryInterface, IDsDriverImpl_AddRef, diff --git a/dlls/winmm/wineaudioio/audio.c b/dlls/winmm/wineaudioio/audio.c index c5724db4652..d5e418921ac 100644 --- a/dlls/winmm/wineaudioio/audio.c +++ b/dlls/winmm/wineaudioio/audio.c @@ -1230,7 +1230,7 @@ typedef struct IDsDriverBufferImpl IDsDriverBufferImpl; struct IDsDriverImpl { /* IUnknown fields */ - IDsDriverVtbl *lpVtbl; + const IDsDriverVtbl *lpVtbl; DWORD ref; /* IDsDriverImpl fields */ UINT wDevID; @@ -1240,7 +1240,7 @@ struct IDsDriverImpl struct IDsDriverBufferImpl { /* IUnknown fields */ - IDsDriverBufferVtbl *lpVtbl; + const IDsDriverBufferVtbl *lpVtbl; DWORD ref; /* IDsDriverBufferImpl fields */ IDsDriverImpl* drv; @@ -1423,7 +1423,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_Stop(PIDSDRIVERBUFFER iface) return DSERR_BUFFERLOST; } -static IDsDriverBufferVtbl dsdbvt = +static const IDsDriverBufferVtbl dsdbvt = { IDsDriverBufferImpl_QueryInterface, IDsDriverBufferImpl_AddRef, @@ -1607,7 +1607,7 @@ static HRESULT WINAPI IDsDriverImpl_DuplicateSoundBuffer(PIDSDRIVER iface, return DSERR_INVALIDCALL; } -static IDsDriverVtbl dsdvt = +static const IDsDriverVtbl dsdvt = { IDsDriverImpl_QueryInterface, IDsDriverImpl_AddRef, diff --git a/dlls/winmm/winejack/audio.c b/dlls/winmm/winejack/audio.c index 1ea51bd67cb..2ef0acb3260 100644 --- a/dlls/winmm/winejack/audio.c +++ b/dlls/winmm/winejack/audio.c @@ -1718,7 +1718,7 @@ typedef struct IDsDriverBufferImpl IDsDriverBufferImpl; struct IDsDriverImpl { /* IUnknown fields */ - IDsDriverVtbl *lpVtbl; + const IDsDriverVtbl *lpVtbl; DWORD ref; /* IDsDriverImpl fields */ UINT wDevID; @@ -1728,7 +1728,7 @@ struct IDsDriverImpl struct IDsDriverBufferImpl { /* IUnknown fields */ - IDsDriverBufferVtbl *lpVtbl; + const IDsDriverBufferVtbl *lpVtbl; DWORD ref; /* IDsDriverBufferImpl fields */ IDsDriverImpl* drv; diff --git a/dlls/winmm/wineoss/dscapture.c b/dlls/winmm/wineoss/dscapture.c index 3d672aa24db..a8f9305d278 100644 --- a/dlls/winmm/wineoss/dscapture.c +++ b/dlls/winmm/wineoss/dscapture.c @@ -73,7 +73,7 @@ typedef struct IDsCaptureDriverBufferImpl IDsCaptureDriverBufferImpl; struct IDsCaptureDriverPropertySetImpl { /* IUnknown fields */ - IDsDriverPropertySetVtbl *lpVtbl; + const IDsDriverPropertySetVtbl *lpVtbl; DWORD ref; IDsCaptureDriverBufferImpl* capture_buffer; @@ -82,7 +82,7 @@ struct IDsCaptureDriverPropertySetImpl struct IDsCaptureDriverNotifyImpl { /* IUnknown fields */ - IDsDriverNotifyVtbl *lpVtbl; + const IDsDriverNotifyVtbl *lpVtbl; DWORD ref; IDsCaptureDriverBufferImpl* capture_buffer; @@ -91,7 +91,7 @@ struct IDsCaptureDriverNotifyImpl struct IDsCaptureDriverImpl { /* IUnknown fields */ - IDsCaptureDriverVtbl *lpVtbl; + const IDsCaptureDriverVtbl *lpVtbl; DWORD ref; /* IDsCaptureDriverImpl fields */ @@ -102,7 +102,7 @@ struct IDsCaptureDriverImpl struct IDsCaptureDriverBufferImpl { /* IUnknown fields */ - IDsCaptureDriverBufferVtbl *lpVtbl; + const IDsCaptureDriverBufferVtbl *lpVtbl; DWORD ref; /* IDsCaptureDriverBufferImpl fields */ @@ -240,7 +240,7 @@ static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_QuerySupport( return DSERR_UNSUPPORTED; } -IDsDriverPropertySetVtbl dscdpsvt = +static const IDsDriverPropertySetVtbl dscdpsvt = { IDsCaptureDriverPropertySetImpl_QueryInterface, IDsCaptureDriverPropertySetImpl_AddRef, @@ -340,7 +340,7 @@ static HRESULT WINAPI IDsCaptureDriverNotifyImpl_SetNotificationPositions( return S_OK; } -IDsDriverNotifyVtbl dscdnvt = +static const IDsDriverNotifyVtbl dscdnvt = { IDsCaptureDriverNotifyImpl_QueryInterface, IDsCaptureDriverNotifyImpl_AddRef, @@ -696,7 +696,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_SetFormat( return DSERR_UNSUPPORTED; } -static IDsCaptureDriverBufferVtbl dscdbvt = +static const IDsCaptureDriverBufferVtbl dscdbvt = { IDsCaptureDriverBufferImpl_QueryInterface, IDsCaptureDriverBufferImpl_AddRef, @@ -1220,7 +1220,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer( return DS_OK; } -static IDsCaptureDriverVtbl dscdvt = +static const IDsCaptureDriverVtbl dscdvt = { IDsCaptureDriverImpl_QueryInterface, IDsCaptureDriverImpl_AddRef, diff --git a/dlls/winmm/wineoss/dsrender.c b/dlls/winmm/wineoss/dsrender.c index 4cbae15cba1..91e6e149dbe 100644 --- a/dlls/winmm/wineoss/dsrender.c +++ b/dlls/winmm/wineoss/dsrender.c @@ -76,7 +76,7 @@ typedef struct IDsDriverBufferImpl IDsDriverBufferImpl; struct IDsDriverPropertySetImpl { /* IUnknown fields */ - IDsDriverPropertySetVtbl *lpVtbl; + const IDsDriverPropertySetVtbl *lpVtbl; DWORD ref; IDsDriverBufferImpl* buffer; @@ -85,7 +85,7 @@ struct IDsDriverPropertySetImpl struct IDsDriverNotifyImpl { /* IUnknown fields */ - IDsDriverNotifyVtbl *lpVtbl; + const IDsDriverNotifyVtbl *lpVtbl; DWORD ref; /* IDsDriverNotifyImpl fields */ @@ -98,7 +98,7 @@ struct IDsDriverNotifyImpl struct IDsDriverImpl { /* IUnknown fields */ - IDsDriverVtbl *lpVtbl; + const IDsDriverVtbl *lpVtbl; DWORD ref; /* IDsDriverImpl fields */ @@ -112,7 +112,7 @@ struct IDsDriverImpl struct IDsDriverBufferImpl { /* IUnknown fields */ - IDsDriverBufferVtbl *lpVtbl; + const IDsDriverBufferVtbl *lpVtbl; DWORD ref; /* IDsDriverBufferImpl fields */ @@ -228,7 +228,7 @@ static HRESULT WINAPI IDsDriverPropertySetImpl_QuerySupport( return DSERR_UNSUPPORTED; } -IDsDriverPropertySetVtbl dsdpsvt = +static const IDsDriverPropertySetVtbl dsdpsvt = { IDsDriverPropertySetImpl_QueryInterface, IDsDriverPropertySetImpl_AddRef, @@ -324,7 +324,7 @@ static HRESULT WINAPI IDsDriverNotifyImpl_SetNotificationPositions( return S_OK; } -IDsDriverNotifyVtbl dsdnvt = +static const IDsDriverNotifyVtbl dsdnvt = { IDsDriverNotifyImpl_QueryInterface, IDsDriverNotifyImpl_AddRef, @@ -645,7 +645,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_Stop(PIDSDRIVERBUFFER iface) return DS_OK; } -static IDsDriverBufferVtbl dsdbvt = +static const IDsDriverBufferVtbl dsdbvt = { IDsDriverBufferImpl_QueryInterface, IDsDriverBufferImpl_AddRef, @@ -874,7 +874,7 @@ static HRESULT WINAPI IDsDriverImpl_DuplicateSoundBuffer(PIDSDRIVER iface, return DSERR_INVALIDCALL; } -static IDsDriverVtbl dsdvt = +static const IDsDriverVtbl dsdvt = { IDsDriverImpl_QueryInterface, IDsDriverImpl_AddRef, -- 2.11.4.GIT