shdocvw: Don't open code CONTAINING_RECORD().
This commit is contained in:
parent
2fd48900a2
commit
9d74e4dec3
|
@ -34,7 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|||
|
||||
static inline WebBrowser *impl_from_IProvideClassInfo2(IProvideClassInfo2 *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IProvideClassInfo2_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IProvideClassInfo2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ProvideClassInfo_QueryInterface(IProvideClassInfo2 *iface,
|
||||
|
|
|
@ -27,7 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|||
|
||||
static inline DocHost *impl_from_IOleClientSite(IOleClientSite *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IOleClientSite_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv)
|
||||
|
@ -149,7 +149,7 @@ static const IOleClientSiteVtbl OleClientSiteVtbl = {
|
|||
|
||||
static inline DocHost *impl_from_IOleInPlaceSite(IOleInPlaceSite *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IOleInPlaceSite_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleInPlaceSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSite *iface, REFIID riid, void **ppv)
|
||||
|
@ -305,7 +305,7 @@ static const IOleInPlaceSiteVtbl OleInPlaceSiteVtbl = {
|
|||
|
||||
static inline DocHost *impl_from_IOleDocumentSite(IOleDocumentSite *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IOleDocumentSite_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleDocumentSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI OleDocumentSite_QueryInterface(IOleDocumentSite *iface,
|
||||
|
@ -361,7 +361,7 @@ static const IOleDocumentSiteVtbl OleDocumentSiteVtbl = {
|
|||
|
||||
static inline DocHost *impl_from_IOleControlSite(IOleControlSite *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IOleControlSite_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleControlSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ControlSite_QueryInterface(IOleControlSite *iface, REFIID riid, void **ppv)
|
||||
|
@ -471,7 +471,7 @@ static IOleControlSiteVtbl OleControlSiteVtbl = {
|
|||
|
||||
static inline DocHost *impl_from_IDispatch(IDispatch *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IDispatch_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IDispatch_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClDispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
|
||||
|
@ -585,7 +585,7 @@ static const IDispatchVtbl DispatchVtbl = {
|
|||
|
||||
static inline DocHost *impl_from_IServiceProvider(IServiceProvider *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IServiceProvider_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IServiceProvider_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid,
|
||||
|
|
|
@ -404,7 +404,7 @@ void release_dochost_client(DocHost *This)
|
|||
|
||||
static inline DocHost *impl_from_IOleCommandTarget(IOleCommandTarget *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IOleCommandTarget_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleCommandTarget_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClOleCommandTarget_QueryInterface(IOleCommandTarget *iface,
|
||||
|
@ -494,7 +494,7 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
|
|||
|
||||
static inline DocHost *impl_from_IDocHostUIHandler2(IDocHostUIHandler2 *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IDocHostUIHandler2_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IDocHostUIHandler2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface,
|
||||
|
@ -733,7 +733,7 @@ static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = {
|
|||
|
||||
static inline DocHost *impl_from_IPropertyNotifySink(IPropertyNotifySink *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IPropertyNotifySink_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IPropertyNotifySink_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface,
|
||||
|
|
|
@ -45,7 +45,7 @@ struct ConnectionPoint {
|
|||
|
||||
static inline ConnectionPointContainer *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
|
||||
{
|
||||
return (ConnectionPointContainer*)((char*)iface - FIELD_OFFSET(ConnectionPointContainer, IConnectionPointContainer_iface));
|
||||
return CONTAINING_RECORD(iface, ConnectionPointContainer, IConnectionPointContainer_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface,
|
||||
|
@ -125,7 +125,7 @@ static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl =
|
|||
|
||||
static inline ConnectionPoint *impl_from_IConnectionPoint(IConnectionPoint *iface)
|
||||
{
|
||||
return (ConnectionPoint*)((char*)iface - FIELD_OFFSET(ConnectionPoint, IConnectionPoint_iface));
|
||||
return CONTAINING_RECORD(iface, ConnectionPoint, IConnectionPoint_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface,
|
||||
|
|
|
@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|||
|
||||
static inline DocHost *impl_from_IOleInPlaceFrame(IOleInPlaceFrame *iface)
|
||||
{
|
||||
return (DocHost*)((char*)iface - FIELD_OFFSET(DocHost, IOleInPlaceFrame_iface));
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleInPlaceFrame_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface,
|
||||
|
|
|
@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|||
|
||||
static inline InternetExplorer *impl_from_IWebBrowser2(IWebBrowser2 *iface)
|
||||
{
|
||||
return (InternetExplorer*)((char*)iface - FIELD_OFFSET(InternetExplorer, IWebBrowser2_iface));
|
||||
return CONTAINING_RECORD(iface, InternetExplorer, IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_QueryInterface(IWebBrowser2 *iface, REFIID riid, LPVOID *ppv)
|
||||
|
|
|
@ -724,7 +724,7 @@ static IWebBrowser2 *create_ie_window(LPCSTR cmdline)
|
|||
|
||||
static inline InternetExplorer *impl_from_DocHost(DocHost *iface)
|
||||
{
|
||||
return (InternetExplorer*)((char*)iface - FIELD_OFFSET(InternetExplorer, doc_host));
|
||||
return CONTAINING_RECORD(iface, InternetExplorer, doc_host);
|
||||
}
|
||||
|
||||
static void WINAPI DocHostContainer_GetDocObjRect(DocHost* This, RECT* rc)
|
||||
|
|
|
@ -58,17 +58,17 @@ typedef struct
|
|||
|
||||
static inline InternetShortcut* impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
|
||||
{
|
||||
return (InternetShortcut*)((char*)iface - FIELD_OFFSET(InternetShortcut, uniformResourceLocatorA));
|
||||
return CONTAINING_RECORD(iface, InternetShortcut, uniformResourceLocatorA);
|
||||
}
|
||||
|
||||
static inline InternetShortcut* impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
|
||||
{
|
||||
return (InternetShortcut*)((char*)iface - FIELD_OFFSET(InternetShortcut, uniformResourceLocatorW));
|
||||
return CONTAINING_RECORD(iface, InternetShortcut, uniformResourceLocatorW);
|
||||
}
|
||||
|
||||
static inline InternetShortcut* impl_from_IPersistFile(IPersistFile *iface)
|
||||
{
|
||||
return (InternetShortcut*)((char*)iface - FIELD_OFFSET(InternetShortcut, persistFile));
|
||||
return CONTAINING_RECORD(iface, InternetShortcut, persistFile);
|
||||
}
|
||||
|
||||
static BOOL run_winemenubuilder( const WCHAR *args )
|
||||
|
|
|
@ -129,7 +129,7 @@ static HRESULT set_dochost_url(DocHost *This, const WCHAR *url)
|
|||
|
||||
static inline BindStatusCallback *impl_from_IBindStatusCallback(IBindStatusCallback *iface)
|
||||
{
|
||||
return (BindStatusCallback*)((char*)iface - FIELD_OFFSET(BindStatusCallback, IBindStatusCallback_iface));
|
||||
return CONTAINING_RECORD(iface, BindStatusCallback, IBindStatusCallback_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *iface,
|
||||
|
@ -314,7 +314,7 @@ static const IBindStatusCallbackVtbl BindStatusCallbackVtbl = {
|
|||
|
||||
static inline BindStatusCallback *impl_from_IHttpNegotiate(IHttpNegotiate *iface)
|
||||
{
|
||||
return (BindStatusCallback*)((char*)iface - FIELD_OFFSET(BindStatusCallback, IHttpNegotiate_iface));
|
||||
return CONTAINING_RECORD(iface, BindStatusCallback, IHttpNegotiate_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate *iface,
|
||||
|
@ -882,7 +882,7 @@ HRESULT go_home(DocHost *This)
|
|||
|
||||
static inline HlinkFrame *impl_from_IHlinkFrame(IHlinkFrame *iface)
|
||||
{
|
||||
return (HlinkFrame*)((char*)iface - FIELD_OFFSET(HlinkFrame, IHlinkFrame_iface));
|
||||
return CONTAINING_RECORD(iface, HlinkFrame, IHlinkFrame_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HlinkFrame_QueryInterface(IHlinkFrame *iface, REFIID riid, void **ppv)
|
||||
|
@ -981,7 +981,7 @@ static const IHlinkFrameVtbl HlinkFrameVtbl = {
|
|||
|
||||
static inline HlinkFrame *impl_from_ITargetFrame2(ITargetFrame2 *iface)
|
||||
{
|
||||
return (HlinkFrame*)((char*)iface - FIELD_OFFSET(HlinkFrame, IHlinkFrame_iface));
|
||||
return CONTAINING_RECORD(iface, HlinkFrame, IHlinkFrame_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_QueryInterface(ITargetFrame2 *iface, REFIID riid, void **ppv)
|
||||
|
|
|
@ -291,7 +291,7 @@ static void release_client_site(WebBrowser *This)
|
|||
|
||||
static inline WebBrowser *impl_from_IOleObject(IOleObject *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IOleObject_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IOleObject_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
|
||||
|
@ -598,7 +598,7 @@ static const IOleObjectVtbl OleObjectVtbl =
|
|||
|
||||
static inline WebBrowser *impl_from_IOleInPlaceObject(IOleInPlaceObject *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IOleInPlaceObject_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IOleInPlaceObject_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI OleInPlaceObject_QueryInterface(IOleInPlaceObject *iface,
|
||||
|
@ -707,7 +707,7 @@ static const IOleInPlaceObjectVtbl OleInPlaceObjectVtbl =
|
|||
|
||||
static inline WebBrowser *impl_from_IOleControl(IOleControl *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IOleControl_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IOleControl_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface,
|
||||
|
@ -790,7 +790,7 @@ static const IOleControlVtbl OleControlVtbl =
|
|||
|
||||
static inline WebBrowser *impl_from_IOleInPlaceActiveObject(IOleInPlaceActiveObject *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IOleInPlaceActiveObject_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IOleInPlaceActiveObject_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface,
|
||||
|
@ -897,7 +897,7 @@ static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = {
|
|||
|
||||
static inline WebBrowser *impl_from_IOleCommandTarget(IOleCommandTarget *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IOleCommandTarget_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IOleCommandTarget_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOleCommandTarget_QueryInterface(IOleCommandTarget *iface,
|
||||
|
|
|
@ -30,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|||
|
||||
static inline WebBrowser *impl_from_IPersistStorage(IPersistStorage *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IPersistStorage_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IPersistStorage_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStorage_QueryInterface(IPersistStorage *iface,
|
||||
|
@ -114,7 +114,7 @@ static const IPersistStorageVtbl PersistStorageVtbl =
|
|||
|
||||
static inline WebBrowser *impl_from_IPersistMemory(IPersistMemory *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IPersistMemory_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IPersistMemory_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistMemory_QueryInterface(IPersistMemory *iface,
|
||||
|
@ -198,7 +198,7 @@ static const IPersistMemoryVtbl PersistMemoryVtbl =
|
|||
|
||||
static inline WebBrowser *impl_from_IPersistStreamInit(IPersistStreamInit *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IPersistStreamInit_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IPersistStreamInit_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface,
|
||||
|
|
|
@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|||
|
||||
static inline WebBrowser *impl_from_IViewObject2(IViewObject2 *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IViewObject2_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IViewObject2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppv)
|
||||
|
@ -130,7 +130,7 @@ static const IViewObject2Vtbl ViewObjectVtbl = {
|
|||
|
||||
static inline WebBrowser *impl_from_IDataObject(IDataObject *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IDataObject_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IDataObject_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_QueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID * ppvObj)
|
||||
|
|
|
@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|||
|
||||
static inline WebBrowser *impl_from_IWebBrowser2(IWebBrowser2 *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IWebBrowser2_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid, LPVOID *ppv)
|
||||
|
@ -1062,7 +1062,7 @@ static const IWebBrowser2Vtbl WebBrowser2Vtbl =
|
|||
|
||||
static inline WebBrowser *impl_from_IServiceProvider(IServiceProvider *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, IServiceProvider_iface));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IServiceProvider_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBServiceProvider_QueryInterface(IServiceProvider *iface,
|
||||
|
@ -1114,7 +1114,7 @@ static const IServiceProviderVtbl ServiceProviderVtbl =
|
|||
|
||||
static inline WebBrowser *impl_from_DocHost(DocHost *iface)
|
||||
{
|
||||
return (WebBrowser*)((char*)iface - FIELD_OFFSET(WebBrowser, doc_host));
|
||||
return CONTAINING_RECORD(iface, WebBrowser, doc_host);
|
||||
}
|
||||
|
||||
static void WINAPI DocHostContainer_GetDocObjRect(DocHost* This, RECT* rc)
|
||||
|
|
Loading…
Reference in New Issue