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
August 2005
- 131 participants
- 691 messages
Re: Help with debugging needed
by Stefan Dösinger
Hi,
That thing gets more and more interesting: I was mislead by the belief that
'next' would behave as 'nexti' at the end of the known C code. But obviosly
it doesn't.
Well, Empire Earth doesn't crash on return from Main_DirectDraw_Release, but
quite a bit later in its own code. It tries to call
Main_DirectDrawSurfaceRelease for an allready freed surface: From the crash
dump:
First chance exception: page fault on read access to 0xaaaaaaaa in 32-bit code
(0xaaaaaaaa).
Register dump:
CS:0073 SS:007b DS:007b ES:007b FS:003b GS:0033
EIP:aaaaaaaa ESP:7fc1fc58 EBP:7f2703e0 EFLAGS:00210293( - 00 RISA1C)
EAX:7fe049f0 EBX:00000001 ECX:7fe01b38 EDX:7803a11c
ESI:7f288aa0 EDI:7f288acc
Stack dump:
0x7fc1fc58: 7dbbd6d7 7fe049f0 7f288aa0 7f2703e0
0x7fc1fc68: 00000001 7dbb1c20 7dbc59b4 00000000
0x7fc1fc78: 7f9f24fc 00000001 7fa24015 7dbc5998
0x7fc1fc88: 7fa23451 7dbc5998 7f270838 00000000
0x7fc1fc98: 00000002 7dbb9a14 7fa6bda1 00000000
0x7fc1fca8: 7fc1fd04 00000000 0052ba8b 5c575f20
Backtrace:
=>1 0xaaaaaaaa (0x7f2703e0)
2 0x00000000 (0x00000000)
0xaaaaaaaa: addb %al,0x0(%eax)
The surface to to release is in %eax and the 2nd element on the stack:
7fe049f0.
>From the log, a few lines before the crash:
warn:ddraw:Main_DirectDrawSurface_ForceDestroy destroying surface 0x7fe049f0
with refcnt 1
The address of the function is taken from the surface structur and now points
to 0xaaaaaaaa.
(I do not expect a reply to this mail. I write it for a few reasons:
*Someone might have seen something like this allready
*Someone(maybe I) might search the archives sometimes and find this
information usefull.
If I shouldn't do so, just tell me)
Aug. 15, 2005
How dumb icone of wine in kde? I want to place my image when to minimize it
by Fabio Duarte Vilas Boas
How dumb icone of wine in kde?
I want to place my image when to minimize it
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis.
Instale o discador agora! http://br.acesso.yahoo.com/
Aug. 15, 2005
Re: lostwages/templates/en howto.template
by Lionel Ulmer
> Log message:
> Tom Wickline <twickline(a)gmail.com>
> spelling fix, doc update
+<p>If your using an old version of Wine we recommend that you use a handy program called
^^^^
Sorry to spot this once it has been committed :-)
Lionel
--
Lionel Ulmer - http://www.bbrox.org/
Aug. 15, 2005
Re: Help Please
by Fabio Duarte Vilas Boas
How dumb icone of wine in kde?
I want to place my image when to minimize it
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis.
Instale o discador agora! http://br.acesso.yahoo.com/
Aug. 15, 2005
Re: Help with debugging needed
by Lionel Ulmer
> Well, Empire Earth doesn't crash on return from Main_DirectDraw_Release, but
> quite a bit later in its own code. It tries to call
> Main_DirectDrawSurfaceRelease for an allready freed surface: From the crash
> dump:
Could you put the +ddraw trace somewhere on the web ? This suspiciously
looks like a reference counting issue either in the application or in the
Wine code.
Lionel
--
Lionel Ulmer - http://www.bbrox.org/
Aug. 15, 2005
Re: MSHTML: test cleanup
by Jacek Caban
This time with the patch.
Changelog:
- Code cleanup
- Dissable tests after UIActivate failes (fixes tests win 9x)
Index: dlls/mshtml/tests/htmldoc.c
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/tests/htmldoc.c,v
retrieving revision 1.8
diff -u -p -r1.8 htmldoc.c
--- dlls/mshtml/tests/htmldoc.c 15 Aug 2005 09:41:30 -0000 1.8
+++ dlls/mshtml/tests/htmldoc.c 15 Aug 2005 16:48:51 -0000
@@ -43,7 +43,6 @@
ok(called_ ## func, "expected " #func "\n"); \
expect_ ## func = called_ ## func = FALSE
-static IUnknown *htmldoc_unk = NULL;
static IOleDocumentView *view = NULL;
static HWND container_hwnd = NULL, hwnd = NULL, last_hwnd = NULL;
@@ -469,7 +468,7 @@ static HRESULT WINAPI DocumentSite_Activ
CHECK_EXPECT(ActivateMe);
ok(pViewToActivate != NULL, "pViewToActivate = NULL\n");
- hres = IUnknown_QueryInterface(htmldoc_unk, &IID_IOleDocument, (void**)&document);
+ hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document);
ok(hres == S_OK, "could not get IOleDocument: %08lx\n", hres);
if(SUCCEEDED(hres)) {
@@ -513,8 +512,15 @@ static HRESULT WINAPI DocumentSite_Activ
SET_EXPECT(SetActiveObject);
SET_EXPECT(ShowUI);
expect_SetActiveObject_active = TRUE;
+
hres = IOleDocumentView_UIActivate(view, TRUE);
+
+ if(FAILED(hres)) {
+ trace("UIActivate failed: %08lx\n", hres);
+ return hres;
+ }
ok(hres == S_OK, "UIActivate failed: %08lx\n", hres);
+
CHECK_CALLED(CanInPlaceActivate);
CHECK_CALLED(GetWindowContext);
CHECK_CALLED(GetWindow);
@@ -796,14 +802,14 @@ static LRESULT WINAPI wnd_proc(HWND hwnd
return DefWindowProc(hwnd, msg, wParam, lParam);
}
-static void test_Persist()
+static void test_Persist(IUnknown *unk)
{
IPersistMoniker *persist_mon;
IPersistFile *persist_file;
GUID guid;
HRESULT hres;
- hres = IUnknown_QueryInterface(htmldoc_unk, &IID_IPersistFile, (void**)&persist_file);
+ hres = IUnknown_QueryInterface(unk, &IID_IPersistFile, (void**)&persist_file);
ok(hres == S_OK, "QueryInterface(IID_IPersist) failed: %08lx\n", hres);
if(SUCCEEDED(hres)) {
hres = IPersist_GetClassID(persist_file, NULL);
@@ -816,7 +822,7 @@ static void test_Persist()
IPersist_Release(persist_file);
}
- hres = IUnknown_QueryInterface(htmldoc_unk, &IID_IPersistMoniker, (void**)&persist_mon);
+ hres = IUnknown_QueryInterface(unk, &IID_IPersistMoniker, (void**)&persist_mon);
ok(hres == S_OK, "QueryInterface(IID_IPersistMoniker) failed: %08lx\n", hres);
if(SUCCEEDED(hres)) {
hres = IPersistMoniker_GetClassID(persist_mon, NULL);
@@ -872,12 +878,18 @@ static const OLECMDF expect_cmds[OLECMDI
OLECMDF_SUPPORTED /* OLECMDID_GETPRINTTEMPLATE */
};
-static void test_OleCommandTarget(IOleCommandTarget *cmdtrg)
+static void test_OleCommandTarget(IUnknown *unk)
{
+ IOleCommandTarget *cmdtrg;
OLECMD cmds[OLECMDID_GETPRINTTEMPLATE];
int i;
HRESULT hres;
+ hres = IUnknown_QueryInterface(unk, &IID_IOleCommandTarget, (void**)&cmdtrg);
+ ok(hres == S_OK, "QueryInterface(IIDIOleM=CommandTarget failed: %08lx\n", hres);
+ if(FAILED(hres))
+ return;
+
for(i=0; i<OLECMDID_GETPRINTTEMPLATE; i++) {
cmds[i].cmdID = i+1;
cmds[i].cmdf = 0xf0f0;
@@ -891,20 +903,63 @@ static void test_OleCommandTarget(IOleCo
ok(cmds[i].cmdf == expect_cmds[i+1], "cmds[%d].cmdf=%lx, expected %x\n",
i+1, cmds[i].cmdf, expect_cmds[i+1]);
}
+
+ IOleCommandTarget_Release(cmdtrg);
}
-static void test_HTMLDocument(void)
+static void test_OleCommandTarget_fail(IUnknown *unk)
{
- IOleObject *oleobj = NULL;
- IOleClientSite *clientsite = (LPVOID)0xdeadbeef;
- IOleInPlaceObjectWindowless *windowlessobj = NULL;
- IOleInPlaceActiveObject *activeobject = NULL;
- IOleCommandTarget *cmdtrg = NULL;
- GUID guid;
- RECT rect = {0,0,500,500};
+ IOleCommandTarget *cmdtrg;
+ int i;
HRESULT hres;
- ULONG ref;
+ OLECMD cmd[2] = {
+ {OLECMDID_OPEN, 0xf0f0},
+ {OLECMDID_GETPRINTTEMPLATE+1, 0xf0f0}
+ };
+
+ hres = IUnknown_QueryInterface(unk, &IID_IOleCommandTarget, (void**)&cmdtrg);
+ ok(hres == S_OK, "QueryInterface(IIDIOleM=CommandTarget failed: %08lx\n", hres);
+ if(FAILED(hres))
+ return;
+
+
+
+ hres = IOleCommandTarget_QueryStatus(cmdtrg, NULL, 0, NULL, NULL);
+ ok(hres == S_OK, "QueryStatus failed: %08lx\n", hres);
+
+ hres = IOleCommandTarget_QueryStatus(cmdtrg, NULL, 2, cmd, NULL);
+ ok(hres == OLECMDERR_E_NOTSUPPORTED,
+ "QueryStatus failed: %08lx, expected OLECMDERR_E_NOTSUPPORTED\n", hres);
+ ok(cmd[1].cmdID == OLECMDID_GETPRINTTEMPLATE+1,
+ "cmd[0].cmdID=%ld, expected OLECMDID_GETPRINTTEMPLATE+1\n", cmd[0].cmdID);
+ ok(cmd[1].cmdf == 0, "cmd[0].cmdf=%lx, expected 0\n", cmd[0].cmdf);
+ ok(cmd[0].cmdf == OLECMDF_SUPPORTED,
+ "cmd[1].cmdf=%lx, expected OLECMDF_SUPPORTED\n", cmd[1].cmdf);
+
+ hres = IOleCommandTarget_QueryStatus(cmdtrg, &IID_IHTMLDocument2, 2, cmd, NULL);
+ ok(hres == OLECMDERR_E_UNKNOWNGROUP,
+ "QueryStatus failed: %08lx, expected OLECMDERR_E_UNKNOWNGROUP\n", hres);
+
+ for(i=0; i<OLECMDID_GETPRINTTEMPLATE; i++) {
+ if(!expect_cmds[i]) {
+ hres = IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_UPDATECOMMANDS,
+ OLECMDEXECOPT_DODEFAULT, NULL, NULL);
+ ok(hres == OLECMDERR_E_NOTSUPPORTED,
+ "Exec failed: %08lx, expected OLECMDERR_E_NOTSUPPORTED\n", hres);
+ }
+ }
+
+ hres = IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_GETPRINTTEMPLATE+1,
+ OLECMDEXECOPT_DODEFAULT, NULL, NULL);
+ ok(hres == OLECMDERR_E_NOTSUPPORTED,
+ "Exec failed: %08lx, expected OLECMDERR_E_NOTSUPPORTED\n", hres);
+
+ IOleCommandTarget_Release(cmdtrg);
+}
+
+static HWND create_container_window(void)
+{
static const WCHAR wszHTMLDocumentTest[] =
{'H','T','M','L','D','o','c','u','m','e','n','t','T','e','s','t',0};
static WNDCLASSEXW wndclass = {
@@ -916,402 +971,307 @@ static void test_HTMLDocument(void)
NULL
};
- hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
- &IID_IUnknown, (void**)&htmldoc_unk);
- ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
- if(FAILED(hres))
- return;
-
RegisterClassExW(&wndclass);
- container_hwnd = CreateWindowW(wszHTMLDocumentTest, wszHTMLDocumentTest,
+ return CreateWindowW(wszHTMLDocumentTest, wszHTMLDocumentTest,
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, NULL, NULL, NULL, NULL);
+}
- test_Persist();
+static HRESULT test_DoVerb(IOleObject *oleobj)
+{
+ RECT rect = {0,0,500,500};
+ HRESULT hres;
- hres = IUnknown_QueryInterface(htmldoc_unk, &IID_IOleInPlaceObjectWindowless,
- (void**)&windowlessobj);
- ok(hres == S_OK, "Could not get IOleInPlaceObjectWindowless interface: %08lx\n", hres);
+ SET_EXPECT(GetContainer);
+ SET_EXPECT(LockContainer);
+ SET_EXPECT(ActivateMe);
+ expect_LockContainer_fLock = TRUE;
+ hres = IOleObject_DoVerb(oleobj, OLEIVERB_SHOW, NULL, &ClientSite, -1, container_hwnd, &rect);
- hres = IUnknown_QueryInterface(htmldoc_unk, &IID_IOleCommandTarget, (void**)&cmdtrg);
- ok(hres == S_OK, "could not get IOleCommandTarget: %08lx\n", hres);
+ if(FAILED(hres))
+ return hres;
- hres = IUnknown_QueryInterface(htmldoc_unk, &IID_IOleObject, (void**)&oleobj);
- ok(hres == S_OK, "QueryInterface(IID_IOleObject) failed: %08lx\n", hres);
- if(oleobj) {
- hres = IOleObject_GetUserClassID(oleobj, NULL);
- ok(hres == E_INVALIDARG, "GetUserClassID returned: %08lx, expected E_INVALIDARG\n", hres);
-
- hres = IOleObject_GetUserClassID(oleobj, &guid);
- ok(hres == S_OK, "GetUserClassID failed: %08lx\n", hres);
- ok(IsEqualGUID(&guid, &CLSID_HTMLDocument), "guid != CLSID_HTMLDocument\n");
+ ok(hres == S_OK, "DoVerb failed: %08lx\n", hres);
+ CHECK_CALLED(GetContainer);
+ CHECK_CALLED(LockContainer);
+ CHECK_CALLED(ActivateMe);
- hres = IOleObject_GetClientSite(oleobj, &clientsite);
- ok(hres == S_OK, "GetClientSite failed: %08lx\n", hres);
- ok(clientsite == NULL, "GetClientSite() = %p, expected NULL\n", clientsite);
+ return hres;
+}
- SET_EXPECT(GetHostInfo);
- SET_EXPECT(GetOptionKeyPath);
- SET_EXPECT(GetOverrideKeyPath);
- SET_EXPECT(GetWindow);
- hres = IOleObject_SetClientSite(oleobj, &ClientSite);
- ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
- CHECK_CALLED(GetHostInfo);
- CHECK_CALLED(GetOptionKeyPath);
- CHECK_CALLED(GetOverrideKeyPath);
- CHECK_CALLED(GetWindow);
+#define CLIENTSITE_EXPECTPATH 0x00000001
+#define CLIENTSITE_SETNULL 0x00000002
+#define CLIENTSITE_DONTSET 0x00000004
- hres = IOleObject_GetClientSite(oleobj, &clientsite);
- ok(hres == S_OK, "GetClientSite failed: %08lx\n", hres);
- ok(clientsite == &ClientSite, "GetClientSite() = %p, expected %p\n", clientsite, &ClientSite);
+static void test_ClientSite(IOleObject *oleobj, DWORD flags)
+{
+ IOleClientSite *clientsite;
+ HRESULT hres;
- if(windowlessobj) {
- hres = IOleInPlaceObjectWindowless_InPlaceDeactivate(windowlessobj);
- ok(hres == S_OK, "InPlaceDeactivate failed: %08lx\n", hres);
- }
+ if(flags & CLIENTSITE_SETNULL) {
+ hres = IOleObject_GetClientSite(oleobj, &clientsite);
+ ok(clientsite == &ClientSite, "clientsite=%p, expected %p\n", clientsite, &ClientSite);
- SET_EXPECT(GetContainer);
- SET_EXPECT(LockContainer);
- SET_EXPECT(ActivateMe);
- expect_LockContainer_fLock = TRUE;
- hres = IOleObject_DoVerb(oleobj, OLEIVERB_SHOW, NULL, &ClientSite, -1, container_hwnd, &rect);
- ok(hres == S_OK, "DoVerb failed: %08lx\n", hres);
- CHECK_CALLED(GetContainer);
- CHECK_CALLED(LockContainer);
- CHECK_CALLED(ActivateMe);
+ hres = IOleObject_SetClientSite(oleobj, NULL);
+ ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
}
- if(cmdtrg) {
- int i;
-
- OLECMD cmd[2] = {
- {OLECMDID_OPEN, 0xf0f0},
- {OLECMDID_GETPRINTTEMPLATE+1, 0xf0f0}
- };
-
- hres = IOleCommandTarget_QueryStatus(cmdtrg, NULL, 0, NULL, NULL);
- ok(hres == S_OK, "QueryStatus failed: %08lx\n", hres);
-
- hres = IOleCommandTarget_QueryStatus(cmdtrg, NULL, 2, cmd, NULL);
- ok(hres == OLECMDERR_E_NOTSUPPORTED,
- "QueryStatus failed: %08lx, expected OLECMDERR_E_NOTSUPPORTED\n", hres);
- ok(cmd[1].cmdID == OLECMDID_GETPRINTTEMPLATE+1,
- "cmd[0].cmdID=%ld, expected OLECMDID_GETPRINTTEMPLATE+1\n", cmd[0].cmdID);
- ok(cmd[1].cmdf == 0, "cmd[0].cmdf=%lx, expected 0\n", cmd[0].cmdf);
- ok(cmd[0].cmdf == OLECMDF_SUPPORTED,
- "cmd[1].cmdf=%lx, expected OLECMDF_SUPPORTED\n", cmd[1].cmdf);
-
- hres = IOleCommandTarget_QueryStatus(cmdtrg, &IID_IHTMLDocument2, 2, cmd, NULL);
- ok(hres == OLECMDERR_E_UNKNOWNGROUP,
- "QueryStatus failed: %08lx, expected OLECMDERR_E_UNKNOWNGROUP\n", hres);
-
- for(i=0; i<OLECMDID_GETPRINTTEMPLATE; i++) {
- if(!expect_cmds[i]) {
- hres = IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_UPDATECOMMANDS,
- OLECMDEXECOPT_DODEFAULT, NULL, NULL);
- ok(hres == OLECMDERR_E_NOTSUPPORTED,
- "Exec failed: %08lx, expected OLECMDERR_E_NOTSUPPORTED\n", hres);
- }
- }
+ if(flags & CLIENTSITE_DONTSET)
+ return;
- hres = IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_GETPRINTTEMPLATE+1,
- OLECMDEXECOPT_DODEFAULT, NULL, NULL);
- ok(hres == OLECMDERR_E_NOTSUPPORTED,
- "Exec failed: %08lx, expected OLECMDERR_E_NOTSUPPORTED\n", hres);
+ hres = IOleObject_GetClientSite(oleobj, &clientsite);
+ ok(hres == S_OK, "GetClientSite failed: %08lx\n", hres);
+ ok(clientsite == NULL, "GetClientSite() = %p, expected NULL\n", clientsite);
- test_OleCommandTarget(cmdtrg);
+ SET_EXPECT(GetHostInfo);
+ if(flags & CLIENTSITE_EXPECTPATH) {
+ SET_EXPECT(GetOptionKeyPath);
+ SET_EXPECT(GetOverrideKeyPath);
}
+ SET_EXPECT(GetWindow);
+ hres = IOleObject_SetClientSite(oleobj, &ClientSite);
+ ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
+ CHECK_CALLED(GetHostInfo);
+ if(flags & CLIENTSITE_EXPECTPATH) {
+ CHECK_CALLED(GetOptionKeyPath);
+ CHECK_CALLED(GetOverrideKeyPath);
+ }
+ CHECK_CALLED(GetWindow);
- hres = IOleDocumentView_QueryInterface(view, &IID_IOleInPlaceActiveObject, (void**)&activeobject);
- ok(hres == S_OK, "Could not get IOleInPlaceActiveObject interface: %08lx\n", hres);
+ hres = IOleObject_GetClientSite(oleobj, &clientsite);
+ ok(hres == S_OK, "GetClientSite failed: %08lx\n", hres);
+ ok(clientsite == &ClientSite, "GetClientSite() = %p, expected %p\n", clientsite, &ClientSite);
+}
- if(activeobject) {
- HWND tmp_hwnd;
- hres = IOleInPlaceActiveObject_GetWindow(activeobject, &tmp_hwnd);
- ok(hres == S_OK, "GetWindow failed: %08lx\n", hres);
- ok(tmp_hwnd == hwnd, "tmp_hwnd=%p, expected %p\n", tmp_hwnd, hwnd);
- }
+static void test_Close(IUnknown *unk, BOOL set_client)
+{
+ IOleObject *oleobj = NULL;
+ HRESULT hres;
- if(view) {
- SET_EXPECT(SetActiveObject);
- SET_EXPECT(HideUI);
- SET_EXPECT(OnUIDeactivate);
- expect_SetActiveObject_active = FALSE;
- hres = IOleDocumentView_UIActivate(view, FALSE);
- ok(hres == S_OK, "UIActivate failed: %08lx\n", hres);
- CHECK_CALLED(SetActiveObject);
- CHECK_CALLED(HideUI);
- CHECK_CALLED(OnUIDeactivate);
- }
+ hres = IUnknown_QueryInterface(unk, &IID_IOleObject, (void**)&oleobj);
+ ok(hres == S_OK, "QueryInterface(IID_IOleObject) failed: %08lx\n", hres);
+ if(FAILED(hres))
+ return;
- if(cmdtrg)
- test_OleCommandTarget(cmdtrg);
+ SET_EXPECT(GetContainer);
+ SET_EXPECT(LockContainer);
+ expect_LockContainer_fLock = FALSE;
+ hres = IOleObject_Close(oleobj, OLECLOSE_NOSAVE);
+ ok(hres == S_OK, "Close failed: %08lx\n", hres);
+ CHECK_CALLED(GetContainer);
+ CHECK_CALLED(LockContainer);
- if(activeobject) {
- HWND tmp_hwnd;
- hres = IOleInPlaceActiveObject_GetWindow(activeobject, &tmp_hwnd);
- ok(hres == S_OK, "GetWindow failed: %08lx\n", hres);
- ok(tmp_hwnd == hwnd, "tmp_hwnd=%p, expected %p\n", tmp_hwnd, hwnd);
- }
-
- if(windowlessobj) {
- SET_EXPECT(OnInPlaceDeactivate);
- hres = IOleInPlaceObjectWindowless_InPlaceDeactivate(windowlessobj);
- ok(hres == S_OK, "InPlaceDeactivate failed: %08lx\n", hres);
- CHECK_CALLED(OnInPlaceDeactivate);
- }
+ if(set_client)
+ test_ClientSite(oleobj, CLIENTSITE_SETNULL|CLIENTSITE_DONTSET);
- /* Calling test_OleCommandTarget here couses Segmentation Fault with native
- * MSHTML. It doesn't with Wine. */
+ IOleObject_Release(oleobj);
+}
- if(activeobject) {
- HWND tmp_hwnd;
- hres = IOleInPlaceActiveObject_GetWindow(activeobject, &tmp_hwnd);
- ok(hres == E_FAIL, "GetWindow returned %08lx, expected E_FAIL\n", hres);
- ok(IsWindow(hwnd), "hwnd is destroyed\n");
- }
+static void test_InPlaceDeactivate(IUnknown *unk, BOOL expect_call)
+{
+ IOleInPlaceObjectWindowless *windowlessobj = NULL;
+ HRESULT hres;
- if(view) {
- hres = IOleDocumentView_Show(view, FALSE);
- ok(hres == S_OK, "Show failed: %08lx\n", hres);
- }
- if(windowlessobj) {
- hres = IOleInPlaceObjectWindowless_InPlaceDeactivate(windowlessobj);
- ok(hres == S_OK, "InPlaceDeactivate failed: %08lx\n", hres);
- }
+ hres = IUnknown_QueryInterface(unk, &IID_IOleInPlaceObjectWindowless,
+ (void**)&windowlessobj);
+ ok(hres == S_OK, "QueryInterface(IID_IOleInPlaceObjectWindowless) failed: %08lx\n", hres);
+ if(FAILED(hres))
+ return;
- if(view) {
- IOleInPlaceSite *inplacesite = (IOleInPlaceSite*)0xff00ff00;
+ if(expect_call) SET_EXPECT(OnInPlaceDeactivate);
+ hres = IOleInPlaceObjectWindowless_InPlaceDeactivate(windowlessobj);
+ ok(hres == S_OK, "InPlaceDeactivate failed: %08lx\n", hres);
+ if(expect_call) CHECK_CALLED(OnInPlaceDeactivate);
- hres = IOleDocumentView_Show(view, FALSE);
- ok(hres == S_OK, "Show failed: %08lx\n", hres);
+ IOleInPlaceObjectWindowless_Release(windowlessobj);
+}
- hres = IOleDocumentView_CloseView(view, 0);
- ok(hres == S_OK, "CloseVire failed: %08lx\n", hres);
+static HRESULT test_Activate(IUnknown *unk, DWORD flags)
+{
+ IOleObject *oleobj = NULL;
+ GUID guid;
+ HRESULT hres;
- hres = IOleDocumentView_SetInPlaceSite(view, NULL);
- ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
+ last_hwnd = hwnd;
- hres = IOleDocumentView_GetInPlaceSite(view, &inplacesite);
- ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
- ok(inplacesite == NULL, "inplacesite=%p, expected NULL\n", inplacesite);
- }
+ if(view)
+ IOleDocumentView_Release(view);
+ view = NULL;
- if(oleobj) {
- SET_EXPECT(GetContainer);
- SET_EXPECT(LockContainer);
- expect_LockContainer_fLock = FALSE;
- hres = IOleObject_Close(oleobj, OLECLOSE_NOSAVE);
- ok(hres == S_OK, "Close failed: %08lx\n", hres);
- CHECK_CALLED(GetContainer);
- CHECK_CALLED(LockContainer);
+ hres = IUnknown_QueryInterface(unk, &IID_IOleObject, (void**)&oleobj);
+ ok(hres == S_OK, "QueryInterface(IID_IOleObject) failed: %08lx\n", hres);
+ if(FAILED(hres))
+ return hres;
- if(view)
- IOleDocumentView_Release(view);
+ hres = IOleObject_GetUserClassID(oleobj, NULL);
+ ok(hres == E_INVALIDARG, "GetUserClassID returned: %08lx, expected E_INVALIDARG\n", hres);
- /* Activate HTMLDocument again */
- last_hwnd = hwnd;
+ hres = IOleObject_GetUserClassID(oleobj, &guid);
+ ok(hres == S_OK, "GetUserClassID failed: %08lx\n", hres);
+ ok(IsEqualGUID(&guid, &CLSID_HTMLDocument), "guid != CLSID_HTMLDocument\n");
- hres = IOleObject_GetClientSite(oleobj, &clientsite);
- ok(clientsite == &ClientSite, "clientsite=%p, expected %p\n", clientsite, &ClientSite);
+ test_ClientSite(oleobj, flags);
+ test_InPlaceDeactivate(unk, FALSE);
- hres = IOleObject_SetClientSite(oleobj, NULL);
- ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
+ hres = test_DoVerb(oleobj);
- hres = IOleObject_GetClientSite(oleobj, &clientsite);
- ok(hres == S_OK, "GetClientSite failed: %08lx\n", hres);
- ok(clientsite == NULL, "GetClientSite() = %p, expected NULL\n", clientsite);
+ IOleObject_Release(oleobj);
+ return hres;
+}
- SET_EXPECT(GetHostInfo);
- SET_EXPECT(GetWindow);
- hres = IOleObject_SetClientSite(oleobj, &ClientSite);
- ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
- CHECK_CALLED(GetHostInfo);
- CHECK_CALLED(GetWindow);
+static void test_Window(IUnknown *unk, BOOL expect_success)
+{
+ IOleInPlaceActiveObject *activeobject = NULL;
+ HWND tmp_hwnd;
+ HRESULT hres;
- if(windowlessobj) {
- hres = IOleInPlaceObjectWindowless_InPlaceDeactivate(windowlessobj);
- ok(hres == S_OK, "InPlaceDeactivate failed: %08lx\n", hres);
- }
+ hres = IOleDocumentView_QueryInterface(view, &IID_IOleInPlaceActiveObject, (void**)&activeobject);
+ ok(hres == S_OK, "Could not get IOleInPlaceActiveObject interface: %08lx\n", hres);
+ if(FAILED(hres))
+ return;
- SET_EXPECT(GetContainer);
- SET_EXPECT(LockContainer);
- SET_EXPECT(ActivateMe);
- expect_LockContainer_fLock = TRUE;
- hres = IOleObject_DoVerb(oleobj, OLEIVERB_SHOW, NULL, &ClientSite, -1, container_hwnd, &rect);
- ok(hres == S_OK, "DoVerb failed: %08lx\n", hres);
- CHECK_CALLED(GetContainer);
- CHECK_CALLED(LockContainer);
- CHECK_CALLED(ActivateMe);
- }
+ hres = IOleInPlaceActiveObject_GetWindow(activeobject, &tmp_hwnd);
- if(activeobject) {
- HWND tmp_hwnd;
- hres = IOleInPlaceActiveObject_GetWindow(activeobject, &tmp_hwnd);
+ if(expect_success) {
ok(hres == S_OK, "GetWindow failed: %08lx\n", hres);
ok(tmp_hwnd == hwnd, "tmp_hwnd=%p, expected %p\n", tmp_hwnd, hwnd);
+ }else {
+ ok(hres == E_FAIL, "GetWindow returned %08lx, expected E_FAIL\n", hres);
+ ok(IsWindow(hwnd), "hwnd is destroyed\n");
}
- if(cmdtrg)
- test_OleCommandTarget(cmdtrg);
-
- if(view) {
- SET_EXPECT(SetActiveObject);
- SET_EXPECT(HideUI);
- SET_EXPECT(OnUIDeactivate);
- expect_SetActiveObject_active = FALSE;
- hres = IOleDocumentView_UIActivate(view, FALSE);
- ok(hres == S_OK, "UIActivate failed: %08lx\n", hres);
- CHECK_CALLED(SetActiveObject);
- CHECK_CALLED(HideUI);
- CHECK_CALLED(OnUIDeactivate);
- }
-
- if(windowlessobj) {
- SET_EXPECT(OnInPlaceDeactivate);
- hres = IOleInPlaceObjectWindowless_InPlaceDeactivate(windowlessobj);
- ok(hres == S_OK, "InPlaceDeactivate failed: %08lx\n", hres);
- CHECK_CALLED(OnInPlaceDeactivate);
- }
+ IOleInPlaceActiveObject_Release(activeobject);
+}
- if(oleobj) {
- SET_EXPECT(GetContainer);
- SET_EXPECT(LockContainer);
- expect_LockContainer_fLock = FALSE;
- hres = IOleObject_Close(oleobj, OLECLOSE_NOSAVE);
- ok(hres == S_OK, "Close failed: %08lx\n", hres);
- CHECK_CALLED(GetContainer);
- CHECK_CALLED(LockContainer);
+static void test_CloseView(void)
+{
+ IOleInPlaceSite *inplacesite = (IOleInPlaceSite*)0xff00ff00;
+ HRESULT hres;
- if(view)
- IOleDocumentView_Release(view);
+ if(!view)
+ return;
- hres = IOleObject_GetClientSite(oleobj, &clientsite);
- ok(clientsite == &ClientSite, "clientsite=%p, expected %p\n", clientsite, &ClientSite);
+ hres = IOleDocumentView_Show(view, FALSE);
+ ok(hres == S_OK, "Show failed: %08lx\n", hres);
- hres = IOleObject_SetClientSite(oleobj, NULL);
- ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
+ hres = IOleDocumentView_CloseView(view, 0);
+ ok(hres == S_OK, "CloseView failed: %08lx\n", hres);
- hres = IOleObject_GetClientSite(oleobj, &clientsite);
- ok(hres == S_OK, "GetClientSite failed: %08lx\n", hres);
- ok(clientsite == NULL, "GetClientSite() = %p, expected NULL\n", clientsite);
+ hres = IOleDocumentView_SetInPlaceSite(view, NULL);
+ ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
- SET_EXPECT(GetHostInfo);
- SET_EXPECT(GetWindow);
- hres = IOleObject_SetClientSite(oleobj, &ClientSite);
- ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
- CHECK_CALLED(GetHostInfo);
- CHECK_CALLED(GetWindow);
+ hres = IOleDocumentView_GetInPlaceSite(view, &inplacesite);
+ ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
+ ok(inplacesite == NULL, "inplacesite=%p, expected NULL\n", inplacesite);
+}
- /* Activate HTMLDocument again, this time without UIActivate */
- last_hwnd = hwnd;
- call_UIActivate = FALSE;
-
- SET_EXPECT(GetContainer);
- SET_EXPECT(LockContainer);
- SET_EXPECT(ActivateMe);
- expect_LockContainer_fLock = TRUE;
- hres = IOleObject_DoVerb(oleobj, OLEIVERB_SHOW, NULL, &ClientSite, -1, container_hwnd, &rect);
- ok(hres == S_OK, "DoVerb failed: %08lx\n", hres);
- CHECK_CALLED(GetContainer);
- CHECK_CALLED(LockContainer);
- CHECK_CALLED(ActivateMe);
- }
+static void test_UIDeactivate(void)
+{
+ HRESULT hres;
- if(activeobject) {
- HWND tmp_hwnd;
- hres = IOleInPlaceActiveObject_GetWindow(activeobject, &tmp_hwnd);
- ok(hres == S_OK, "GetWindow failed: %08lx\n", hres);
- ok(tmp_hwnd == hwnd, "tmp_hwnd=%p, expected %p\n", tmp_hwnd, hwnd);
+ if(call_UIActivate) {
+ SET_EXPECT(SetActiveObject);
+ SET_EXPECT(HideUI);
+ SET_EXPECT(OnUIDeactivate);
}
- if(view) {
- expect_SetActiveObject_active = FALSE;
- hres = IOleDocumentView_UIActivate(view, FALSE);
- ok(hres == S_OK, "UIActivate failed: %08lx\n", hres);
- }
+ expect_SetActiveObject_active = FALSE;
+ hres = IOleDocumentView_UIActivate(view, FALSE);
+ ok(hres == S_OK, "UIActivate failed: %08lx\n", hres);
- if(windowlessobj) {
- SET_EXPECT(OnInPlaceDeactivate);
- hres = IOleInPlaceObjectWindowless_InPlaceDeactivate(windowlessobj);
- ok(hres == S_OK, "InPlaceDeactivate failed: %08lx\n", hres);
- CHECK_CALLED(OnInPlaceDeactivate);
+ if(call_UIActivate) {
+ CHECK_CALLED(SetActiveObject);
+ CHECK_CALLED(HideUI);
+ CHECK_CALLED(OnUIDeactivate);
}
+}
- if(view) {
- IOleInPlaceSite *inplacesite = (IOleInPlaceSite*)0xff00ff00;
-
- hres = IOleDocumentView_Show(view, FALSE);
- ok(hres == S_OK, "Show failed: %08lx\n", hres);
+static void test_Hide(void)
+{
+ HRESULT hres;
- hres = IOleDocumentView_CloseView(view, 0);
- ok(hres == S_OK, "CloseView failed: %08lx\n", hres);
+ if(!view)
+ return;
- hres = IOleDocumentView_SetInPlaceSite(view, NULL);
- ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
+ hres = IOleDocumentView_Show(view, FALSE);
+ ok(hres == S_OK, "Show failed: %08lx\n", hres);
+}
- hres = IOleDocumentView_GetInPlaceSite(view, &inplacesite);
- ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
- ok(inplacesite == NULL, "inplacesite=%p, expected NULL\n", inplacesite);
- }
+static void test_HTMLDocument(void)
+{
+ IUnknown *unk;
+ HRESULT hres;
+ ULONG ref;
- if(view) {
- IOleInPlaceSite *inplacesite = (IOleInPlaceSite*)0xff00ff00;
+ hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
+ &IID_IUnknown, (void**)&unk);
+ ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
+ if(FAILED(hres))
+ return;
- hres = IOleDocumentView_Show(view, FALSE);
- ok(hres == S_OK, "Show failed: %08lx\n", hres);
+ test_Persist(unk);
- hres = IOleDocumentView_CloseView(view, 0);
- ok(hres == S_OK, "CloseVire failed: %08lx\n", hres);
+ hres = test_Activate(unk, CLIENTSITE_EXPECTPATH);
+ if(FAILED(hres)) {
+ IUnknown_Release(unk);
+ return;
+ }
- hres = IOleDocumentView_SetInPlaceSite(view, NULL);
- ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
-
- hres = IOleDocumentView_GetInPlaceSite(view, &inplacesite);
- ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
- ok(inplacesite == NULL, "inplacesite=%p, expected NULL\n", inplacesite);
-
- SET_EXPECT(GetContainer);
- SET_EXPECT(LockContainer);
- expect_LockContainer_fLock = FALSE;
- hres = IOleObject_Close(oleobj, OLECLOSE_NOSAVE);
- ok(hres == S_OK, "Close failed: %08lx\n", hres);
- CHECK_CALLED(GetContainer);
- CHECK_CALLED(LockContainer);
+ test_OleCommandTarget_fail(unk);
+ test_OleCommandTarget(unk);
+ test_Window(unk, TRUE);
+ test_UIDeactivate();
+ test_OleCommandTarget(unk);
+ test_Window(unk, TRUE);
+ test_InPlaceDeactivate(unk, TRUE);
- hres = IOleObject_GetClientSite(oleobj, &clientsite);
- ok(clientsite == &ClientSite, "clientsite=%p, expected %p\n", clientsite, &ClientSite);
+ /* Calling test_OleCommandTarget here couses Segmentation Fault with native
+ * MSHTML. It doesn't with Wine. */
- hres = IOleObject_SetClientSite(oleobj, NULL);
- ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
- }
+ test_Window(unk, FALSE);
+ test_Hide();
+ test_InPlaceDeactivate(unk, FALSE);
+ test_CloseView();
+ test_Close(unk, FALSE);
+
+ /* Activate HTMLDocument again */
+ test_Activate(unk, CLIENTSITE_SETNULL);
+ test_Window(unk, TRUE);
+ test_OleCommandTarget(unk);
+ test_UIDeactivate();
+ test_InPlaceDeactivate(unk, TRUE);
+ test_Close(unk, FALSE);
+
+ /* Activate HTMLDocument again, this time without UIActivate */
+ call_UIActivate = FALSE;
+ test_Activate(unk, CLIENTSITE_SETNULL);
+ test_Window(unk, TRUE);
+ test_UIDeactivate();
+ test_InPlaceDeactivate(unk, TRUE);
+ test_CloseView();
+ test_CloseView();
+ test_Close(unk, TRUE);
- if(cmdtrg)
- IOleCommandTarget_Release(cmdtrg);
- if(windowlessobj)
- IOleInPlaceObjectWindowless_Release(windowlessobj);
- if(oleobj)
- IOleObject_Release(oleobj);
if(view)
IOleDocumentView_Release(view);
- if(activeobject)
- IOleInPlaceActiveObject_Release(activeobject);
+ view = NULL;
ok(IsWindow(hwnd), "hwnd is destroyed\n");
- ref = IUnknown_Release(htmldoc_unk);
+ ref = IUnknown_Release(unk);
ok(ref == 0, "ref=%ld, expected 0\n", ref);
ok(!IsWindow(hwnd), "hwnd is not destroyed\n");
- DestroyWindow(container_hwnd);
}
START_TEST(htmldoc)
{
CoInitialize(NULL);
+ container_hwnd = create_container_window();
test_HTMLDocument();
+ DestroyWindow(container_hwnd);
CoUninitialize();
}
Aug. 15, 2005
Re: WLDAP32: implement ldap_result
by Vitaliy Margolen
Monday, August 15, 2005, 5:19:10, Hans Leidekker wrote:
> -Hans
> Changelog
> Implement ldap_result.
This patch brakes cvs build:
misc.c:58: error: `LDAP_NOT_SUPPORTED' undeclared (first use in this function)
misc.c:58: error: (Each undeclared identifier is reported only once
misc.c:58: error: for each function it appears in.)
Vitaliy Margolen
Aug. 15, 2005
Re: WINEALSA: comment on unexpected shrinking of mmap-buffer (resend)
by Alex Villacís Lasso
Robert Reif wrote:
>
> Only the primary buffer supports hardware acceleration. The secondary
> buffer(s) are implemented in software and mixed into the primary buffer.
> The formats (mono/stereo, 8/16 bit samples, and sample rate) of the
> primary and secondary buffers are totally independent and can be
> anything.
>
> One of the dsound tests keeps the primary buffer format constant and
> iterates through all secondary buffer formats and another keeps the
> secondary buffer format constant and iterates through all possible
> primary formats.
>
> This is probably what you are seeing. The secondary buffer format
> has nothing to do with what is sent to the hardware.
>
>
The first test that fails with the ALSA driver is the so-called
"reference" tone, which, as far as I could see, is played with a primary
buffer, and no secondary buffer. The reference tone uses the hardware
position directly, which wraps around at a buffer size that changes
unexpectedly when switching playback formats. I have prepared a patch
that "fixes" this, by re-querying the buffer size in the case of a
primary buffer, and displaying a warning if it detects a buffer size
change. However, I don't know if the buffer size is supposed to remain
constant across buffer format changes. If it does, then the patch would
need to be modified to mark this as a TODO.
Changelog:
* Re-query buffer capabilities after format change, and display warning
if buffer size changed after format change. Fixes reference playback
with ALSA.
Aug. 15, 2005
Error on clean .wine for theming
by Paul Vriens
Hi,
just updated to current cvs and removed .wine:
[paul(a)penguin paul]$ rm -rf .wine
[paul(a)penguin paul]$ winecfg
wine: creating configuration directory '/home/paul/.wine'...
err:theming:THEMING_Initialize Could not re-register class L"Edit": 582
wine: '/home/paul/.wine' created successfully.
Error 582 (1410) is "ERROR_CLASS_ALREADY_EXISTS".
Is this really an ERR or should error 582 be ignored ?
Cheers,
Paul.
Aug. 15, 2005
Re: MSHMTL: Added QueryStatus implementation
by Jacek Caban
Saulius Krasuckas wrote:
>* On Sun, 14 Aug 2005, Jacek Caban wrote:
>
>
>>* Saulius Krasuckas wrote:
>>
>>
>>>Is something like this OK? I have "borrowed" boolean variable
>>>expect_SetActiveObject_active.
>>>
>>>
>>Yes, it looks good.
>>
>>
>
>Does that mean by a chance it can to wine-patches? :-)
>
>
>
Hello.
Yes, it could, but I've tried to get other tests working
on win 98, without success. It's possible that it won't
work this way on 9x, so the best solution is to disable
all tests after UIActivate fails. I'll do so today and
send together with cleanup.
Thanks,
Jacek
Aug. 15, 2005