Commit 0acf4a29 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

riched20/tests: Use an iface instead of a vtbl pointer in ITextHostTestImpl.

parent 4038523b
...@@ -75,15 +75,20 @@ static ITextServicesVtbl itextServicesStdcallVtbl; ...@@ -75,15 +75,20 @@ static ITextServicesVtbl itextServicesStdcallVtbl;
typedef struct ITextHostTestImpl typedef struct ITextHostTestImpl
{ {
ITextHostVtbl *lpVtbl; ITextHost ITextHost_iface;
LONG refCount; LONG refCount;
} ITextHostTestImpl; } ITextHostTestImpl;
static inline ITextHostTestImpl *impl_from_ITextHost(ITextHost *iface)
{
return CONTAINING_RECORD(iface, ITextHostTestImpl, ITextHost_iface);
}
static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface,
REFIID riid, REFIID riid,
LPVOID *ppvObject) LPVOID *ppvObject)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_ITextHost)) { if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_ITextHost)) {
*ppvObject = This; *ppvObject = This;
...@@ -96,14 +101,14 @@ static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface, ...@@ -96,14 +101,14 @@ static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface,
static ULONG WINAPI ITextHostImpl_AddRef(ITextHost *iface) static ULONG WINAPI ITextHostImpl_AddRef(ITextHost *iface)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
ULONG refCount = InterlockedIncrement(&This->refCount); ULONG refCount = InterlockedIncrement(&This->refCount);
return refCount; return refCount;
} }
static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface) static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
ULONG refCount = InterlockedDecrement(&This->refCount); ULONG refCount = InterlockedDecrement(&This->refCount);
if (!refCount) if (!refCount)
...@@ -117,7 +122,7 @@ static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface) ...@@ -117,7 +122,7 @@ static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface)
static HDC WINAPI ITextHostImpl_TxGetDC(ITextHost *iface) static HDC WINAPI ITextHostImpl_TxGetDC(ITextHost *iface)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetDC(%p)\n", This); TRACECALL("Call to TxGetDC(%p)\n", This);
return NULL; return NULL;
} }
...@@ -125,7 +130,7 @@ static HDC WINAPI ITextHostImpl_TxGetDC(ITextHost *iface) ...@@ -125,7 +130,7 @@ static HDC WINAPI ITextHostImpl_TxGetDC(ITextHost *iface)
static INT WINAPI ITextHostImpl_TxReleaseDC(ITextHost *iface, static INT WINAPI ITextHostImpl_TxReleaseDC(ITextHost *iface,
HDC hdc) HDC hdc)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxReleaseDC(%p)\n", This); TRACECALL("Call to TxReleaseDC(%p)\n", This);
return 0; return 0;
} }
...@@ -134,7 +139,7 @@ static BOOL WINAPI ITextHostImpl_TxShowScrollBar(ITextHost *iface, ...@@ -134,7 +139,7 @@ static BOOL WINAPI ITextHostImpl_TxShowScrollBar(ITextHost *iface,
INT fnBar, INT fnBar,
BOOL fShow) BOOL fShow)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxShowScrollBar(%p, fnBar=%d, fShow=%d)\n", TRACECALL("Call to TxShowScrollBar(%p, fnBar=%d, fShow=%d)\n",
This, fnBar, fShow); This, fnBar, fShow);
return FALSE; return FALSE;
...@@ -144,7 +149,7 @@ static BOOL WINAPI ITextHostImpl_TxEnableScrollBar(ITextHost *iface, ...@@ -144,7 +149,7 @@ static BOOL WINAPI ITextHostImpl_TxEnableScrollBar(ITextHost *iface,
INT fuSBFlags, INT fuSBFlags,
INT fuArrowflags) INT fuArrowflags)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxEnableScrollBar(%p, fuSBFlags=%d, fuArrowflags=%d)\n", TRACECALL("Call to TxEnableScrollBar(%p, fuSBFlags=%d, fuArrowflags=%d)\n",
This, fuSBFlags, fuArrowflags); This, fuSBFlags, fuArrowflags);
return FALSE; return FALSE;
...@@ -156,7 +161,7 @@ static BOOL WINAPI ITextHostImpl_TxSetScrollRange(ITextHost *iface, ...@@ -156,7 +161,7 @@ static BOOL WINAPI ITextHostImpl_TxSetScrollRange(ITextHost *iface,
INT nMaxPos, INT nMaxPos,
BOOL fRedraw) BOOL fRedraw)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetScrollRange(%p, fnBar=%d, nMinPos=%d, nMaxPos=%d, fRedraw=%d)\n", TRACECALL("Call to TxSetScrollRange(%p, fnBar=%d, nMinPos=%d, nMaxPos=%d, fRedraw=%d)\n",
This, fnBar, nMinPos, nMaxPos, fRedraw); This, fnBar, nMinPos, nMaxPos, fRedraw);
return FALSE; return FALSE;
...@@ -167,7 +172,7 @@ static BOOL WINAPI ITextHostImpl_TxSetScrollPos(ITextHost *iface, ...@@ -167,7 +172,7 @@ static BOOL WINAPI ITextHostImpl_TxSetScrollPos(ITextHost *iface,
INT nPos, INT nPos,
BOOL fRedraw) BOOL fRedraw)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetScrollPos(%p, fnBar=%d, nPos=%d, fRedraw=%d)\n", TRACECALL("Call to TxSetScrollPos(%p, fnBar=%d, nPos=%d, fRedraw=%d)\n",
This, fnBar, nPos, fRedraw); This, fnBar, nPos, fRedraw);
return FALSE; return FALSE;
...@@ -177,14 +182,14 @@ static void WINAPI ITextHostImpl_TxInvalidateRect(ITextHost *iface, ...@@ -177,14 +182,14 @@ static void WINAPI ITextHostImpl_TxInvalidateRect(ITextHost *iface,
LPCRECT prc, LPCRECT prc,
BOOL fMode) BOOL fMode)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxInvalidateRect(%p, prc=%p, fMode=%d)\n", TRACECALL("Call to TxInvalidateRect(%p, prc=%p, fMode=%d)\n",
This, prc, fMode); This, prc, fMode);
} }
static void WINAPI ITextHostImpl_TxViewChange(ITextHost *iface, BOOL fUpdate) static void WINAPI ITextHostImpl_TxViewChange(ITextHost *iface, BOOL fUpdate)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxViewChange(%p, fUpdate=%d)\n", TRACECALL("Call to TxViewChange(%p, fUpdate=%d)\n",
This, fUpdate); This, fUpdate);
} }
...@@ -193,7 +198,7 @@ static BOOL WINAPI ITextHostImpl_TxCreateCaret(ITextHost *iface, ...@@ -193,7 +198,7 @@ static BOOL WINAPI ITextHostImpl_TxCreateCaret(ITextHost *iface,
HBITMAP hbmp, HBITMAP hbmp,
INT xWidth, INT yHeight) INT xWidth, INT yHeight)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxCreateCaret(%p, nbmp=%p, xWidth=%d, yHeight=%d)\n", TRACECALL("Call to TxCreateCaret(%p, nbmp=%p, xWidth=%d, yHeight=%d)\n",
This, hbmp, xWidth, yHeight); This, hbmp, xWidth, yHeight);
return FALSE; return FALSE;
...@@ -201,7 +206,7 @@ static BOOL WINAPI ITextHostImpl_TxCreateCaret(ITextHost *iface, ...@@ -201,7 +206,7 @@ static BOOL WINAPI ITextHostImpl_TxCreateCaret(ITextHost *iface,
static BOOL WINAPI ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow) static BOOL WINAPI ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxShowCaret(%p, fShow=%d)\n", TRACECALL("Call to TxShowCaret(%p, fShow=%d)\n",
This, fShow); This, fShow);
return FALSE; return FALSE;
...@@ -210,7 +215,7 @@ static BOOL WINAPI ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow) ...@@ -210,7 +215,7 @@ static BOOL WINAPI ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow)
static BOOL WINAPI ITextHostImpl_TxSetCaretPos(ITextHost *iface, static BOOL WINAPI ITextHostImpl_TxSetCaretPos(ITextHost *iface,
INT x, INT y) INT x, INT y)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetCaretPos(%p, x=%d, y=%d)\n", This, x, y); TRACECALL("Call to TxSetCaretPos(%p, x=%d, y=%d)\n", This, x, y);
return FALSE; return FALSE;
} }
...@@ -218,7 +223,7 @@ static BOOL WINAPI ITextHostImpl_TxSetCaretPos(ITextHost *iface, ...@@ -218,7 +223,7 @@ static BOOL WINAPI ITextHostImpl_TxSetCaretPos(ITextHost *iface,
static BOOL WINAPI ITextHostImpl_TxSetTimer(ITextHost *iface, static BOOL WINAPI ITextHostImpl_TxSetTimer(ITextHost *iface,
UINT idTimer, UINT uTimeout) UINT idTimer, UINT uTimeout)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetTimer(%p, idTimer=%u, uTimeout=%u)\n", TRACECALL("Call to TxSetTimer(%p, idTimer=%u, uTimeout=%u)\n",
This, idTimer, uTimeout); This, idTimer, uTimeout);
return FALSE; return FALSE;
...@@ -226,7 +231,7 @@ static BOOL WINAPI ITextHostImpl_TxSetTimer(ITextHost *iface, ...@@ -226,7 +231,7 @@ static BOOL WINAPI ITextHostImpl_TxSetTimer(ITextHost *iface,
static void WINAPI ITextHostImpl_TxKillTimer(ITextHost *iface, UINT idTimer) static void WINAPI ITextHostImpl_TxKillTimer(ITextHost *iface, UINT idTimer)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxKillTimer(%p, idTimer=%u)\n", This, idTimer); TRACECALL("Call to TxKillTimer(%p, idTimer=%u)\n", This, idTimer);
} }
...@@ -238,20 +243,20 @@ static void WINAPI ITextHostImpl_TxScrollWindowEx(ITextHost *iface, ...@@ -238,20 +243,20 @@ static void WINAPI ITextHostImpl_TxScrollWindowEx(ITextHost *iface,
LPRECT lprcUpdate, LPRECT lprcUpdate,
UINT fuScroll) UINT fuScroll)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxScrollWindowEx(%p, %d, %d, %p, %p, %p, %p, %d)\n", TRACECALL("Call to TxScrollWindowEx(%p, %d, %d, %p, %p, %p, %p, %d)\n",
This, dx, dy, lprcScroll, lprcClip, hRgnUpdate, lprcUpdate, fuScroll); This, dx, dy, lprcScroll, lprcClip, hRgnUpdate, lprcUpdate, fuScroll);
} }
static void WINAPI ITextHostImpl_TxSetCapture(ITextHost *iface, BOOL fCapture) static void WINAPI ITextHostImpl_TxSetCapture(ITextHost *iface, BOOL fCapture)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetCapture(%p, fCapture=%d)\n", This, fCapture); TRACECALL("Call to TxSetCapture(%p, fCapture=%d)\n", This, fCapture);
} }
static void WINAPI ITextHostImpl_TxSetFocus(ITextHost *iface) static void WINAPI ITextHostImpl_TxSetFocus(ITextHost *iface)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetFocus(%p)\n", This); TRACECALL("Call to TxSetFocus(%p)\n", This);
} }
...@@ -259,7 +264,7 @@ static void WINAPI ITextHostImpl_TxSetCursor(ITextHost *iface, ...@@ -259,7 +264,7 @@ static void WINAPI ITextHostImpl_TxSetCursor(ITextHost *iface,
HCURSOR hcur, HCURSOR hcur,
BOOL fText) BOOL fText)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetCursor(%p, hcur=%p, fText=%d)\n", TRACECALL("Call to TxSetCursor(%p, hcur=%p, fText=%d)\n",
This, hcur, fText); This, hcur, fText);
} }
...@@ -267,7 +272,7 @@ static void WINAPI ITextHostImpl_TxSetCursor(ITextHost *iface, ...@@ -267,7 +272,7 @@ static void WINAPI ITextHostImpl_TxSetCursor(ITextHost *iface,
static BOOL WINAPI ITextHostImpl_TxScreenToClient(ITextHost *iface, static BOOL WINAPI ITextHostImpl_TxScreenToClient(ITextHost *iface,
LPPOINT lppt) LPPOINT lppt)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxScreenToClient(%p, lppt=%p)\n", This, lppt); TRACECALL("Call to TxScreenToClient(%p, lppt=%p)\n", This, lppt);
return FALSE; return FALSE;
} }
...@@ -275,7 +280,7 @@ static BOOL WINAPI ITextHostImpl_TxScreenToClient(ITextHost *iface, ...@@ -275,7 +280,7 @@ static BOOL WINAPI ITextHostImpl_TxScreenToClient(ITextHost *iface,
static BOOL WINAPI ITextHostImpl_TxClientToScreen(ITextHost *iface, static BOOL WINAPI ITextHostImpl_TxClientToScreen(ITextHost *iface,
LPPOINT lppt) LPPOINT lppt)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxClientToScreen(%p, lppt=%p)\n", This, lppt); TRACECALL("Call to TxClientToScreen(%p, lppt=%p)\n", This, lppt);
return FALSE; return FALSE;
} }
...@@ -283,7 +288,7 @@ static BOOL WINAPI ITextHostImpl_TxClientToScreen(ITextHost *iface, ...@@ -283,7 +288,7 @@ static BOOL WINAPI ITextHostImpl_TxClientToScreen(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxActivate(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxActivate(ITextHost *iface,
LONG *plOldState) LONG *plOldState)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxActivate(%p, plOldState=%p)\n", This, plOldState); TRACECALL("Call to TxActivate(%p, plOldState=%p)\n", This, plOldState);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -291,7 +296,7 @@ static HRESULT WINAPI ITextHostImpl_TxActivate(ITextHost *iface, ...@@ -291,7 +296,7 @@ static HRESULT WINAPI ITextHostImpl_TxActivate(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxDeactivate(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxDeactivate(ITextHost *iface,
LONG lNewState) LONG lNewState)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxDeactivate(%p, lNewState=%d)\n", This, lNewState); TRACECALL("Call to TxDeactivate(%p, lNewState=%d)\n", This, lNewState);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -299,7 +304,7 @@ static HRESULT WINAPI ITextHostImpl_TxDeactivate(ITextHost *iface, ...@@ -299,7 +304,7 @@ static HRESULT WINAPI ITextHostImpl_TxDeactivate(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetClientRect(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetClientRect(ITextHost *iface,
LPRECT prc) LPRECT prc)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetClientRect(%p, prc=%p)\n", This, prc); TRACECALL("Call to TxGetClientRect(%p, prc=%p)\n", This, prc);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -307,7 +312,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetClientRect(ITextHost *iface, ...@@ -307,7 +312,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetClientRect(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetViewInset(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetViewInset(ITextHost *iface,
LPRECT prc) LPRECT prc)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetViewInset(%p, prc=%p)\n", This, prc); TRACECALL("Call to TxGetViewInset(%p, prc=%p)\n", This, prc);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -315,7 +320,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetViewInset(ITextHost *iface, ...@@ -315,7 +320,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetViewInset(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface,
const CHARFORMATW **ppCF) const CHARFORMATW **ppCF)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetCharFormat(%p, ppCF=%p)\n", This, ppCF); TRACECALL("Call to TxGetCharFormat(%p, ppCF=%p)\n", This, ppCF);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -323,7 +328,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface, ...@@ -323,7 +328,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface,
const PARAFORMAT **ppPF) const PARAFORMAT **ppPF)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetParaFormat(%p, ppPF=%p)\n", This, ppPF); TRACECALL("Call to TxGetParaFormat(%p, ppPF=%p)\n", This, ppPF);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -331,7 +336,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface, ...@@ -331,7 +336,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface,
static COLORREF WINAPI ITextHostImpl_TxGetSysColor(ITextHost *iface, static COLORREF WINAPI ITextHostImpl_TxGetSysColor(ITextHost *iface,
int nIndex) int nIndex)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetSysColor(%p, nIndex=%d)\n", This, nIndex); TRACECALL("Call to TxGetSysColor(%p, nIndex=%d)\n", This, nIndex);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -339,7 +344,7 @@ static COLORREF WINAPI ITextHostImpl_TxGetSysColor(ITextHost *iface, ...@@ -339,7 +344,7 @@ static COLORREF WINAPI ITextHostImpl_TxGetSysColor(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetBackStyle(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetBackStyle(ITextHost *iface,
TXTBACKSTYLE *pStyle) TXTBACKSTYLE *pStyle)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetBackStyle(%p, pStyle=%p)\n", This, pStyle); TRACECALL("Call to TxGetBackStyle(%p, pStyle=%p)\n", This, pStyle);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -347,7 +352,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetBackStyle(ITextHost *iface, ...@@ -347,7 +352,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetBackStyle(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetMaxLength(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetMaxLength(ITextHost *iface,
DWORD *pLength) DWORD *pLength)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetMaxLength(%p, pLength=%p)\n", This, pLength); TRACECALL("Call to TxGetMaxLength(%p, pLength=%p)\n", This, pLength);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -355,7 +360,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetMaxLength(ITextHost *iface, ...@@ -355,7 +360,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetMaxLength(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetScrollBars(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetScrollBars(ITextHost *iface,
DWORD *pdwScrollBar) DWORD *pdwScrollBar)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetScrollBars(%p, pdwScrollBar=%p)\n", TRACECALL("Call to TxGetScrollBars(%p, pdwScrollBar=%p)\n",
This, pdwScrollBar); This, pdwScrollBar);
return E_NOTIMPL; return E_NOTIMPL;
...@@ -364,7 +369,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetScrollBars(ITextHost *iface, ...@@ -364,7 +369,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetScrollBars(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetPasswordChar(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetPasswordChar(ITextHost *iface,
WCHAR *pch) WCHAR *pch)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetPasswordChar(%p, pch=%p)\n", This, pch); TRACECALL("Call to TxGetPasswordChar(%p, pch=%p)\n", This, pch);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -372,7 +377,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetPasswordChar(ITextHost *iface, ...@@ -372,7 +377,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetPasswordChar(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface,
LONG *pch) LONG *pch)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetAcceleratorPos(%p, pch=%p)\n", This, pch); TRACECALL("Call to TxGetAcceleratorPos(%p, pch=%p)\n", This, pch);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -380,7 +385,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface, ...@@ -380,7 +385,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxGetExtent(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetExtent(ITextHost *iface,
LPSIZEL lpExtent) LPSIZEL lpExtent)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetExtent(%p, lpExtent=%p)\n", This, lpExtent); TRACECALL("Call to TxGetExtent(%p, lpExtent=%p)\n", This, lpExtent);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -388,7 +393,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetExtent(ITextHost *iface, ...@@ -388,7 +393,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetExtent(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_OnTxCharFormatChange(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_OnTxCharFormatChange(ITextHost *iface,
const CHARFORMATW *pcf) const CHARFORMATW *pcf)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to OnTxCharFormatChange(%p, pcf=%p)\n", This, pcf); TRACECALL("Call to OnTxCharFormatChange(%p, pcf=%p)\n", This, pcf);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -396,7 +401,7 @@ static HRESULT WINAPI ITextHostImpl_OnTxCharFormatChange(ITextHost *iface, ...@@ -396,7 +401,7 @@ static HRESULT WINAPI ITextHostImpl_OnTxCharFormatChange(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_OnTxParaFormatChange(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_OnTxParaFormatChange(ITextHost *iface,
const PARAFORMAT *ppf) const PARAFORMAT *ppf)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to OnTxParaFormatChange(%p, ppf=%p)\n", This, ppf); TRACECALL("Call to OnTxParaFormatChange(%p, ppf=%p)\n", This, ppf);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -407,7 +412,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetPropertyBits(ITextHost *iface, ...@@ -407,7 +412,7 @@ static HRESULT WINAPI ITextHostImpl_TxGetPropertyBits(ITextHost *iface,
DWORD dwMask, DWORD dwMask,
DWORD *pdwBits) DWORD *pdwBits)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetPropertyBits(%p, dwMask=0x%08x, pdwBits=%p)\n", TRACECALL("Call to TxGetPropertyBits(%p, dwMask=0x%08x, pdwBits=%p)\n",
This, dwMask, pdwBits); This, dwMask, pdwBits);
*pdwBits = 0; *pdwBits = 0;
...@@ -417,21 +422,21 @@ static HRESULT WINAPI ITextHostImpl_TxGetPropertyBits(ITextHost *iface, ...@@ -417,21 +422,21 @@ static HRESULT WINAPI ITextHostImpl_TxGetPropertyBits(ITextHost *iface,
static HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface, DWORD iNotify, static HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface, DWORD iNotify,
void *pv) void *pv)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxNotify(%p, iNotify=%d, pv=%p)\n", This, iNotify, pv); TRACECALL("Call to TxNotify(%p, iNotify=%d, pv=%p)\n", This, iNotify, pv);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HIMC WINAPI ITextHostImpl_TxImmGetContext(ITextHost *iface) static HIMC WINAPI ITextHostImpl_TxImmGetContext(ITextHost *iface)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxImmGetContext(%p)\n", This); TRACECALL("Call to TxImmGetContext(%p)\n", This);
return 0; return 0;
} }
static void WINAPI ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc) static void WINAPI ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxImmReleaseContext(%p, himc=%p)\n", This, himc); TRACECALL("Call to TxImmReleaseContext(%p, himc=%p)\n", This, himc);
} }
...@@ -441,7 +446,7 @@ static void WINAPI ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc ...@@ -441,7 +446,7 @@ static void WINAPI ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc
static HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface, static HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface,
LONG *lSelBarWidth) LONG *lSelBarWidth)
{ {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface; ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetSelectionBarWidth(%p, lSelBarWidth=%p)\n", TRACECALL("Call to TxGetSelectionBarWidth(%p, lSelBarWidth=%p)\n",
This, lSelBarWidth); This, lSelBarWidth);
*lSelBarWidth = 0; *lSelBarWidth = 0;
...@@ -604,14 +609,14 @@ static BOOL init_texthost(void) ...@@ -604,14 +609,14 @@ static BOOL init_texthost(void)
skip("Insufficient memory to create ITextHost interface\n"); skip("Insufficient memory to create ITextHost interface\n");
return FALSE; return FALSE;
} }
dummyTextHost->lpVtbl = &itextHostVtbl; dummyTextHost->ITextHost_iface.lpVtbl = &itextHostVtbl;
dummyTextHost->refCount = 1; dummyTextHost->refCount = 1;
/* MSDN states that an IUnknown object is returned by /* MSDN states that an IUnknown object is returned by
CreateTextServices which is then queried to obtain a CreateTextServices which is then queried to obtain a
ITextServices object. */ ITextServices object. */
pCreateTextServices = (void*)GetProcAddress(hmoduleRichEdit, "CreateTextServices"); pCreateTextServices = (void*)GetProcAddress(hmoduleRichEdit, "CreateTextServices");
result = (*pCreateTextServices)(NULL,(ITextHost*)dummyTextHost, &init); result = (*pCreateTextServices)(NULL, &dummyTextHost->ITextHost_iface, &init);
ok(result == S_OK, "Did not return S_OK when created (result = %x)\n", result); ok(result == S_OK, "Did not return S_OK when created (result = %x)\n", result);
if (result != S_OK) { if (result != S_OK) {
CoTaskMemFree(dummyTextHost); CoTaskMemFree(dummyTextHost);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment