From 3591663ccafb3991f747b1ce8ef9e2a2a4f2465c Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 5 Nov 2008 10:17:13 +0100 Subject: [PATCH] shell32: Use FIELD_OFFSET instead of hand coding its functionality. --- dlls/shell32/shfldr_netplaces.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shfldr_netplaces.c b/dlls/shell32/shfldr_netplaces.c index d0e98335806..c661c510186 100644 --- a/dlls/shell32/shfldr_netplaces.c +++ b/dlls/shell32/shfldr_netplaces.c @@ -66,8 +66,8 @@ static const IShellFolder2Vtbl vt_ShellFolder2; static const IPersistFolder2Vtbl vt_NP_PersistFolder2; -#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) -#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); +#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = \ + (class*)(((char*)name) - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)) #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) -- 2.11.4.GIT