infosoft/tests: Fix the pfnFillTextBuffer() return value.
Windows Vista to Windows 10 1507 expect pfnFillTextBuffer() to return WBREAK_E_END_OF_TEXT to signal the end of the string. Returning unexpected values such as E_FAIL causes BreakText() to abort and report them to the caller. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50843 Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b2985803c2
commit
8ac9f334b4
|
@ -24,6 +24,7 @@
|
|||
#include <stdio.h>
|
||||
#include <ole2.h>
|
||||
#include "indexsrv.h"
|
||||
#include "cierror.h"
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
|
@ -141,7 +142,7 @@ static wordsink_impl wordsink = { { &wsvt } };
|
|||
|
||||
static HRESULT WINAPI fillbuf_none(TEXT_SOURCE *ts)
|
||||
{
|
||||
return E_FAIL;
|
||||
return WBREAK_E_END_OF_TEXT;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI fillbuf_many(TEXT_SOURCE *ts)
|
||||
|
@ -154,7 +155,7 @@ static HRESULT WINAPI fillbuf_many(TEXT_SOURCE *ts)
|
|||
ts->awcBuffer += ts->iCur;
|
||||
|
||||
if (!ts->awcBuffer[0])
|
||||
return E_FAIL;
|
||||
return WBREAK_E_END_OF_TEXT;
|
||||
|
||||
for( i=0; ts->awcBuffer[i] && ts->awcBuffer[i] != ' '; i++)
|
||||
;
|
||||
|
|
|
@ -19,6 +19,13 @@
|
|||
#ifndef __WINE_CIERROR_H__
|
||||
#define __WINE_CIERROR_H__
|
||||
|
||||
#define WBREAK_E_END_OF_TEXT 0x80041780
|
||||
#define LANGUAGE_S_LARGE_WORD 0x00041781
|
||||
#define WBREAK_E_QUERY_ONLY 0x80041782
|
||||
#define WBREAK_E_BUFFER_TOO_SMALL 0x80041783
|
||||
#define LANGUAGE_E_DATABASE_NOT_FOUND 0x80041784
|
||||
#define WBREAK_E_INIT_FAILED 0x80041785
|
||||
|
||||
#define CI_E_ALREADY_INITIALIZED 0x8004180a
|
||||
#define CI_E_NOT_INITIALIZED 0x8004180b
|
||||
#define CI_E_BUFFERTOOSMALL 0x8004180c
|
||||
|
|
Loading…
Reference in New Issue