Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
September 2018
- 70 participants
- 1549 messages
Re: [PATCH v3 4/6] shell32/autocomplete: Re-arrange some fields for better packing
by Alexandre Julliard
Gabriel Ivăncescu <gabrielopcode(a)gmail.com> writes:
> On Thu, Sep 27, 2018 at 4:08 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
>>
>> The basic rule is that you don't make changes unless there's a
>> reason. When things are simply a matter of taste and either way works
>> fine, the existing code should be left alone.
>>
>> --
>> Alexandre Julliard
>> julliard(a)winehq.org
>
> Yes but isn't a reason to possibly re-arrange it, when adding more
> fields (patch 5/6)? Of course, it changes the overall layout, so it
> won't just feel like it's built on top of each other, but rather like
> it fits and belongs better together. i.e. like it was "designed like
> this from the beginning" which is cleaner than trying to avoid to
> change existing fields in my opinion.
If it's necessary to make things easier to understand, yes. That doesn't
seem to be the case here.
The important resource here is not a few bytes of memory or a couple of
CPU cycles, it's developer's time. Making unnecessary changes has a cost
in brain cycles, when reviewing the patch, when searching through the
history, and when trying to understand why things are done a certain
way. Please keep that in mind.
--
Alexandre Julliard
julliard(a)winehq.org
Sept. 27, 2018
Re: [PATCH 1/2] msi/tests: SQLGetInstalledDrivers fails if there are no ODBC drivers installed.
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=42605
Your paranoid android.
=== w7u (32 bit Windows report) ===
msi:
action: Timeout
=== w7u (32 bit Windows report) ===
msi:
install: Timeout
=== w7u (task log) ===
Task errors:
The task timed out
=== w7u (32 bit Windows report) ===
msi:
msi: Timeout
=== debian9 (build log) ===
Sept. 27, 2018
[PATCH v6 3/3] msftedit: Add tests for interfaces.
by Jactry Zeng
Superseded patch 151812.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
configure | 1 +
configure.ac | 1 +
dlls/msftedit/tests/Makefile.in | 5 +
dlls/msftedit/tests/richole.c | 190 ++++++++++++++++++++++++++++++++
4 files changed, 197 insertions(+)
create mode 100644 dlls/msftedit/tests/Makefile.in
create mode 100644 dlls/msftedit/tests/richole.c
diff --git a/configure b/configure
index 657ff9ae83..dbdf5d0499 100755
--- a/configure
+++ b/configure
@@ -19595,6 +19595,7 @@ wine_fn_config_makefile dlls/msdmo enable_msdmo
wine_fn_config_makefile dlls/msdmo/tests enable_tests
wine_fn_config_makefile dlls/msdrm enable_msdrm
wine_fn_config_makefile dlls/msftedit enable_msftedit
+wine_fn_config_makefile dlls/msftedit/tests enable_tests
wine_fn_config_makefile dlls/msg711.acm enable_msg711_acm
wine_fn_config_makefile dlls/msgsm32.acm enable_msgsm32_acm
wine_fn_config_makefile dlls/mshtml.tlb enable_mshtml_tlb
diff --git a/configure.ac b/configure.ac
index 6936a71b6f..0566cfd30c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3451,6 +3451,7 @@ WINE_CONFIG_MAKEFILE(dlls/msdmo)
WINE_CONFIG_MAKEFILE(dlls/msdmo/tests)
WINE_CONFIG_MAKEFILE(dlls/msdrm)
WINE_CONFIG_MAKEFILE(dlls/msftedit)
+WINE_CONFIG_MAKEFILE(dlls/msftedit/tests)
WINE_CONFIG_MAKEFILE(dlls/msg711.acm)
WINE_CONFIG_MAKEFILE(dlls/msgsm32.acm)
WINE_CONFIG_MAKEFILE(dlls/mshtml.tlb)
diff --git a/dlls/msftedit/tests/Makefile.in b/dlls/msftedit/tests/Makefile.in
new file mode 100644
index 0000000000..99cc46a007
--- /dev/null
+++ b/dlls/msftedit/tests/Makefile.in
@@ -0,0 +1,5 @@
+TESTDLL = msftedit.dll
+IMPORTS = ole32 oleaut32 user32
+
+C_SRCS = \
+ richole.c
diff --git a/dlls/msftedit/tests/richole.c b/dlls/msftedit/tests/richole.c
new file mode 100644
index 0000000000..f7347a2234
--- /dev/null
+++ b/dlls/msftedit/tests/richole.c
@@ -0,0 +1,190 @@
+/*
+ * Tests for IRichEditOle and friends.
+ *
+ * Copyright 2008 Google (Dan Hipschman)
+ * Copyright 2018 Jactry Zeng for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define COBJMACROS
+
+#include <stdarg.h>
+
+#include <windef.h>
+#include <winbase.h>
+#include <initguid.h>
+#include <ole2.h>
+#include <richedit.h>
+#include <richole.h>
+#include <tom.h>
+#include <wine/test.h>
+
+static HMODULE msftedit_hmodule;
+
+#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
+static void _expect_ref(IUnknown* obj, ULONG ref, int line)
+{
+ ULONG rc;
+ IUnknown_AddRef(obj);
+ rc = IUnknown_Release(obj);
+ ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d.\n", ref, rc);
+}
+
+static HWND new_window(LPCWSTR classname, DWORD dwstyle, HWND parent)
+{
+ HWND hwnd = CreateWindowW(classname, NULL,
+ dwstyle | WS_POPUP | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE,
+ 0, 0, 200, 60, parent, NULL, msftedit_hmodule, NULL);
+ ok(hwnd != NULL, "class: %s, error: %d.\n", wine_dbgstr_w(classname), (int) GetLastError());
+ return hwnd;
+}
+
+static void test_Interfaces(void)
+{
+ IRichEditOle *reole = NULL, *reole1 = NULL;
+ ITextDocument *txtdoc = NULL;
+ ITextDocument2Old *txtdoc2old = NULL;
+ ITextDocument2 *txtdoc2 = NULL;
+ ITextSelection *txtsel = NULL, *txtsel2;
+ IUnknown *punk;
+ HRESULT hres;
+ LRESULT res;
+ HWND hwnd;
+ ULONG refcount;
+
+ hwnd = new_window(MSFTEDIT_CLASS, ES_MULTILINE, NULL);
+ if (!hwnd)
+ {
+ skip("Couldn't create window.\n");
+ return;
+ }
+
+ res = SendMessageA(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&reole);
+ ok(res, "SendMessage\n");
+ ok(reole != NULL, "EM_GETOLEINTERFACE\n");
+ EXPECT_REF(reole, 2);
+
+ res = SendMessageA(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&reole1);
+ ok(res == 1, "SendMessage\n");
+ ok(reole1 == reole, "Should not return a new IRichEditOle interface.\n");
+ EXPECT_REF(reole, 3);
+
+ hres = IRichEditOle_QueryInterface(reole, &IID_ITextDocument, (void **)&txtdoc);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface failed: 0x%08x.\n", hres);
+ ok(txtdoc != NULL, "IRichEditOle_QueryInterface\n");
+
+ hres = ITextDocument_GetSelection(txtdoc, NULL);
+ ok(hres == E_INVALIDARG, "ITextDocument_GetSelection: 0x%08x.\n", hres);
+
+ EXPECT_REF(txtdoc, 4);
+
+ hres = ITextDocument_GetSelection(txtdoc, &txtsel);
+ ok(hres == S_OK, "ITextDocument_GetSelection failed 0x%08x.\n", hres);
+
+ EXPECT_REF(txtdoc, 4);
+ EXPECT_REF(txtsel, 2);
+
+ hres = ITextDocument_GetSelection(txtdoc, &txtsel2);
+ ok(hres == S_OK, "ITextDocument_GetSelection failed: 0x%08x.\n", hres);
+ ok(txtsel2 == txtsel, "got %p, %p\n", txtsel, txtsel2);
+
+ EXPECT_REF(txtdoc, 4);
+ EXPECT_REF(txtsel, 3);
+
+ ITextSelection_Release(txtsel2);
+
+ punk = NULL;
+ hres = ITextSelection_QueryInterface(txtsel, &IID_ITextSelection, (void **)&punk);
+ ok(hres == S_OK, "ITextSelection_QueryInterface failed: 0x%08x.\n", hres);
+ ok(punk != NULL, "ITextSelection_QueryInterface\n");
+ IUnknown_Release(punk);
+
+ punk = NULL;
+ hres = ITextSelection_QueryInterface(txtsel, &IID_ITextRange, (void **)&punk);
+ ok(hres == S_OK, "ITextSelection_QueryInterface failed: 0x%08x.\n", hres);
+ ok(punk != NULL, "ITextSelection_QueryInterface\n");
+ IUnknown_Release(punk);
+
+ punk = NULL;
+ hres = ITextSelection_QueryInterface(txtsel, &IID_IDispatch, (void **)&punk);
+ ok(hres == S_OK, "ITextSelection_QueryInterface failed: 0x%08x.\n", hres);
+ ok(punk != NULL, "ITextSelection_QueryInterface\n");
+ IUnknown_Release(punk);
+
+ punk = NULL;
+ hres = IRichEditOle_QueryInterface(reole, &IID_IOleClientSite, (void **)&punk);
+ ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface: 0x%08x.\n", hres);
+
+ punk = NULL;
+ hres = IRichEditOle_QueryInterface(reole, &IID_IOleWindow, (void **)&punk);
+ ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface: 0x%08x.\n", hres);
+
+ punk = NULL;
+ hres = IRichEditOle_QueryInterface(reole, &IID_IOleInPlaceSite, (void **)&punk);
+ ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface: 0x%08x.\n", hres);
+
+ /* ITextDocument2 is implemented on msftedit after win8 for superseding ITextDocument2Old */
+ hres = IRichEditOle_QueryInterface(reole, &IID_ITextDocument2, (void **)&txtdoc2);
+ ok(hres == S_OK ||
+ hres == E_NOINTERFACE /* before win8 */, "IRichEditOle_QueryInterface: 0x%08x.\n", hres);
+ if (hres != E_NOINTERFACE)
+ {
+ ok(txtdoc2 != NULL, "IRichEditOle_QueryInterface\n");
+ ok((ITextDocument *)txtdoc2 == txtdoc, "Interface pointer isn't equal.\n");
+ EXPECT_REF(txtdoc2, 5);
+ EXPECT_REF(reole, 5);
+
+ hres = ITextDocument2_QueryInterface(txtdoc2, &IID_ITextDocument2Old, (void **)&txtdoc2old);
+ ok(hres == S_OK, "ITextDocument2_QueryInterface failed: 0x%08x.\n", hres);
+ ok((ITextDocument *)txtdoc2old != txtdoc, "Interface pointer is equal.\n");
+ EXPECT_REF(txtdoc2, 5);
+ EXPECT_REF(reole, 5);
+ EXPECT_REF(txtdoc2old, 1);
+ ITextDocument2Old_Release(txtdoc2old);
+ ITextDocument2_Release(txtdoc2);
+ }
+ else
+ {
+ hres = IRichEditOle_QueryInterface(reole, &IID_ITextDocument2Old, (void **)&txtdoc2old);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface failed: 0x%08x.\n", hres);
+ ok(txtdoc2old != NULL, "IRichEditOle_QueryInterface\n");
+ ok((ITextDocument *)txtdoc2old == txtdoc, "Interface pointer is equal.\n");
+ EXPECT_REF(txtdoc2old, 5);
+ EXPECT_REF(reole, 5);
+ ITextDocument2Old_Release(txtdoc2old);
+ }
+
+ ITextDocument_Release(txtdoc);
+ IRichEditOle_Release(reole);
+ refcount = IRichEditOle_Release(reole);
+ ok(refcount == 1, "Got wrong ref count: %d.\n", refcount);
+ DestroyWindow(hwnd);
+
+ /* Methods should return CO_E_RELEASED if the backing document has
+ been released. One test should suffice. */
+ hres = ITextSelection_CanEdit(txtsel, NULL);
+ ok(hres == CO_E_RELEASED, "ITextSelection after ITextDocument destroyed\n");
+
+ ITextSelection_Release(txtsel);
+}
+
+START_TEST(richole)
+{
+ msftedit_hmodule = LoadLibraryA("msftedit.dll");
+ ok(msftedit_hmodule != NULL, "error: %d\n", (int) GetLastError());
+
+ test_Interfaces();
+}
--
2.19.0
Sept. 27, 2018
[PATCH v6 2/3] riched20: Add stub for ITextDocument2Old interface.
by Jactry Zeng
Superseded patch 151810 and 151811.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
dlls/riched20/editor.h | 2 +-
dlls/riched20/richole.c | 435 ++++++++++++++++++++++++----------
dlls/riched20/tests/richole.c | 50 ++++
dlls/riched20/tests/txtsrv.c | 34 +++
dlls/riched20/txtsrv.c | 7 +-
5 files changed, 398 insertions(+), 130 deletions(-)
diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
index 141c63aca9..eba6d35fc7 100644
--- a/dlls/riched20/editor.h
+++ b/dlls/riched20/editor.h
@@ -233,7 +233,7 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run* run, BOOL selected) DECLSPE
void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize) DECLSPEC_HIDDEN;
void ME_CopyReObject(REOBJECT *dst, const REOBJECT *src, DWORD flags) DECLSPEC_HIDDEN;
void ME_DeleteReObject(struct re_object *re_object) DECLSPEC_HIDDEN;
-void ME_GetITextDocumentInterface(IRichEditOle *iface, LPVOID *ppvObj) DECLSPEC_HIDDEN;
+void ME_GetITextDocument2OldInterface(IRichEditOle *iface, LPVOID *ppvObj) DECLSPEC_HIDDEN;
/* editor.c */
ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) DECLSPEC_HIDDEN;
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 11b9920b57..dc1a3b8405 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -46,6 +46,7 @@ DEFINE_GUID(IID_ITextServices, 0x8d33f740, 0xcf58, 0x11ce, 0xa8, 0x9d, 0x00, 0xa
DEFINE_GUID(IID_ITextHost, 0x13e670f4,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1);
DEFINE_GUID(IID_ITextHost2, 0x13e670f5,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1);
DEFINE_GUID(IID_ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d);
+DEFINE_GUID(IID_ITextDocument2Old, 0x01c25500, 0x4268, 0x11d1, 0x88, 0x3a, 0x3c, 0x8b, 0x00, 0xc1, 0x00, 0x00);
DEFINE_GUID(IID_ITextRange, 0x8cc497c2, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d);
DEFINE_GUID(IID_ITextSelection, 0x8cc497c1, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d);
DEFINE_GUID(IID_ITextFont, 0x8cc497c3, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d);
@@ -208,7 +209,7 @@ enum range_update_op {
typedef struct IRichEditOleImpl {
IUnknown IUnknown_inner;
IRichEditOle IRichEditOle_iface;
- ITextDocument ITextDocument_iface;
+ ITextDocument2Old ITextDocument2Old_iface;
IUnknown *outer_unk;
LONG ref;
@@ -267,9 +268,9 @@ static inline IRichEditOleImpl *impl_from_IRichEditOle(IRichEditOle *iface)
return CONTAINING_RECORD(iface, IRichEditOleImpl, IRichEditOle_iface);
}
-static inline IRichEditOleImpl *impl_from_ITextDocument(ITextDocument *iface)
+static inline IRichEditOleImpl *impl_from_ITextDocument2Old(ITextDocument2Old *iface)
{
- return CONTAINING_RECORD(iface, IRichEditOleImpl, ITextDocument_iface);
+ return CONTAINING_RECORD(iface, IRichEditOleImpl, ITextDocument2Old_iface);
}
static inline IRichEditOleImpl *impl_from_IUnknown(IUnknown *iface)
@@ -943,8 +944,8 @@ static HRESULT WINAPI IRichEditOleImpl_inner_fnQueryInterface(IUnknown *iface, R
*ppvObj = &This->IUnknown_inner;
else if (IsEqualGUID(riid, &IID_IRichEditOle))
*ppvObj = &This->IRichEditOle_iface;
- else if (IsEqualGUID(riid, &IID_ITextDocument))
- *ppvObj = &This->ITextDocument_iface;
+ else if (IsEqualGUID(riid, &IID_ITextDocument) || IsEqualGUID(riid, &IID_ITextDocument2Old))
+ *ppvObj = &This->ITextDocument2Old_iface;
if (*ppvObj)
{
IUnknown_AddRef((IUnknown *)*ppvObj);
@@ -3859,43 +3860,38 @@ static HRESULT create_textpara(ITextRange *range, ITextPara **ret)
}
/* ITextDocument */
-static HRESULT WINAPI
-ITextDocument_fnQueryInterface(ITextDocument* me, REFIID riid,
- void** ppvObject)
+static HRESULT WINAPI ITextDocument2Old_fnQueryInterface(ITextDocument2Old* iface, REFIID riid,
+ void **ppvObject)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
return IRichEditOle_QueryInterface(&This->IRichEditOle_iface, riid, ppvObject);
}
-static ULONG WINAPI
-ITextDocument_fnAddRef(ITextDocument* me)
+static ULONG WINAPI ITextDocument2Old_fnAddRef(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
return IRichEditOle_AddRef(&This->IRichEditOle_iface);
}
-static ULONG WINAPI
-ITextDocument_fnRelease(ITextDocument* me)
+static ULONG WINAPI ITextDocument2Old_fnRelease(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
return IRichEditOle_Release(&This->IRichEditOle_iface);
}
-static HRESULT WINAPI
-ITextDocument_fnGetTypeInfoCount(ITextDocument* me,
- UINT* pctinfo)
+static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfoCount(ITextDocument2Old *iface,
+ UINT *pctinfo)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
TRACE("(%p)->(%p)\n", This, pctinfo);
*pctinfo = 1;
return S_OK;
}
-static HRESULT WINAPI
-ITextDocument_fnGetTypeInfo(ITextDocument* me, UINT iTInfo, LCID lcid,
- ITypeInfo** ppTInfo)
+static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfo(ITextDocument2Old *iface, UINT iTInfo, LCID lcid,
+ ITypeInfo **ppTInfo)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
HRESULT hr;
TRACE("(%p)->(%u,%d,%p)\n", This, iTInfo, lcid, ppTInfo);
@@ -3906,11 +3902,11 @@ ITextDocument_fnGetTypeInfo(ITextDocument* me, UINT iTInfo, LCID lcid,
return hr;
}
-static HRESULT WINAPI
-ITextDocument_fnGetIDsOfNames(ITextDocument* me, REFIID riid,
- LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId)
+static HRESULT WINAPI ITextDocument2Old_fnGetIDsOfNames(ITextDocument2Old *iface, REFIID riid,
+ LPOLESTR *rgszNames, UINT cNames,
+ LCID lcid, DISPID *rgDispId)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
ITypeInfo *ti;
HRESULT hr;
@@ -3923,12 +3919,12 @@ ITextDocument_fnGetIDsOfNames(ITextDocument* me, REFIID riid,
return hr;
}
-static HRESULT WINAPI
-ITextDocument_fnInvoke(ITextDocument* me, DISPID dispIdMember,
- REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams,
- VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr)
+static HRESULT WINAPI ITextDocument2Old_fnInvoke(ITextDocument2Old *iface, DISPID dispIdMember,
+ REFIID riid, LCID lcid, WORD wFlags,
+ DISPPARAMS *pDispParams, VARIANT *pVarResult,
+ EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
ITypeInfo *ti;
HRESULT hr;
@@ -3938,24 +3934,22 @@ ITextDocument_fnInvoke(ITextDocument* me, DISPID dispIdMember,
hr = get_typeinfo(ITextDocument_tid, &ti);
if (SUCCEEDED(hr))
- hr = ITypeInfo_Invoke(ti, me, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(ti, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
return hr;
}
-static HRESULT WINAPI
-ITextDocument_fnGetName(ITextDocument* me, BSTR* pName)
+static HRESULT WINAPI ITextDocument2Old_fnGetName(ITextDocument2Old *iface, BSTR *pName)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnGetSelection(ITextDocument *me, ITextSelection **selection)
+static HRESULT WINAPI ITextDocument2Old_fnGetSelection(ITextDocument2Old *iface, ITextSelection **selection)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
- TRACE("(%p)->(%p)\n", me, selection);
+ TRACE("(%p)->(%p)\n", iface, selection);
if (!selection)
return E_INVALIDARG;
@@ -3973,125 +3967,110 @@ ITextDocument_fnGetSelection(ITextDocument *me, ITextSelection **selection)
return S_OK;
}
-static HRESULT WINAPI
-ITextDocument_fnGetStoryCount(ITextDocument* me, LONG* pCount)
+static HRESULT WINAPI ITextDocument2Old_fnGetStoryCount(ITextDocument2Old *iface, LONG *pCount)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnGetStoryRanges(ITextDocument* me,
- ITextStoryRanges** ppStories)
+static HRESULT WINAPI ITextDocument2Old_fnGetStoryRanges(ITextDocument2Old *iface,
+ ITextStoryRanges **ppStories)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnGetSaved(ITextDocument* me, LONG* pValue)
+static HRESULT WINAPI ITextDocument2Old_fnGetSaved(ITextDocument2Old *iface, LONG *pValue)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnSetSaved(ITextDocument* me, LONG Value)
+static HRESULT WINAPI ITextDocument2Old_fnSetSaved(ITextDocument2Old *iface, LONG Value)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnGetDefaultTabStop(ITextDocument* me, float* pValue)
+static HRESULT WINAPI ITextDocument2Old_fnGetDefaultTabStop(ITextDocument2Old *iface, float *pValue)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnSetDefaultTabStop(ITextDocument* me, float Value)
+static HRESULT WINAPI ITextDocument2Old_fnSetDefaultTabStop(ITextDocument2Old *iface, float Value)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnNew(ITextDocument* me)
+static HRESULT WINAPI ITextDocument2Old_fnNew(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnOpen(ITextDocument* me, VARIANT* pVar, LONG Flags,
- LONG CodePage)
+static HRESULT WINAPI ITextDocument2Old_fnOpen(ITextDocument2Old *iface, VARIANT *pVar,
+ LONG Flags, LONG CodePage)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnSave(ITextDocument* me, VARIANT* pVar, LONG Flags,
- LONG CodePage)
+static HRESULT WINAPI ITextDocument2Old_fnSave(ITextDocument2Old *iface, VARIANT *pVar,
+ LONG Flags, LONG CodePage)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnFreeze(ITextDocument* me, LONG* pCount)
+static HRESULT WINAPI ITextDocument2Old_fnFreeze(ITextDocument2Old *iface, LONG *pCount)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnUnfreeze(ITextDocument* me, LONG* pCount)
+static HRESULT WINAPI ITextDocument2Old_fnUnfreeze(ITextDocument2Old *iface, LONG *pCount)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnBeginEditCollection(ITextDocument* me)
+static HRESULT WINAPI ITextDocument2Old_fnBeginEditCollection(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnEndEditCollection(ITextDocument* me)
+static HRESULT WINAPI ITextDocument2Old_fnEndEditCollection(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnUndo(ITextDocument* me, LONG Count, LONG* prop)
+static HRESULT WINAPI ITextDocument2Old_fnUndo(ITextDocument2Old *iface, LONG Count, LONG *prop)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnRedo(ITextDocument* me, LONG Count, LONG* prop)
+static HRESULT WINAPI ITextDocument2Old_fnRedo(ITextDocument2Old *iface, LONG Count, LONG *prop)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
@@ -4112,11 +4091,10 @@ static HRESULT CreateITextRange(IRichEditOleImpl *reOle, LONG start, LONG end, I
return S_OK;
}
-static HRESULT WINAPI
-ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2,
- ITextRange** ppRange)
+static HRESULT WINAPI ITextDocument2Old_fnRange(ITextDocument2Old *iface, LONG cp1, LONG cp2,
+ ITextRange **ppRange)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
const int len = ME_GetTextLength(This->editor) + 1;
TRACE("%p %p %d %d\n", This, ppRange, cp1, cp2);
@@ -4140,42 +4118,247 @@ ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2,
return CreateITextRange(This, cp1, cp2, ppRange);
}
-static HRESULT WINAPI
-ITextDocument_fnRangeFromPoint(ITextDocument* me, LONG x, LONG y,
- ITextRange** ppRange)
+static HRESULT WINAPI ITextDocument2Old_fnRangeFromPoint(ITextDocument2Old *iface, LONG x, LONG y,
+ ITextRange **ppRange)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static const ITextDocumentVtbl tdvt = {
- ITextDocument_fnQueryInterface,
- ITextDocument_fnAddRef,
- ITextDocument_fnRelease,
- ITextDocument_fnGetTypeInfoCount,
- ITextDocument_fnGetTypeInfo,
- ITextDocument_fnGetIDsOfNames,
- ITextDocument_fnInvoke,
- ITextDocument_fnGetName,
- ITextDocument_fnGetSelection,
- ITextDocument_fnGetStoryCount,
- ITextDocument_fnGetStoryRanges,
- ITextDocument_fnGetSaved,
- ITextDocument_fnSetSaved,
- ITextDocument_fnGetDefaultTabStop,
- ITextDocument_fnSetDefaultTabStop,
- ITextDocument_fnNew,
- ITextDocument_fnOpen,
- ITextDocument_fnSave,
- ITextDocument_fnFreeze,
- ITextDocument_fnUnfreeze,
- ITextDocument_fnBeginEditCollection,
- ITextDocument_fnEndEditCollection,
- ITextDocument_fnUndo,
- ITextDocument_fnRedo,
- ITextDocument_fnRange,
- ITextDocument_fnRangeFromPoint
+/* ITextDocument2Old methods */
+static HRESULT WINAPI ITextDocument2Old_fnAttachMsgFilter(ITextDocument2Old *iface, IUnknown *filter)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, filter);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnSetEffectColor(ITextDocument2Old *iface, LONG index, COLORREF cr)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, 0x%x): stub\n", This, index, cr);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetEffectColor(ITextDocument2Old *iface, LONG index, COLORREF *cr)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, %p): stub\n", This, index, cr);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetCaretType(ITextDocument2Old *iface, LONG *type)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, type);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnSetCaretType(ITextDocument2Old *iface, LONG type)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d): stub\n", This, type);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetImmContext(ITextDocument2Old *iface, LONG *context)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, context);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnReleaseImmContext(ITextDocument2Old *iface, LONG context)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d): stub\n", This, context);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetPreferredFont(ITextDocument2Old *iface, LONG cp, LONG charrep,
+ LONG options, LONG current_charrep, LONG current_fontsize,
+ BSTR *bstr, LONG *pitch_family, LONG *new_fontsize)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, %d, %d, %d, %d, %p, %p, %p): stub\n", This, cp, charrep, options, current_charrep,
+ current_fontsize, bstr, pitch_family, new_fontsize);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetNotificationMode(ITextDocument2Old *iface, LONG *mode)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, mode);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnSetNotificationMode(ITextDocument2Old *iface, LONG mode)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(0x%x): stub\n", This, mode);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetClientRect(ITextDocument2Old *iface, LONG type, LONG *left, LONG *top,
+ LONG *right, LONG *bottom)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, %p, %p, %p, %p): stub\n", This, type, left, top, right, bottom);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetSelectionEx(ITextDocument2Old *iface, ITextSelection **selection)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, selection);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetWindow(ITextDocument2Old *iface, LONG *hwnd)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, hwnd);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetFEFlags(ITextDocument2Old *iface, LONG *flags)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, flags);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnUpdateWindow(ITextDocument2Old *iface)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p): stub\n", This);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnCheckTextLimit(ITextDocument2Old *iface, LONG cch, LONG *exceed)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, %p): stub\n", This, cch, exceed);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnIMEInProgress(ITextDocument2Old *iface, LONG mode)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(0x%x): stub\n", This, mode);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnSysBeep(ITextDocument2Old *iface)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p): stub\n", This);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnUpdate(ITextDocument2Old *iface, LONG mode)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(0x%x): stub\n", This, mode);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnNotify(ITextDocument2Old *iface, LONG notify)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d): stub\n", This, notify);
+
+ return E_NOTIMPL;
+}
+
+static const ITextDocument2OldVtbl tdvt = {
+ ITextDocument2Old_fnQueryInterface,
+ ITextDocument2Old_fnAddRef,
+ ITextDocument2Old_fnRelease,
+ ITextDocument2Old_fnGetTypeInfoCount,
+ ITextDocument2Old_fnGetTypeInfo,
+ ITextDocument2Old_fnGetIDsOfNames,
+ ITextDocument2Old_fnInvoke,
+ ITextDocument2Old_fnGetName,
+ ITextDocument2Old_fnGetSelection,
+ ITextDocument2Old_fnGetStoryCount,
+ ITextDocument2Old_fnGetStoryRanges,
+ ITextDocument2Old_fnGetSaved,
+ ITextDocument2Old_fnSetSaved,
+ ITextDocument2Old_fnGetDefaultTabStop,
+ ITextDocument2Old_fnSetDefaultTabStop,
+ ITextDocument2Old_fnNew,
+ ITextDocument2Old_fnOpen,
+ ITextDocument2Old_fnSave,
+ ITextDocument2Old_fnFreeze,
+ ITextDocument2Old_fnUnfreeze,
+ ITextDocument2Old_fnBeginEditCollection,
+ ITextDocument2Old_fnEndEditCollection,
+ ITextDocument2Old_fnUndo,
+ ITextDocument2Old_fnRedo,
+ ITextDocument2Old_fnRange,
+ ITextDocument2Old_fnRangeFromPoint,
+ /* ITextDocument2Old methods */
+ ITextDocument2Old_fnAttachMsgFilter,
+ ITextDocument2Old_fnSetEffectColor,
+ ITextDocument2Old_fnGetEffectColor,
+ ITextDocument2Old_fnGetCaretType,
+ ITextDocument2Old_fnSetCaretType,
+ ITextDocument2Old_fnGetImmContext,
+ ITextDocument2Old_fnReleaseImmContext,
+ ITextDocument2Old_fnGetPreferredFont,
+ ITextDocument2Old_fnGetNotificationMode,
+ ITextDocument2Old_fnSetNotificationMode,
+ ITextDocument2Old_fnGetClientRect,
+ ITextDocument2Old_fnGetSelectionEx,
+ ITextDocument2Old_fnGetWindow,
+ ITextDocument2Old_fnGetFEFlags,
+ ITextDocument2Old_fnUpdateWindow,
+ ITextDocument2Old_fnCheckTextLimit,
+ ITextDocument2Old_fnIMEInProgress,
+ ITextDocument2Old_fnSysBeep,
+ ITextDocument2Old_fnUpdate,
+ ITextDocument2Old_fnNotify
};
/* ITextSelection */
@@ -5276,7 +5459,7 @@ LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *p
reo->IUnknown_inner.lpVtbl = &reo_unk_vtbl;
reo->IRichEditOle_iface.lpVtbl = &revt;
- reo->ITextDocument_iface.lpVtbl = &tdvt;
+ reo->ITextDocument2Old_iface.lpVtbl = &tdvt;
reo->ref = 1;
reo->editor = editor;
reo->txtSel = NULL;
@@ -5509,8 +5692,8 @@ void ME_CopyReObject(REOBJECT *dst, const REOBJECT *src, DWORD flags)
}
}
-void ME_GetITextDocumentInterface(IRichEditOle *iface, LPVOID *ppvObj)
+void ME_GetITextDocument2OldInterface(IRichEditOle *iface, LPVOID *ppvObj)
{
IRichEditOleImpl *This = impl_from_IRichEditOle(iface);
- *ppvObj = &This->ITextDocument_iface;
+ *ppvObj = &This->ITextDocument2Old_iface;
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index aaf52bcfdd..d3ffdce4a7 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -113,10 +113,36 @@ static ULONG get_refcount(IUnknown *iface)
return IUnknown_Release(iface);
}
+#define CHECK_TYPEINFO(disp,expected_riid) _check_typeinfo((IDispatch *)disp, expected_riid, __LINE__)
+static void _check_typeinfo(IDispatch* disp, REFIID expected_riid, int line)
+{
+ ITypeInfo *typeinfo;
+ TYPEATTR *typeattr;
+ UINT count;
+ HRESULT hr;
+
+ count = 10;
+ hr = IDispatch_GetTypeInfoCount(disp, &count);
+ ok_(__FILE__,line)(hr == S_OK, "IDispatch_GetTypeInfoCount failed: 0x%08x.\n", hr);
+ ok_(__FILE__,line)(count == 1, "got wrong count: %u.\n", count);
+
+ hr = IDispatch_GetTypeInfo(disp, 0, LOCALE_SYSTEM_DEFAULT, &typeinfo);
+ ok_(__FILE__,line)(hr == S_OK, "IDispatch_GetTypeInfo failed: 0x%08x.\n", hr);
+
+ hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr);
+ ok_(__FILE__,line)(hr == S_OK, "ITypeInfo_GetTypeAttr failed: 0x%08x.\n", hr);
+ ok_(__FILE__,line)(IsEqualGUID(&typeattr->guid, expected_riid),
+ "Unexpected type guid: %s.\n", wine_dbgstr_guid(&typeattr->guid));
+
+ ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr);
+ ITypeInfo_Release(typeinfo);
+}
+
static void test_Interfaces(void)
{
IRichEditOle *reOle = NULL, *reOle1 = NULL;
ITextDocument *txtDoc = NULL;
+ ITextDocument2Old *txtDoc2Old = NULL;
ITextSelection *txtSel = NULL, *txtSel2;
IUnknown *punk;
HRESULT hres;
@@ -144,6 +170,7 @@ static void test_Interfaces(void)
(void **) &txtDoc);
ok(hres == S_OK, "IRichEditOle_QueryInterface\n");
ok(txtDoc != NULL, "IRichEditOle_QueryInterface\n");
+ CHECK_TYPEINFO(txtDoc, &IID_ITextDocument);
hres = ITextDocument_GetSelection(txtDoc, NULL);
ok(hres == E_INVALIDARG, "ITextDocument_GetSelection: 0x%x\n", hres);
@@ -195,6 +222,16 @@ static void test_Interfaces(void)
hres = IRichEditOle_QueryInterface(reOle, &IID_IOleInPlaceSite, (void **) &punk);
ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface\n");
+ hres = IRichEditOle_QueryInterface(reOle, &IID_ITextDocument2Old, (void **)&txtDoc2Old);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface\n");
+ ok(txtDoc2Old != NULL, "IRichEditOle_QueryInterface\n");
+ ok((ITextDocument *)txtDoc2Old == txtDoc, "interface pointer isn't equal.\n");
+ EXPECT_REF(txtDoc2Old, 5);
+ EXPECT_REF(reOle, 5);
+ CHECK_TYPEINFO(txtDoc2Old, &IID_ITextDocument);
+
+ ITextDocument2Old_Release(txtDoc2Old);
+
ITextDocument_Release(txtDoc);
IRichEditOle_Release(reOle);
refcount = IRichEditOle_Release(reOle);
@@ -207,6 +244,19 @@ static void test_Interfaces(void)
ok(hres == CO_E_RELEASED, "ITextSelection after ITextDocument destroyed\n");
ITextSelection_Release(txtSel);
+
+ w = new_richedit(NULL);
+ res = SendMessageA(w, EM_GETOLEINTERFACE, 0, (LPARAM)&reOle);
+ ok(res, "SendMessage\n");
+ ok(reOle != NULL, "EM_GETOLEINTERFACE\n");
+
+ hres = IRichEditOle_QueryInterface(reOle, &IID_ITextDocument2Old, (void **)&txtDoc2Old);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface failed: 0x%08x.\n", hres);
+ ok(txtDoc2Old != NULL, "IRichEditOle_QueryInterface\n");
+ CHECK_TYPEINFO(txtDoc2Old, &IID_ITextDocument);
+ ITextDocument2Old_Release(txtDoc2Old);
+ IRichEditOle_Release(reOle);
+ DestroyWindow(w);
}
static void test_ITextDocument_Open(void)
diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
index a8cf6ff1ad..1aa08f89a4 100644
--- a/dlls/riched20/tests/txtsrv.c
+++ b/dlls/riched20/tests/txtsrv.c
@@ -904,6 +904,7 @@ static void test_QueryInterface(void)
HRESULT hres;
IRichEditOle *reole, *txtsrv_reole;
ITextDocument *txtdoc, *txtsrv_txtdoc;
+ ITextDocument2Old *txtdoc2old, *txtsrv_txtdoc2old;
ULONG refcount;
if(!init_texthost(&txtserv, &host))
@@ -930,6 +931,17 @@ static void test_QueryInterface(void)
ITextDocument_Release(txtdoc);
refcount = get_refcount((IUnknown *)txtserv);
ok(refcount == 2, "got wrong ref count: %d\n", refcount);
+
+ hres = IRichEditOle_QueryInterface(txtsrv_reole, &IID_ITextDocument2Old, (void **)&txtdoc2old);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08x\n", hres);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 3, "got wrong ref count: %d\n", refcount);
+ refcount = get_refcount((IUnknown *)txtsrv_reole);
+ ok(refcount == 3, "got wrong ref count: %d\n", refcount);
+
+ ITextDocument2Old_Release(txtdoc2old);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 2, "got wrong ref count: %d\n", refcount);
IRichEditOle_Release(txtsrv_reole);
refcount = get_refcount((IUnknown *)txtserv);
ok(refcount == 1, "got wrong ref count: %d\n", refcount);
@@ -956,6 +968,28 @@ static void test_QueryInterface(void)
refcount = get_refcount((IUnknown *)txtserv);
ok(refcount == 1, "got wrong ref count: %d\n", refcount);
+ /* ITextDocument2Old */
+ hres = ITextServices_QueryInterface(txtserv, &IID_ITextDocument2Old, (void **)&txtsrv_txtdoc2old);
+ ok(hres == S_OK, "ITextServices_QueryInterface: 0x%08x\n", hres);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 2, "got wrong ref count: %d\n", refcount);
+ refcount = get_refcount((IUnknown *)txtsrv_txtdoc2old);
+ ok(refcount == 2, "got wrong ref count: %d\n", refcount);
+
+ hres = ITextDocument2Old_QueryInterface(txtsrv_txtdoc2old, &IID_IRichEditOle, (void **)&reole);
+ ok(hres == S_OK, "ITextDocument2Old_QueryInterface: 0x%08x\n", hres);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 3, "got wrong ref count: %d\n", refcount);
+ refcount = get_refcount((IUnknown *)txtsrv_txtdoc2old);
+ ok(refcount == 3, "got wrong ref count: %d\n", refcount);
+
+ IRichEditOle_Release(reole);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 2, "got wrong ref count: %d\n", refcount);
+ ITextDocument2Old_Release(txtsrv_txtdoc2old);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 1, "got wrong ref count: %d\n", refcount);
+
ITextServices_Release(txtserv);
ITextHost_Release(host);
}
diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
index ee65621b1d..cf957cff89 100644
--- a/dlls/riched20/txtsrv.c
+++ b/dlls/riched20/txtsrv.c
@@ -78,12 +78,13 @@ static HRESULT WINAPI ITextServicesImpl_QueryInterface(IUnknown *iface, REFIID r
*ppv = &This->IUnknown_inner;
else if (IsEqualIID(riid, &IID_ITextServices))
*ppv = &This->ITextServices_iface;
- else if (IsEqualIID(riid, &IID_IRichEditOle) || IsEqualIID(riid, &IID_ITextDocument)) {
+ else if (IsEqualIID(riid, &IID_IRichEditOle) || IsEqualIID(riid, &IID_ITextDocument) ||
+ IsEqualIID(riid, &IID_ITextDocument2Old)) {
if (!This->editor->reOle)
if (!CreateIRichEditOle(This->outer_unk, This->editor, (void **)(&This->editor->reOle)))
return E_OUTOFMEMORY;
- if (IsEqualIID(riid, &IID_ITextDocument))
- ME_GetITextDocumentInterface(This->editor->reOle, ppv);
+ if (IsEqualIID(riid, &IID_ITextDocument) || IsEqualIID(riid, &IID_ITextDocument2Old))
+ ME_GetITextDocument2OldInterface(This->editor->reOle, ppv);
else
*ppv = This->editor->reOle;
} else {
--
2.19.0
Sept. 27, 2018
[PATCH v6 1/3] include: Add ITextDocument2Old and ITextDocument2 interface.
by Jactry Zeng
Superseded patch 151809.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
include/tom.idl | 91 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/include/tom.idl b/include/tom.idl
index 357b0457a5..5c1fd6bd97 100644
--- a/include/tom.idl
+++ b/include/tom.idl
@@ -237,6 +237,97 @@ interface ITextDocument : IDispatch
HRESULT RangeFromPoint([in]LONG x, [in]LONG y, [retval, out]ITextRange **ppRange);
}
+[
+ object,
+ uuid(01c25500-4268-11d1-883a-3c8b00c10000)
+]
+interface ITextDocument2Old : ITextDocument
+{
+ HRESULT AttachMsgFilter([in]IUnknown *filter);
+ HRESULT SetEffectColor([in]LONG index, [in]COLORREF cr);
+ HRESULT GetEffectColor([in]LONG index, [out]COLORREF *cr);
+ HRESULT GetCaretType([retval, out]LONG *type);
+ HRESULT SetCaretType([in]LONG type);
+ HRESULT GetImmContext([retval, out]LONG *context);
+ HRESULT ReleaseImmContext([in]LONG context);
+ HRESULT GetPreferredFont([in]LONG cp, [in]LONG codepage, [in]LONG option, [in]LONG current_codepage, [in]LONG current_fontsize,
+ [out]BSTR *bstr, [out]LONG *pitch_family, [out]LONG *new_fontsize);
+ HRESULT GetNotificationMode([retval, out]LONG *mode);
+ HRESULT SetNotificationMode([in]LONG mode);
+ HRESULT GetClientRect([in]LONG type, [out]LONG *left, [out]LONG *top, [out]LONG *right, [out]LONG *bottom);
+ HRESULT GetSelectionEx([retval, out]ITextSelection **selection);
+ HRESULT GetWindow([out]LONG *hwnd);
+ HRESULT GetFEFlags([out]LONG *flags);
+ HRESULT UpdateWindow();
+ HRESULT CheckTextLimit([in]LONG cch, [out]LONG *exceed);
+ HRESULT IMEInProgress([in]LONG mode);
+ HRESULT SysBeep();
+ HRESULT Update([in]LONG mode);
+ HRESULT Notify([in]LONG notify);
+}
+
+interface ITextDisplays;
+interface ITextFont2;
+interface ITextPara2;
+interface ITextRange2;
+interface ITextSelection2;
+interface ITextStory;
+interface ITextStoryRanges2;
+interface ITextStrings;
+
+[
+ object,
+ uuid(c241f5e0-7206-11d8-a2c7-00a0d1d6c6b3)
+]
+interface ITextDocument2 : ITextDocument
+{
+ HRESULT GetCaretType([retval, out]LONG *value);
+ HRESULT SetCaretType([in]LONG value);
+ HRESULT GetDisplays([retval, out]ITextDisplays **displays);
+ HRESULT GetDocumentFont([retval, out]ITextFont2 **font);
+ HRESULT SetDocumentFont([in]ITextFont2 *font);
+ HRESULT GetDocumentPara([retval, out]ITextPara2 **para);
+ HRESULT SetDocumentPara([in]ITextPara2 *para);
+ HRESULT GetEastAsianFlags([retval, out]LONG *flags);
+ HRESULT GetGenerator([retval, out]BSTR *bstr);
+ HRESULT SetIMEInProgress([in]LONG value);
+ HRESULT GetNotificationMode([retval, out]LONG *mode);
+ HRESULT SetNotificationMode([in]LONG mode);
+ HRESULT GetSelection2([retval, out]ITextSelection2 **selection);
+ HRESULT GetStoryRanges2([retval, out]ITextStoryRanges2 **stories);
+ HRESULT GetTypographyOptions([retval, out]LONG *options);
+ HRESULT GetVersion([retval, out]LONG *value);
+ HRESULT GetWindow([retval, out]LONG *hwnd);
+ HRESULT AttachMsgFilter([in]IUnknown *filter);
+ HRESULT CheckTextLimit([in]LONG cch, [out]LONG *exceed);
+ HRESULT GetCallManager([retval, out]IUnknown **manager);
+ HRESULT GetClientRect([in]LONG type, [out]LONG *left, [out]LONG *top, [out]LONG *right, [out]LONG *bottom);
+ HRESULT GetEffectColor([in]LONG index, [out]COLORREF *cr);
+ HRESULT GetImmContext([retval, out]LONG *context);
+ HRESULT GetPreferredFont([in]LONG cp, [in]LONG codepage, [in]LONG option, [in]LONG current_codepage, [in]LONG current_fontsize,
+ [out]BSTR *bstr, [out]LONG *pitch_family, [out]LONG *new_fontsize);
+ HRESULT GetProperty([in]LONG type, [out]LONG *value);
+ HRESULT GetStrings([out]ITextStrings **strings);
+ HRESULT Notify([in]LONG notify);
+ HRESULT Range2([in]LONG cp_active, [in]LONG cp_anchor, [retval, out]ITextRange2 **range);
+ HRESULT RangeFromPoint2([in]LONG x, [in]LONG y, [in]LONG type, [retval, out]ITextRange2 **range);
+ HRESULT ReleaseCallManager([in]IUnknown *manager);
+ HRESULT ReleaseImmContext([in]LONG context);
+ HRESULT SetEffectColor([in]LONG index, [in]LONG value);
+ HRESULT SetProperty([in]LONG type, [in]LONG value);
+ HRESULT SetTypographyOptions([in]LONG options, [in]LONG mask);
+ HRESULT SysBeep();
+ HRESULT Update([in]LONG value);
+ HRESULT UpdateWindow();
+ HRESULT GetMathProperties([out]LONG *options);
+ HRESULT SetMathProperties([in]LONG options, [in]LONG mask);
+ HRESULT GetActiveStory([retval, out]ITextStory **story);
+ HRESULT SetActiveStory([in]ITextStory *story);
+ HRESULT GetMainStory([retval, out]ITextStory **story);
+ HRESULT GetNewStory([retval, out]ITextStory **story);
+ HRESULT GetStory([in]LONG index, [retval, out]ITextStory **story);
+}
+
interface ITextFont;
interface ITextPara;
--
2.19.0
Sept. 27, 2018
Re: [PATCH v3 4/6] shell32/autocomplete: Re-arrange some fields for better packing
by Gabriel Ivăncescu
On Thu, Sep 27, 2018 at 4:08 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
>
> The basic rule is that you don't make changes unless there's a
> reason. When things are simply a matter of taste and either way works
> fine, the existing code should be left alone.
>
> --
> Alexandre Julliard
> julliard(a)winehq.org
Yes but isn't a reason to possibly re-arrange it, when adding more
fields (patch 5/6)? Of course, it changes the overall layout, so it
won't just feel like it's built on top of each other, but rather like
it fits and belongs better together. i.e. like it was "designed like
this from the beginning" which is cleaner than trying to avoid to
change existing fields in my opinion.
Sept. 27, 2018
Re: [PATCH v3 4/6] shell32/autocomplete: Re-arrange some fields for better packing
by Alexandre Julliard
Gabriel Ivăncescu <gabrielopcode(a)gmail.com> writes:
> On Thu, Sep 27, 2018 at 2:18 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
>>
>> It's a gratuitous change, and in many cases would generate worse code
>> because of the need to manipulate bits. Losing a couple of padding bytes
>> here and there is not a problem that needs fixing.
>>
>> --
>> Alexandre Julliard
>> julliard(a)winehq.org
>
> Originally I didn't use bit fields, only converted them to BOOLEAN (1
> byte so all 3 along with UCHAR fit in just one 4-byte block).
>
> I was suggested to use bit fields, and it makes sense in this context
> so I think it's okay -- booleans on bit fields are efficient (only one
> instruction), there's no unpacking that has to be done and so on.
> (this only applies to 1-bit bit fields, i.e. booleans or flags)
>
> Of course this is totally minor but I even taking minor into account,
> despite this the minor CPU cache improvements outweight it, probably.
> Lastly, this opens up easier expansion into more boolean flags into
> the future (if needed) instead of having to use bitwise operators and
> #define.
>
> Sorry for long explanation, just want to give my reasoning.
The basic rule is that you don't make changes unless there's a
reason. When things are simply a matter of taste and either way works
fine, the existing code should be left alone.
--
Alexandre Julliard
julliard(a)winehq.org
Sept. 27, 2018
[PATCH 2/2] msi: Add support for ARPNOMODIFY, APRNOREMOVE and ARPNOREPAIR.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msi/action.c | 66 ++++++++++++++++++++++++++++++++++++-------------
dlls/msi/tests/action.c | 51 +++++++++++++++++++++++---------------
2 files changed, 80 insertions(+), 37 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 0d6da3e2cc..f2a038bc41 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -5177,19 +5177,8 @@ static UINT ACTION_UnpublishFeatures(MSIPACKAGE *package)
static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
{
- SYSTEMTIME systime;
- DWORD size, langid;
- WCHAR date[9], *val, *buffer;
- const WCHAR *prop, *key;
-
- static const WCHAR date_fmt[] = {'%','i','%','0','2','i','%','0','2','i',0};
- static const WCHAR modpath_fmt[] =
- {'M','s','i','E','x','e','c','.','e','x','e',' ',
- '/','I','[','P','r','o','d','u','c','t','C','o','d','e',']',0};
- static const WCHAR szModifyPath[] =
- {'M','o','d','i','f','y','P','a','t','h',0};
- static const WCHAR szUninstallString[] =
- {'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0};
+ static const WCHAR date_fmt[] =
+ {'%','i','%','0','2','i','%','0','2','i',0};
static const WCHAR szEstimatedSize[] =
{'E','s','t','i','m','a','t','e','d','S','i','z','e',0};
static const WCHAR szDisplayVersion[] =
@@ -5246,6 +5235,18 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
{'A','R','P','S','Y','S','T','E','M','C','O','M','P','O','N','E','N','T',0};
static const WCHAR szSystemComponent[] =
{'S','y','s','t','e','m','C','o','m','p','o','n','e','n','t',0};
+ static const WCHAR szARPNOMODIFY[] =
+ {'A','R','P','N','O','M','O','D','I','F','Y',0};
+ static const WCHAR szNoModify[] =
+ {'N','o','M','o','d','i','f','y',0};
+ static const WCHAR szARPNOREMOVE[] =
+ {'A','R','P','N','O','R','E','M','O','V','E',0};
+ static const WCHAR szNoRemove[] =
+ {'N','o','R','e','m','o','v','e',0};
+ static const WCHAR szARPNOREPAIR[] =
+ {'A','R','P','N','O','R','E','P','A','I','R',0};
+ static const WCHAR szNoRepair[] =
+ {'N','o','R','e','p','a','i','r',0};
static const WCHAR *propval[] = {
szARPAUTHORIZEDCDFPREFIX, szAuthorizedCDFPrefix,
@@ -5264,6 +5265,10 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
NULL
};
const WCHAR **p = propval;
+ SYSTEMTIME systime;
+ DWORD size, langid;
+ WCHAR date[9], *val, *buffer;
+ const WCHAR *prop, *key;
while (*p)
{
@@ -5279,10 +5284,37 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
{
msi_reg_set_val_dword( hkey, szSystemComponent, 1 );
}
- size = deformat_string(package, modpath_fmt, &buffer) * sizeof(WCHAR);
- RegSetValueExW(hkey, szModifyPath, 0, REG_EXPAND_SZ, (LPBYTE)buffer, size);
- RegSetValueExW(hkey, szUninstallString, 0, REG_EXPAND_SZ, (LPBYTE)buffer, size);
- msi_free(buffer);
+
+ if (msi_get_property_int( package->db, szARPNOREMOVE, 0 ))
+ msi_reg_set_val_dword( hkey, szNoRemove, 1 );
+ else
+ {
+ static const WCHAR fmt_install[] =
+ {'M','s','i','E','x','e','c','.','e','x','e',' ',
+ '/','I','[','P','r','o','d','u','c','t','C','o','d','e',']',0};
+ static const WCHAR fmt_uninstall[] =
+ {'M','s','i','E','x','e','c','.','e','x','e',' ',
+ '/','X','[','P','r','o','d','u','c','t','C','o','d','e',']',0};
+ static const WCHAR szModifyPath[] =
+ {'M','o','d','i','f','y','P','a','t','h',0};
+ static const WCHAR szUninstallString[] =
+ {'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0};
+ const WCHAR *fmt = fmt_install;
+
+ if (msi_get_property_int( package->db, szARPNOREPAIR, 0 ))
+ msi_reg_set_val_dword( hkey, szNoRepair, 1 );
+
+ if (msi_get_property_int( package->db, szARPNOMODIFY, 0 ))
+ {
+ msi_reg_set_val_dword( hkey, szNoModify, 1 );
+ fmt = fmt_uninstall;
+ }
+
+ size = deformat_string(package, fmt, &buffer) * sizeof(WCHAR);
+ RegSetValueExW(hkey, szModifyPath, 0, REG_EXPAND_SZ, (LPBYTE)buffer, size);
+ RegSetValueExW(hkey, szUninstallString, 0, REG_EXPAND_SZ, (LPBYTE)buffer, size);
+ msi_free(buffer);
+ }
/* FIXME: Write real Estimated Size when we have it */
msi_reg_set_val_dword(hkey, szEstimatedSize, 0);
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 084dbe4532..951b89cad2 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -182,6 +182,7 @@ static const char property_dat[] =
"SERVDISP\tTestServiceDisp\n"
"SERVDISP2\tTestServiceDisp2\n"
"MSIFASTINSTALL\t1\n"
+ "ARPNOMODIFY\t1\n"
"regdata17\t#1\n";
static const char env_install_exec_seq_dat[] =
@@ -2677,15 +2678,16 @@ static void test_register_product(void)
CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
CHECK_DEL_REG_STR(hkey, "InstallDate", date);
CHECK_DEL_REG_STR(hkey, "InstallSource", temp);
- CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_DEL_REG_STR(hkey, "Publisher", "Wine");
- CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL);
CHECK_DEL_REG_STR(hkey, "Comments", NULL);
CHECK_DEL_REG_STR(hkey, "Contact", NULL);
CHECK_DEL_REG_STR(hkey, "HelpLink", NULL);
CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL);
CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL);
+ CHECK_DEL_REG_DWORD(hkey, "NoModify", 1);
CHECK_DEL_REG_STR(hkey, "Readme", NULL);
CHECK_DEL_REG_STR(hkey, "Size", NULL);
CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL);
@@ -2718,15 +2720,16 @@ static void test_register_product(void)
CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
CHECK_DEL_REG_STR(props, "InstallDate", date);
CHECK_DEL_REG_STR(props, "InstallSource", temp);
- CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_DEL_REG_STR(props, "Publisher", "Wine");
- CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL);
CHECK_DEL_REG_STR(props, "Comments", NULL);
CHECK_DEL_REG_STR(props, "Contact", NULL);
CHECK_DEL_REG_STR(props, "HelpLink", NULL);
CHECK_DEL_REG_STR(props, "HelpTelephone", NULL);
CHECK_DEL_REG_STR(props, "InstallLocation", NULL);
+ CHECK_DEL_REG_DWORD(props, "NoModify", 1);
CHECK_DEL_REG_STR(props, "Readme", NULL);
CHECK_DEL_REG_STR(props, "Size", NULL);
CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL);
@@ -2782,15 +2785,16 @@ todo_wine
CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
CHECK_DEL_REG_STR(hkey, "InstallDate", date);
CHECK_DEL_REG_STR(hkey, "InstallSource", temp);
- CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_DEL_REG_STR(hkey, "Publisher", "Wine");
- CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL);
CHECK_DEL_REG_STR(hkey, "Comments", NULL);
CHECK_DEL_REG_STR(hkey, "Contact", NULL);
CHECK_DEL_REG_STR(hkey, "HelpLink", NULL);
CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL);
CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL);
+ CHECK_DEL_REG_DWORD(hkey, "NoModify", 1);
CHECK_DEL_REG_STR(hkey, "Readme", NULL);
CHECK_DEL_REG_STR(hkey, "Size", NULL);
CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL);
@@ -2823,15 +2827,16 @@ todo_wine
CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
CHECK_DEL_REG_STR(props, "InstallDate", date);
CHECK_DEL_REG_STR(props, "InstallSource", temp);
- CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_DEL_REG_STR(props, "Publisher", "Wine");
- CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL);
CHECK_DEL_REG_STR(props, "Comments", NULL);
CHECK_DEL_REG_STR(props, "Contact", NULL);
CHECK_DEL_REG_STR(props, "HelpLink", NULL);
CHECK_DEL_REG_STR(props, "HelpTelephone", NULL);
CHECK_DEL_REG_STR(props, "InstallLocation", NULL);
+ CHECK_DEL_REG_DWORD(props, "NoModify", 1);
CHECK_DEL_REG_STR(props, "Readme", NULL);
CHECK_DEL_REG_STR(props, "Size", NULL);
CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL);
@@ -3693,15 +3698,16 @@ static void test_publish(void)
CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
CHECK_REG_STR(prodkey, "InstallDate", date);
CHECK_REG_STR(prodkey, "InstallSource", temp);
- CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "Publisher", "Wine");
- CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL);
CHECK_REG_STR(prodkey, "Comments", NULL);
CHECK_REG_STR(prodkey, "Contact", NULL);
CHECK_REG_STR(prodkey, "HelpLink", NULL);
CHECK_REG_STR(prodkey, "HelpTelephone", NULL);
CHECK_REG_STR(prodkey, "InstallLocation", NULL);
+ CHECK_REG_DWORD(prodkey, "NoModify", 1);
CHECK_REG_STR(prodkey, "Readme", NULL);
CHECK_REG_STR(prodkey, "Size", NULL);
CHECK_REG_STR(prodkey, "URLInfoAbout", NULL);
@@ -3797,15 +3803,16 @@ static void test_publish(void)
CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
CHECK_REG_STR(prodkey, "InstallDate", date);
CHECK_REG_STR(prodkey, "InstallSource", temp);
- CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "Publisher", "Wine");
- CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL);
CHECK_REG_STR(prodkey, "Comments", NULL);
CHECK_REG_STR(prodkey, "Contact", NULL);
CHECK_REG_STR(prodkey, "HelpLink", NULL);
CHECK_REG_STR(prodkey, "HelpTelephone", NULL);
CHECK_REG_STR(prodkey, "InstallLocation", NULL);
+ CHECK_REG_DWORD(prodkey, "NoModify", 1);
CHECK_REG_STR(prodkey, "Readme", NULL);
CHECK_REG_STR(prodkey, "Size", NULL);
CHECK_REG_STR(prodkey, "URLInfoAbout", NULL);
@@ -3878,15 +3885,16 @@ static void test_publish(void)
CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
CHECK_REG_STR(prodkey, "InstallDate", date);
CHECK_REG_STR(prodkey, "InstallSource", temp);
- CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "Publisher", "Wine");
- CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL);
CHECK_REG_STR(prodkey, "Comments", NULL);
CHECK_REG_STR(prodkey, "Contact", NULL);
CHECK_REG_STR(prodkey, "HelpLink", NULL);
CHECK_REG_STR(prodkey, "HelpTelephone", NULL);
CHECK_REG_STR(prodkey, "InstallLocation", NULL);
+ CHECK_REG_DWORD(prodkey, "NoModify", 1);
CHECK_REG_STR(prodkey, "Readme", NULL);
CHECK_REG_STR(prodkey, "Size", NULL);
CHECK_REG_STR(prodkey, "URLInfoAbout", NULL);
@@ -3936,15 +3944,16 @@ static void test_publish(void)
CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
CHECK_REG_STR(prodkey, "InstallDate", date);
CHECK_REG_STR(prodkey, "InstallSource", temp);
- CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "Publisher", "Wine");
- CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL);
CHECK_REG_STR(prodkey, "Comments", NULL);
CHECK_REG_STR(prodkey, "Contact", NULL);
CHECK_REG_STR(prodkey, "HelpLink", NULL);
CHECK_REG_STR(prodkey, "HelpTelephone", NULL);
CHECK_REG_STR(prodkey, "InstallLocation", NULL);
+ CHECK_REG_DWORD(prodkey, "NoModify", 1);
CHECK_REG_STR(prodkey, "Readme", NULL);
CHECK_REG_STR(prodkey, "Size", NULL);
CHECK_REG_STR(prodkey, "URLInfoAbout", NULL);
@@ -3994,15 +4003,16 @@ static void test_publish(void)
CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
CHECK_REG_STR(prodkey, "InstallDate", date);
CHECK_REG_STR(prodkey, "InstallSource", temp);
- CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "Publisher", "Wine");
- CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL);
CHECK_REG_STR(prodkey, "Comments", NULL);
CHECK_REG_STR(prodkey, "Contact", NULL);
CHECK_REG_STR(prodkey, "HelpLink", NULL);
CHECK_REG_STR(prodkey, "HelpTelephone", NULL);
CHECK_REG_STR(prodkey, "InstallLocation", NULL);
+ CHECK_REG_DWORD(prodkey, "NoModify", 1);
CHECK_REG_STR(prodkey, "Readme", NULL);
CHECK_REG_STR(prodkey, "Size", NULL);
CHECK_REG_STR(prodkey, "URLInfoAbout", NULL);
@@ -4075,15 +4085,16 @@ static void test_publish(void)
CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
CHECK_REG_STR(prodkey, "InstallDate", date);
CHECK_REG_STR(prodkey, "InstallSource", temp);
- CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "Publisher", "Wine");
- CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
+ CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL);
CHECK_REG_STR(prodkey, "Comments", NULL);
CHECK_REG_STR(prodkey, "Contact", NULL);
CHECK_REG_STR(prodkey, "HelpLink", NULL);
CHECK_REG_STR(prodkey, "HelpTelephone", NULL);
CHECK_REG_STR(prodkey, "InstallLocation", NULL);
+ CHECK_REG_DWORD(prodkey, "NoModify", 1);
CHECK_REG_STR(prodkey, "Readme", NULL);
CHECK_REG_STR(prodkey, "Size", NULL);
CHECK_REG_STR(prodkey, "URLInfoAbout", NULL);
--
2.11.0
Sept. 27, 2018
[PATCH 1/2] msi/tests: SQLGetInstalledDrivers fails if there are no ODBC drivers installed.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msi/tests/custom.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index cd6cb0c378..c7ce4d20ae 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1424,9 +1424,10 @@ UINT WINAPI odbc_present(MSIHANDLE hinst)
WORD len;
BOOL r;
+ buffer[0] = 0;
+ len = sizeof(buffer);
r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len);
- ok(hinst, len < sizeof(buffer), "buffer too small\n");
- ok(hinst, r, "SQLGetInstalledDrivers failed\n");
+ if (r) ok(hinst, len < sizeof(buffer), "buffer too small\n");
for (p = buffer; *p; p += strlen(p) + 1)
{
if (!strcmp(p, "ODBC test driver"))
@@ -1446,9 +1447,10 @@ UINT WINAPI odbc_absent(MSIHANDLE hinst)
WORD len;
BOOL r;
+ buffer[0] = 0;
+ len = sizeof(buffer);
r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len);
- ok(hinst, len < sizeof(buffer), "buffer too small\n");
- ok(hinst, r, "SQLGetInstalledDrivers failed\n");
+ if (r) ok(hinst, len < sizeof(buffer), "buffer too small\n");
for (p = buffer; *p; p += strlen(p) + 1)
{
if (!strcmp(p, "ODBC test driver"))
--
2.11.0
Sept. 27, 2018
Re: [PATCH v3 4/6] shell32/autocomplete: Re-arrange some fields for better packing
by Gabriel Ivăncescu
On Thu, Sep 27, 2018 at 2:18 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
>
> It's a gratuitous change, and in many cases would generate worse code
> because of the need to manipulate bits. Losing a couple of padding bytes
> here and there is not a problem that needs fixing.
>
> --
> Alexandre Julliard
> julliard(a)winehq.org
Originally I didn't use bit fields, only converted them to BOOLEAN (1
byte so all 3 along with UCHAR fit in just one 4-byte block).
I was suggested to use bit fields, and it makes sense in this context
so I think it's okay -- booleans on bit fields are efficient (only one
instruction), there's no unpacking that has to be done and so on.
(this only applies to 1-bit bit fields, i.e. booleans or flags)
Of course this is totally minor but I even taking minor into account,
despite this the minor CPU cache improvements outweight it, probably.
Lastly, this opens up easier expansion into more boolean flags into
the future (if needed) instead of having to use bitwise operators and
#define.
Sorry for long explanation, just want to give my reasoning.
Sept. 27, 2018