riched20/tests: Lock hGlobal before use.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
29b1a498aa
commit
f9c8c95856
|
@ -3252,7 +3252,7 @@ static void test_InsertObject(void)
|
||||||
REOBJECT reo1, reo2, reo3, received_reo;
|
REOBJECT reo1, reo2, reo3, received_reo;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
const WCHAR *expected_string;
|
const WCHAR *expected_string, *string;
|
||||||
const CHAR *expected_stringA;
|
const CHAR *expected_stringA;
|
||||||
ITextSelection *selection;
|
ITextSelection *selection;
|
||||||
IDataObject *dataobject;
|
IDataObject *dataobject;
|
||||||
|
@ -3465,8 +3465,10 @@ static void test_InsertObject(void)
|
||||||
formatetc.lindex = -1;
|
formatetc.lindex = -1;
|
||||||
hr = IDataObject_GetData(dataobject, &formatetc, &stgmedium);
|
hr = IDataObject_GetData(dataobject, &formatetc, &stgmedium);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
todo_wine ok(lstrlenW(stgmedium.hGlobal) == lstrlenW(expected_string), "Got wrong length: %d.\n", result);
|
string = GlobalLock(stgmedium.hGlobal);
|
||||||
todo_wine ok(!lstrcmpW(stgmedium.hGlobal, expected_string), "Got wrong content: %s.\n", debugstr_w(stgmedium.hGlobal));
|
ok(lstrlenW(string) == lstrlenW(expected_string), "Got wrong length: %d.\n", lstrlenW(string));
|
||||||
|
todo_wine ok(!lstrcmpW(string, expected_string), "Got wrong content: %s.\n", debugstr_w(string));
|
||||||
|
GlobalUnlock(stgmedium.hGlobal);
|
||||||
|
|
||||||
expected_string = L"abc\xfffc""d\xfffc""efg";
|
expected_string = L"abc\xfffc""d\xfffc""efg";
|
||||||
gettextex.cb = sizeof(buffer);
|
gettextex.cb = sizeof(buffer);
|
||||||
|
|
Loading…
Reference in New Issue