shell32: Use FIELD_OFFSET instead of hand coding its functionality.

This commit is contained in:
Michael Stefaniuc 2008-11-05 10:17:13 +01:00 committed by Alexandre Julliard
parent 311bef2a5c
commit 3591663cca
1 changed files with 2 additions and 2 deletions

View File

@ -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)