diff --git a/wintable/new/accessibility.h b/wintable/new/accessibility.h index 1d77f61..42c5c06 100644 --- a/wintable/new/accessibility.h +++ b/wintable/new/accessibility.h @@ -7,6 +7,8 @@ struct tableAcc { // TODO create a standard accessible object }; +#define TA ((struct tableAcc *) this) + static HRESULT STDMETHODCALLTYPE tableAccQueryInterface(IAccessible *this, REFIID riid, void **ppvObject) { if (ppvObject == NULL) @@ -14,6 +16,7 @@ static HRESULT STDMETHODCALLTYPE tableAccQueryInterface(IAccessible *this, REFII if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDispatch) || IsEqualIID(riid, &IID_IAccessible)) { + TA->vtbl->AddRef(TA); *ppvObject = (void *) this; return S_OK; } @@ -21,8 +24,6 @@ static HRESULT STDMETHODCALLTYPE tableAccQueryInterface(IAccessible *this, REFII return E_NOINTERFACE; } -#define TA ((struct tableAcc *) this) - // TODO use InterlockedIncrement()/InterlockedDecrement() for these? static ULONG STDMETHODCALLTYPE tableAccAddRef(IAccessible *this)