Commit 81fc69d7 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

riched20: Added IDispatch support.

parent 12a134fd
......@@ -2927,6 +2927,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
UnregisterClassW(REComboBox20W, 0);
LookupCleanup();
HeapDestroy (me_heap);
release_typelib();
break;
}
return TRUE;
......
......@@ -349,3 +349,5 @@ LRESULT ME_StreamOut(ME_TextEditor *editor, DWORD dwFormat, EDITSTREAM *stream)
/* clipboard.c */
HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start, int nChars, LPDATAOBJECT *lplpdataobj) DECLSPEC_HIDDEN;
void release_typelib(void) DECLSPEC_HIDDEN;
......@@ -1406,6 +1406,7 @@ static void test_dispatch(void)
WCHAR *nameW;
DISPID dispid;
HRESULT hr;
UINT count;
HWND hwnd;
create_interfaces(&hwnd, &reOle, &doc, NULL);
......@@ -1418,19 +1419,28 @@ static void test_dispatch(void)
dispid = 123;
nameW = (WCHAR*)testnameW;
hr = ITextRange_GetIDsOfNames(range, &IID_NULL, &nameW, 1, LOCALE_USER_DEFAULT, &dispid);
todo_wine {
ok(hr == DISP_E_UNKNOWNNAME, "got 0x%08x\n", hr);
ok(dispid == DISPID_UNKNOWN, "got %d\n", dispid);
}
dispid = 123;
nameW = (WCHAR*)testname2W;
hr = ITextRange_GetIDsOfNames(range, &IID_NULL, &nameW, 1, LOCALE_USER_DEFAULT, &dispid);
todo_wine {
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(dispid == DISPID_VALUE, "got %d\n", dispid);
}
ITextRange_Release(range);
release_interfaces(&hwnd, &reOle, &doc, NULL);
/* try dispatch methods on detached range */
hr = ITextRange_GetTypeInfoCount(range, &count);
ok(hr == S_OK, "got 0x%08x\n", hr);
dispid = 123;
nameW = (WCHAR*)testname2W;
hr = ITextRange_GetIDsOfNames(range, &IID_NULL, &nameW, 1, LOCALE_USER_DEFAULT, &dispid);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(dispid == DISPID_VALUE, "got %d\n", dispid);
ITextRange_Release(range);
}
static void test_ITextFont(void)
......
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